From f8cf76b62d60a7f6ec151d05fdbef8c64b1b4029 Mon Sep 17 00:00:00 2001 From: iris Date: Fri, 5 Jun 2026 23:37:02 +0200 Subject: [PATCH] docs(web-ui): document the new per-agent /stats chips + result trend Backfills the agent /stats page docs after the P1 stats enrichments: the result-trend stacked bar (per-bucket result outcomes over time) and the cache hit-rate + tokens/turn summary chips. --- docs/web-ui/agent.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/web-ui/agent.md b/docs/web-ui/agent.md index 8c874aed..0d0cb11c 100644 --- a/docs/web-ui/agent.md +++ b/docs/web-ui/agent.md @@ -368,11 +368,17 @@ 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. +cost chart), doughnuts for tool / wake-source / result mix, and a +**result-trend** stacked bar — per-bucket `result_counts` so +error / rate-limit / compaction outcomes are visible over time +(the doughnut shows only the window total). +A summary chip row carries window totals, plus two +token-efficiency chips derived from the bucket sums: **cache +hit-rate** (`cache_read` over all input-side tokens) and +**tokens/turn**. When `reminder_stats` is present (fetched via +`ReminderRollup` RPC and merged into the snapshot in +`web_ui.rs::api_stats`) three more 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.