Repository navigation
Conversation
|
@JesseVent is attempting to deploy a commit to the Supabase Team on Vercel. A member of the Team first needs to authorize it. |
Closed
JesseVent
force-pushed
the
trace-viewer-clean
branch
from
August 15, 2026 18:55
49dac64 to
ae796c6
Compare
Author
|
Made these changes to the traces retrieved.
@mattrossman @mandarini Theres a working version available here which can definitely help with testing :) https://supabase-evals-two.vercel.app/
|
Adds an AgentPrism-based trace visualization UI (apps/web) and the core adapter that turns any EvalResult into a trace span tree. Rebased cleanly onto current main: - Kept main's regenerated regression-eval-results.json and eval-results.json instead of the stale snapshot this carried, since main has since refreshed both independently. - Dropped the "trigger" experiment-suite trace fixtures and the "trigger" entries in EXPERIMENT_SUITES/url-state, since that suite isn't merged into main's core schema yet and lands separately. - Merged the adjacent (non-conflicting) codex parser test additions from main's supabase#130 alongside this branch's usage-tracking tests. Claude-Session: https://claude.ai/code/session_01WaER4ZeRLmDSwC5GFzkeFQ
Per feedback: the vertical/corner guide lines read as visual noise, not signal, especially for the flat single-level traces our tool-calling agents produce (no LangChain-style nested chains to actually branch on). Indentation spacing is preserved so rows still line up; only the drawn line segments are dropped.
This reverts commit 2452cfe.
agentprism-secondary tracks the app's --secondary token, which is too close to --background to read as a connector line in light mode. border-strong is tuned for visible dividers in both themes.
JesseVent
force-pushed
the
trace-viewer-clean
branch
from
September 12, 2026 11:59
ae796c6 to
bafd8f1
Compare
…in traces - codex parser: correlate --json events with the session rollout for per-item wall-clock timestamps (spans no longer collapse to 0ms), and harvest per-model-call token usage from rollout token_count events — the stream's turn.completed covers the whole exec run only once - engine: seed the initiating user prompt into the transcript when the CLI stream doesn't echo it (Codex), so the trace shows what started the run; Claude Code echoes it, so a dedup guard skips seeding there - trace-viewer: attribute context growth between consecutive model calls to the tool spans in the gap, weighted by result size and excluding the model's own generation; attributed costs stay out of totalTokens (already counted in the next turn's input) - export-results: fix TDZ error reading evalResults - vercel: build web with vite directly; ignore .vercel dirs
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Adds a trace viewer to the web results app: every result row gets a "View span tree" link that opens the full span tree for that run — system/user messages, every tool call with its input/output, assistant turns, and check results — with per-span duration, token usage, and status.
What's added
Core (
packages/core)trace-viewer.ts— adapter that turns anEvalResult(+ its raw transcript) into an AgentPrism span tree (evalResultToTraceSpans), plus tests (trace-viewer.test.ts).transcript/types.ts/parsers/adapt.ts— aTokenUsagetype andusage?/ts?fields threaded throughTranscriptEvent/TranscriptPart, so per-turn token counts and timestamps survive the transcript → trace pipeline instead of only being available as run-level aggregates.agents/{claude-code,codex,opencode}/parser.ts— each agent parser now extracts real per-turn usage (extractUsage/extractTurnUsage) from its own transcript format.index.ts— re-exports the above, plus per-step usage/timestamp capture in the AI SDK agent path.Export (
apps/framework/scripts/export-results.ts)eval-results.json, writes oneapps/web/src/data/traces/<evalId>.jsonper eval viaevalResultToTraceSpans, preferring a run that actually recorded a transcript over one that didn't (so the viewer shows a real span tree, not an empty no-skills run). Lazy/one-per-file so the aggregate bundle stays lean — the web app fetches a trace only when its row is opened. New--no-tracesflag skips writing them.Web (
apps/web)components/agent-prism/**— the AgentPrism component set (span cards, tree view, details view with Attributes/In-Out/Raw tabs, theme tokens) vendored into the repo.components/trace-panel.tsx— the integration point: fetches a trace's JSON lazily, revivesDatefields (JSON round-trips them as strings, which breaks AgentPrism's duration math), and rendersTraceViewerfull-screen with an Escape-to-close overlay.components/results/eval-details.tsx— adds the "View span tree" link.\nform); "JSON" stays available as a tab for exact, copy-pasteable output.TraceViewerto fit how we actually use it: it's built for a multi-trace list (pick between several loaded traces), but we only ever open one trace at a time, so the always-one-item trace-list sidebar (and, on mobile, its matching "back to list" dead-end button) is hidden — the span tree gets the full width instead.How to try it
Open the results table, click any row, click "View span tree".
Agent Prism Trace Visualiser
main: kept main's regeneratedeval-results.json/regression-eval-results.jsoninstead of the stale snapshot this originally carried, and dropped everything that had leaked in from an unrelated, not-yet-merged skill-trigger-suite branch (trigger trace fixtures,EXPERIMENT_SUITES/url-state.tsentries, a README section) — this PR is the viewer only.pnpm --filter core test(131/131),pnpm --filter web run typecheck, andpnpm --filter web run buildall pass. One pre-existingeval-results.test.tsdata-consistency assertion fails on this branch — confirmed it fails identically on plainmaintoday, unrelated to this change.