M17-2: Usage dashboard (Anthropic-console-style) #153
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#153
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As an operator on Claude Pro Max (subscription, weekly session quota, no per-token billing), I want the dashboard to show the current weekly window, consumption (turns / sessions / input-tokens / output-tokens) and threshold colours, so that I know when we're approaching the cap before dispatches start failing.
Acceptance criteria
Data capture
TaskRecordcapture to includeinput_tokens,output_tokens,cache_creation_tokens,cache_read_tokens,model(already present on SDK'stotal_cost_usd-adjacent fields)task-store.ts::persistTasktask_historyschema gains the new columns; existing rows getNULL, read is backward-compatible/usageendpointGET /usage[?window=week|day|all], defaultweek(Pro-Max reset cadence)config/agents.json::usage_resetin case Anthropic changes cadenceDashboard Usage tab
usage_threshold_tokens(leave blank if not configured — Pro Max publishes no hard number)/statsby-day barTests
usage.test.ts— fixture task-history with known token counts, assert aggregatesdashboard-browser.test.ts— mount Usage tab, mock/usage, verify totals + by-agent render + threshold colour transitionsdashboard-smoke.test.ts— structural check for the tab elementDocs
/usagesection with response shapetask-store/handleUsageOut of scope
Dependencies
References
specs/m17-multi-repo-and-observability.md§Story M17-2