web (W11): sessions dashboard — runtime + spend, richer viewer, submission-health panel - #498
Closed
ZIJ wants to merge 1 commit into
Closed
web (W11): sessions dashboard — runtime + spend, richer viewer, submission-health panel#498ZIJ wants to merge 1 commit into
ZIJ wants to merge 1 commit into
Conversation
… turns health panel Extends the existing Sessions UI (runtime-agnostic; renders flue and brain-box sessions alike): - Sessions list: Runtime badge (flue accented) + Spend column, from the session's agent_snapshot.runtime + usage. Adds agent_snapshot to the web SessionSchema and a display-only flue label to lib/runtimes (kept OUT of the create picker). - Conversation viewer: distinct rendering for agent.thinking, tool results (exec.completed AND flue's tool.result), turn.failed, and a body-spill affordance (content_ref/body_truncated). Keeps the Conversation/All level filter + live SSE tail. - Submission health: new turns panel (GET /v3/sessions/:id/turns) — per-turn state, yield_reason, timing, usage, error. Recovery stays cancel + steer + webhook redeliver (no fake retry — v3 has no turn re-drive endpoint). - Per-session spend: Spend/Tokens/Events metric cards on detail, derived defensively from the opaque usage object (flue meters at the gateway → renders '—'). - Data layer: getSessionTurns/getSessionResult wrappers + schemas; lib/usage helpers; preview mocks extended so the new surfaces render with no backend. Tier-2 note: /v3 has no streaming-parts/delta mode — tiering is the level field (internal/progress/user); 'Tier-2 fidelity' = faithful internal-level trace. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Folded into the flue-native evergreen (#489) — 1 repo = 1 flue PR. The W11 dashboard commit is now in flue-native (rides the flue PR, not a standalone main PR). |
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.
W11 — Dashboard + Tier-2. Extends the existing Sessions UI (
web/) rather than building greenfield. Runtime-agnostic: renders flue and brain-box (claude/codex/pi) sessions alike.What's new
Runtimebadge (flue accented +Cloudicon, brain-box neutral) and aSpendcolumn. Addsagent_snapshotto the webSessionSchemaand a display-only flue label tolib/runtimes— deliberately kept OUT of the create picker (RUNTIMES), since flue's behavior ships in a deployed artifact (no model/key to pick).agent.thinking, tool results (exec.completedfrom brain-box AND flue'stool.result— so both render identically),turn.failed, and a body-spill affordance (content_ref/body_truncated/body_bytes→ "output too large, stored in blob" instead of an empty bubble). Keeps the existing Conversation/All level filter and the live SSE tail untouched.GET /v3/sessions/:id/turns): per-turnstate,yield_reason, timing (active_seconds),usage, anderror(opaque object → one-line message). Recovery stays the existing cancel + steer and webhook redeliver — no fake "retry turn" button.usageobject.Honest scope reconciliation (spec vs.
/v3reality)/v3. The runtime emits whole events; tiering is thelevelfield (internal|progress|user). There's no token-delta stream to render — so "Tier-2 fidelity" = a faithful fullinternal-level trace, which this delivers. Noview=/parts=/tier=params exist.session.usage/turn.usage. flue meters at the gateway and reports{}here → spend renders—(correct, not a bug).Live SSE tail
Left the working inline
EventSourceclient as-is (resume viaLast-Event-ID/?after=<seq>,seqcursor, 5s poll fallback). Did not extract auseSSEhook — extraction risked regressing the working live tail for no functional gain (per the task's guardrail).Verification
npm run typecheck✅ ·npm run build✅ · preview dev server boots clean.npm run lint: the only 2 errors are pre-existing onmain(SessionDetail.tsxsynchronous setState-in-effect — the SSE reset I didn't touch;Browsers.tsxmedia-caption — not in this diff). Zero new lint errors.api/mock.ts) extended (a flue session + brain-box sessions with usage,agent.thinking/exec.completedevents, a turns fixture) soVITE_PREVIEW=1 npm run devrenders every new surface with no backend.Run against prod locally
OC_V3_KEY=osb_… npm run devfromweb/(Vite injectsx-api-keyserver-side to prod/v3, pervite.config.ts), then open/sessions.npm run devif your edge/session is already wired./sessions(runtime + spend columns), a session detail (/sessions/:id— spend cards, submission-health panel, richer trace), and a running session to watch the live tail.Base branch
Based on
main— W11 is runtime-agnostic dashboard breadth that ships independently of the flue-native evergreen. If the coordinator wants it inside theflue-nativeunit, it's a cheap rebase (web-only, separate surface).🤖 Generated with Claude Code