Dashboard: /stats UI panel consuming GET /stats #129
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#129
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?
User story
As the operator, I want a
/statspanel on the dashboard that renders the dataGET /stats(shipped in #123/#127) returns, so that I can see cost, turn, and success-rate trends per agent, repo, and day without curling the API.Context
/statsreturns:The current dashboard has no consumer. This story bolts a
/statstab/panel ontosrc/dashboard.htmlthat pulls + renders it.Acceptance criteria
Panel
7d/30d/90d/all. Default30d. Changing the window refetches.workersSSE event.ALLdefault. Filter re-passes?agent=<name>to the endpoint.ALLdefault. Filter re-passes?repo=<owner/name>.Rendering
$x.xx), turns, success_rate (xx%). Whole card grays out on empty window.repo · tasks · cost · success%.Polling
Tests
src/dashboard-browser.test.tswith happy-dom coverage: mount the panel, mock/stats→ verify totals + by-agent table render; change window → verify refetch with the right query param; filter by agent → same.src/dashboard-smoke.test.tsstructural check for the new tab element + all three subcomponents.Out of scope
?agent=filter on/historyor equivalent; separate story).References
src/main.ts::handleStats(shipped in #127).task-store.tsfor the shape of the underlying rows.Dependencies
main.