(MOT-4251) feat(console): add session usage metrics - #606
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
skill-check — worker0 verified, 49 skipped (no docs/).
Four for four. Nicely done. |
Summary
Why
The Console currently shows only an estimated context gauge, so developers cannot inspect the exact usage and cost reported by providers or understand how work is distributed across turns and sub-agents. These metrics make session consumption visible without presenting estimates as exact values.
Impact
Developers can open metrics from the Console header or context gauge, compare exact, counted, and estimated values, inspect per-turn model calls, review whole-tree and trace totals, and optionally hide transcript usage chips.
Validation
pnpm --dir console/web exec biome check <changed files>pnpm --dir console/web typecheckpnpm --dir console/web typecheck:e2epnpm --dir console/web exec vitest run src/lib/session-usage.test.ts src/lib/sessions/entry-mapper.test.ts— 70 tests passedpnpm --dir console/web buildpnpm --dir console/web exec playwright test e2e/ui-metrics.spec.tsagainst the pinned integration stack — 2 tests passedFixes MOT-4251