feat(FN-945): show timestamps only at block boundaries in agent log

- Modify AgentDetailView to display timestamps only at block boundaries instead of every line
- Reduces visual noise in the agent log by grouping consecutive lines from the same block
- Improves readability of agent session output in the dashboard
This commit is contained in:
gsxdsm
2026-04-04 19:27:09 -07:00
parent e2e1da03cb
commit 1ae3fc4a6a

View File

@@ -887,9 +887,13 @@ function LogsTab({
</p> </p>
</div> </div>
) : ( ) : (
logs.map((entry, i) => ( logs.map((entry, i) => {
<LogEntry key={`${entry.timestamp}-${i}`} entry={entry} /> const prevEntry = i > 0 ? logs[i - 1] : undefined;
)) const showTimestamp = !prevEntry || prevEntry.agent !== entry.agent;
return (
<LogEntry key={`${entry.timestamp}-${i}`} entry={entry} showTimestamp={showTimestamp} />
);
})
)} )}
</div> </div>
@@ -962,7 +966,7 @@ function LogsTab({
); );
} }
function LogEntry({ entry }: { entry: AgentLogEntry }) { function LogEntry({ entry, showTimestamp }: { entry: AgentLogEntry; showTimestamp: boolean }) {
const getEntryStyles = () => { const getEntryStyles = () => {
switch (entry.type) { switch (entry.type) {
case "tool": case "tool":
@@ -1001,7 +1005,9 @@ function LogEntry({ entry }: { entry: AgentLogEntry }) {
return ( return (
<div className="log-entry" style={styles}> <div className="log-entry" style={styles}>
<span className="log-timestamp">[{timestamp}]</span> {showTimestamp && (
<span className="log-timestamp">[{timestamp}]</span>
)}
{entry.agent && ( {entry.agent && (
<span className="log-agent">[{entry.agent}]</span> <span className="log-agent">[{entry.agent}]</span>
)} )}