Skip to content

Improve JS step-summary agent trace readability with ordered event markers#32847

Merged
pelikhan merged 2 commits into
mainfrom
copilot/improve-agent-log-rendering
May 17, 2026
Merged

Improve JS step-summary agent trace readability with ordered event markers#32847
pelikhan merged 2 commits into
mainfrom
copilot/improve-agent-log-rendering

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 17, 2026

The step summary currently renders agent logs as a flat stream, which makes trace progression hard to scan during workflow triage. This update improves JavaScript log-trace rendering by introducing explicit event ordering inspired by agent-trace timeline ergonomics.

  • Problem focus

    • Improve readability of agent log traces in GitHub step summaries without changing execution semantics.
  • Rendering changes

    • Ordered trace markers: assistant reasoning blocks and tool execution lines now carry monotonic [n] markers.
    • Stable output shape: existing compact result previews (├/└ lines, truncation rules, tool status icons) are preserved; only scanability is improved.
  • Test updates

    • Extended summary-rendering assertions to verify numbered trace output for both success and error tool paths.
if (i === 0) {
  state.traceEventCount += 1;
}
const prefix = i === 0 ? `[${state.traceEventCount}] ◆ ` : "  ";

// ...

state.traceEventCount += 1;
appendConversationLine(lines, `[${state.traceEventCount}] ${statusIcon} ${displayName}`, state);

Copilot AI and others added 2 commits May 17, 2026 16:37
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Improve step summary rendering for agent log traces Improve JS step-summary agent trace readability with ordered event markers May 17, 2026
Copilot AI requested a review from pelikhan May 17, 2026 16:39
@pelikhan
Copy link
Copy Markdown
Collaborator

@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot show time deltas like in npmjs debug package

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 17, 2026

@copilot render a preview for https://github.com/github/gh-aw/actions/runs/25953787841/job/76296776802

Preview from that job’s rendered agent summary:

=== Codex Execution Summary ===
Model: gpt-5.4-mini

Conversation:

Statistics:

In this run, no assistant/tool trace lines were emitted into the conversation section.

@pelikhan pelikhan marked this pull request as ready for review May 17, 2026 16:50
Copilot AI review requested due to automatic review settings May 17, 2026 16:50
@pelikhan pelikhan merged commit 16befaa into main May 17, 2026
1 of 2 checks passed
@pelikhan pelikhan deleted the copilot/improve-agent-log-rendering branch May 17, 2026 16:50
Copilot stopped work on behalf of pelikhan due to an error May 17, 2026 16:51
Copilot AI requested a review from pelikhan May 17, 2026 16:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds monotonic [n] event markers to assistant text blocks and tool execution lines in the JS log parser's step-summary output to improve scanability of agent traces. Existing output structure (icons, preview lines, truncation) is preserved.

Changes:

  • Introduce traceEventCount in the summary rendering state and increment it for each agent text block and tool execution line.
  • Prepend [n] markers to the first line of agent text and to tool execution lines.
  • Extend tests to assert the new numbered markers for both success and error tool paths.
Show a summary per file
File Description
actions/setup/js/log_parser_format.cjs Adds traceEventCount state and prefixes agent text and tool execution lines with [n] markers.
actions/setup/js/log_parser_shared.test.cjs Adds assertions for the new [n] markers on agent text and tool lines in success/error paths.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants