Drop 9 batch proposals that are superseded by the boocode-lift-analysis (boocontext-audit, conductor upgrades, self-healing/verify-gate skills): add-3tier-memory, import-llm-evaluator, import-pregel-engine, plugin-platform, conductor-evolution, code-intelligence-upgrade, dev-workflow, ui-overhaul, agent-reliability. Delete 11 stub archive files (49-66B each, 'Status: Shipped. Archived.' only) that provide zero documentation value over the existing CHANGELOG.md + git tags.
1.8 KiB
1.8 KiB
Why
Token usage data is already accumulated per-session (agent_sessions.input_tokens/output_tokens/cost), per-tool (tool_cost_stats view), and per-task (tasks.token_breakdown JSONB), but there is no dedicated UI to view or analyze it. The only token surface today is the ContextMeter ring and the inline ChatThroughput readout — both per-chat, transient, and ephemeral. Users have no way to audit token consumption across sessions, compare provider costs, or understand where their context budget goes.
What Changes
- Nav button: Add a "Token Analytics" button to the sidebar nav, above the existing Settings button, linking to a new
/analyticsroute. - Token Analytics page: A new route/page at
/analyticsshowing aggregate token usage across sessions, per-tool cost breakdown, and per-session token history. - API endpoints: New or extended read endpoints to serve aggregate token data for the analytics page.
Capabilities
New Capabilities
token-analytics-dashboard: Aggregate token usage dashboard page with per-session, per-tool, and per-provider breakdowns. Reuses existingagent_sessions,tool_cost_stats, andtoken_breakdowndata sources.nav-button-token-analytics: Sidebar nav button (above Settings) linking to the analytics route.
Modified Capabilities
(No existing capabilities have requirement changes — this is net-new.)
Impact
- apps/web/src: New page (
/opt/boocode/apps/web/src/pages/Analytics.tsx), new route in App.tsx, new nav button in ProjectSidebar.tsx, new API client methods. - apps/server or apps/coder: Maybe a new aggregate endpoint if existing routes don't cover the required queries; otherwise reuse existing
/api/tools/cost_statsand/api/coder/sessions/:id/agent-sessionsendpoints. - No schema changes — all data is already persisted.