docs(agent): update stats page description (Chart.js bundled, reminder chips)

This commit is contained in:
iris 2026-06-05 01:44:01 +02:00
commit da52afcf53

View file

@ -330,11 +330,15 @@ harness, linked from the per-agent page's `📊 stats →` and from
each dashboard container row). Turn analytics, read-only, from each dashboard container row). Turn analytics, read-only, from
`/state/hyperhive-turn-stats.sqlite`. `GET /api/stats?window= `/state/hyperhive-turn-stats.sqlite`. `GET /api/stats?window=
24h|7d|30d` returns a time-bucketed `Snapshot`; the page renders 24h|7d|30d` returns a time-bucketed `Snapshot`; the page renders
it with Chart.js (vendored from a CDN). Charts: turns, it with Chart.js (bundled into `stats.js` via esbuild — no CDN
duration (p50 · p95 · avg), context tokens, token cost per dependency). Charts: turns, duration (p50 · p95 · avg), context
bucket, a **turns-by-model** stacked bar (model choice drives tokens, token cost per bucket, a **turns-by-model** stacked bar
token cost, so it sits directly under the cost chart), and (model choice drives token cost, so it sits directly under the
doughnuts for tool / wake-source / result mix. A summary chip cost chart), and doughnuts for tool / wake-source / result mix.
row carries window totals. `stats.rs` opens the sqlite db A summary chip row carries window totals; when `reminder_stats`
read-only and degrades to an empty snapshot on any error — the is present (fetched via `ReminderRollup` RPC and merged into the
page is decorative, never authoritative. snapshot in `web_ui.rs::api_stats`) three extra chips appear:
**reminders scheduled / delivered / pending** for the window.
`stats.rs` opens the sqlite db read-only and degrades to an
empty snapshot on any error — the page is decorative, never
authoritative.