Skip to content

feat(trace): add session statistics without event replay - #2899

Merged
esokullu merged 1 commit into
webbrain-one:mainfrom
alectimison-maker:feat/trace-session-statistics
Aug 23, 2026
Merged

feat(trace): add session statistics without event replay#2899
esokullu merged 1 commit into
webbrain-one:mainfrom
alectimison-maker:feat/trace-session-statistics

Conversation

@alectimison-maker

Copy link
Copy Markdown
Contributor

Summary

  • Add a bounded session summary for related trace runs without replaying their event logs in the Traces page.
  • Persist content-free per-run counters for model calls, tool activity, retries, errors, token usage, cost, and latency.
  • Show the summary alongside the existing conversation turn navigation while preserving the detailed timeline and compare view.

Implementation

  • Add browser-neutral pure reducers for event metrics and durable run aggregation, mirrored in Chrome and Firefox.
  • Reuse the existing session index for session-scoped run reads and sort results by start time.
  • Keep the recorder schema additive: older run records without the new counters remain readable and aggregate as zero for unavailable metrics.
  • Keep all counters derived from structured events; no prompt, message, tool argument, or tool result content is added to the persisted summary.
  • Do not add another IndexedDB store or change the trace event envelope.

Testing

  • node test/run.js — 2003 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 unpacked-extension verification was not run in this environment

Compatibility

  • Existing detailed event timelines, exports, compare mode, automatic refresh, repair flow, and privacy defaults remain unchanged.
  • Chrome and Firefox use the same statistics reducer and retain their existing platform-specific recorder behavior.
  • Session reads remain bounded by the current viewer limit and fall back to the existing chronological scan when the session index is unavailable.

Related changes: #2877, #2889, #2893.

@vercel

vercel Bot commented Aug 23, 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.

@esokullu
esokullu merged commit d2dbbbd into webbrain-one:main Aug 23, 2026
1 of 2 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