From da52afcf53d2b945741358f015c4330b8bb968e2 Mon Sep 17 00:00:00 2001 From: iris Date: Fri, 5 Jun 2026 01:44:01 +0200 Subject: [PATCH] docs(agent): update stats page description (Chart.js bundled, reminder chips) --- docs/web-ui/agent.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/web-ui/agent.md b/docs/web-ui/agent.md index 288012b3..b9bbd8b7 100644 --- a/docs/web-ui/agent.md +++ b/docs/web-ui/agent.md @@ -330,11 +330,15 @@ harness, linked from the per-agent page's `📊 stats →` and from each dashboard container row). Turn analytics, read-only, from `/state/hyperhive-turn-stats.sqlite`. `GET /api/stats?window= 24h|7d|30d` returns a time-bucketed `Snapshot`; the page renders -it with Chart.js (vendored from a CDN). Charts: turns, -duration (p50 · p95 · avg), context tokens, token cost per -bucket, a **turns-by-model** stacked bar (model choice drives -token cost, so it sits directly under the cost chart), and -doughnuts for tool / wake-source / result mix. A summary chip -row carries window totals. `stats.rs` opens the sqlite db -read-only and degrades to an empty snapshot on any error — the -page is decorative, never authoritative. +it with Chart.js (bundled into `stats.js` via esbuild — no CDN +dependency). Charts: turns, duration (p50 · p95 · avg), context +tokens, token cost per bucket, a **turns-by-model** stacked bar +(model choice drives token cost, so it sits directly under the +cost chart), and doughnuts for tool / wake-source / result mix. +A summary chip row carries window totals; when `reminder_stats` +is present (fetched via `ReminderRollup` RPC and merged into the +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.