From b9aa38960e54ab22423ba8ac1db51021b006aa4c Mon Sep 17 00:00:00 2001 From: iris Date: Sat, 6 Jun 2026 08:03:59 +0200 Subject: [PATCH 1/2] docs(web-ui): document the /stats favorite-tools doughnut Backfills the agent.md Stats-page section for the favorite-tools doughnut (per-agent most-run bash commands) shipped by #1446 + #1448. Notes the normalised bash_commands heads, the bash_breakdown read, and the hidden-until-data behaviour (missing table degrades to empty). Part of #1450 / completes the per-agent half of #1433's docs. --- docs/web-ui/agent.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/web-ui/agent.md b/docs/web-ui/agent.md index 0d0cb11c..bb29850c 100644 --- a/docs/web-ui/agent.md +++ b/docs/web-ui/agent.md @@ -372,6 +372,12 @@ 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 **favorite tools** doughnut shows the most-run shell commands — +normalised `bash_commands` heads (argv[0] basename) written per +bash task by the hive-bash-mcp capture, read via +`bash_breakdown`. Its card stays hidden until the agent has run a +bash command (a missing `bash_commands` table degrades to an empty +list), so it never renders an empty chart. 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 From a3e6585266213bbc8fd7ff58c64fd8f0fab711da Mon Sep 17 00:00:00 2001 From: iris Date: Sat, 6 Jun 2026 08:08:12 +0200 Subject: [PATCH 2/2] docs: tighten favorite-tools head normalisation wording MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per damocles (capture-side owner): "argv[0] basename" undersells the normalisation and misleads — the head is the basename of the first *real* command, looking past `cd repo &&` prefixes, env-assignments, and prefix-runners (sudo/env), so `cd /repo && cargo build` records `cargo`, not `cd`. Match the persistence.md phrasing. --- docs/web-ui/agent.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/web-ui/agent.md b/docs/web-ui/agent.md index bb29850c..d0b35e3c 100644 --- a/docs/web-ui/agent.md +++ b/docs/web-ui/agent.md @@ -373,11 +373,14 @@ cost chart), doughnuts for tool / wake-source / result mix, and a error / rate-limit / compaction outcomes are visible over time (the doughnut shows only the window total). A **favorite tools** doughnut shows the most-run shell commands — -normalised `bash_commands` heads (argv[0] basename) written per -bash task by the hive-bash-mcp capture, read via -`bash_breakdown`. Its card stays hidden until the agent has run a -bash command (a missing `bash_commands` table degrades to an empty -list), so it never renders an empty chart. +normalised `bash_commands` heads written per bash task by the +hive-bash-mcp capture: the basename of the *first real command*, +looking past `cd repo &&` prefixes, env-assignments, and +prefix-runners like `sudo` / `env` (so `cd /repo && cargo build` +records `cargo`, not `cd`). Read via `bash_breakdown`; the card +stays hidden until the agent has run a bash command (a missing +`bash_commands` table degrades to an empty list), so it never +renders an empty chart. 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