Skip to content

feat(trace): add step trajectory table - #2893

Merged
esokullu merged 2 commits into
webbrain-one:mainfrom
alectimison-maker:feat/trace-session-step-table
Aug 22, 2026
Merged

feat(trace): add step trajectory table#2893
esokullu merged 2 commits into
webbrain-one:mainfrom
alectimison-maker:feat/trace-session-step-table

Conversation

@alectimison-maker

@alectimison-maker alectimison-maker commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a compact step summary to the Traces page above the existing detailed event timeline.
  • Group durable trace events by actual step and run lifecycle, showing status, duration, token usage, cost, tool activity, vision sub-calls, error codes, and repair markers.
  • Keep Chrome and Firefox behavior synchronized through a browser-neutral aggregation module.

Related changes: #2877, #2889.

Implementation

  • Add a pure buildTraceTrajectory(events) function for deterministic aggregation without changing the recorder schema or adding another IndexedDB projection.
  • Represent turn lifecycle events in a run-level row so the lifecycle marker at step zero does not appear as a permanently running model step.
  • Preserve older traces without lifecycle boundaries with an unknown status instead of guessing completion from response payloads.
  • Keep the existing detailed timeline, compare mode, export behavior, lossless warning, and interrupted-run repair flow unchanged.
  • Reuse existing localized labels and display only bounded aggregate/error evidence; raw request and tool payloads are not added to the new table.

Testing

  • node test/run.js — 1999 passed, 0 failed
  • npm run test:toolbar-guard — 33 passed
  • npm run test:security — 60/60 passed
  • node scripts/benchmark-offline-relevance.mjs — completed successfully
  • Node syntax checks and git diff --check — passed
  • Manual Chrome unpacked-extension smoke test — Traces opened, Refresh worked, the step summary rendered before the timeline, and there were no console or page errors
  • Firefox covered by mirrored source, parity tests, syntax checks, and the shared suite; manual Firefox verification was not run

Compatibility

  • The change is additive and reads the existing event log without changing stored event shapes.
  • Existing trace exports and privacy warnings remain unchanged.
  • The table remains bounded by the current trace viewer's normal run/event limits.

@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

@alectimison-maker is attempting to deploy a commit to the esokullu's projects Team on Vercel.

A member of the Team first needs to authorize it.

A recorded turn_end/step_end terminates its step or run by definition,
but markEnd only recognized ok:true/status:'done'. Terminal statuses the
agent actually emits (scheduled_resume, read_scope_limited,
clarification_required, delivery-recovery fallbacks) left run rows stuck
at running. Treat any non-failed end payload as done and keep only the
failure-shaped status list.
@esokullu
esokullu merged commit 7431217 into webbrain-one:main Aug 22, 2026
3 checks passed
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.

2 participants