Commit graph hyperhive/docs/web-ui
Author SHA1 Message Date
iris
6b4b0f11c0 docs(web-ui): document turn start/end times + duration on the agent terminal
Follow-up to the turn-time feature: the terminal now stamps a wall-clock
time on the turn-start / turn-end rows and an elapsed duration on
turn-end, sourced from a per-event `ts` (unix seconds) that the backend
serializes as a flattened sibling of the event tag on both the live SSE
frame and each history row.

- terminal-rendering.md: add the `.turn-time` row to the taxonomy table
  + a note on the ts source and the graceful degradation when a frame
  omits ts.
- web-ui/agent.md: note the ts sibling on the emitted events, and the
  time/duration suffixes on the TurnStart / TurnEnd renderings.
2026-06-10 15:38:04 +02:00
lexis
564417a6da docs(web-ui): add Forge tile to H0M3 page documentation (follow-up to #1608) 2026-06-10 13:30:09 +02:00
iris
09787dd1c3 refactor(frontend): base16 theme contract in a swappable colors.css
Split the palette into two standalone stylesheets:
- colors.css — the 16 base16 slots (--base00..--base0F). This is the
  entire theme swap contract; a generator (e.g. a stylix base16 scheme,
  which is natively base00-base0F) replaces only this file.
- theme.css — the semantic layer (--bg, --purple, …) derived from the
  base16 slots via var()/color-mix. Never changes on a swap.

Every page links colors.css then theme.css; theme.css does NOT @import
colors.css (that would re-bake the slots into it) — they're separate
dist outputs so a swap touches just colors.css. Pixel-identical refactor:
base16 defaults are Catppuccin Mocha and the three off-slot vars
(--crust, --muted, --subtext0) derive via color-mix reproducing their
exact prior hexes.

Wires colors.css through both build.mjs CSS entry lists, the
@hive/shared exports map, and all 7 page templates. css-vars.md + the
frontend.nix output-list comment updated.
2026-06-08 21:24:07 +02:00
iris
5d0f3d060b feat(dashboard): generic server-warnings banner on every page (#1518)
Per operator request: instead of a disk-specific alert, surface a generic
server-warnings banner at the very top of every page, so new system
warnings can be added backend-side with no frontend change.

- hive-c0re `host_stats`: `server_warnings() -> Vec<ServerWarning>`
  (`{ kind, level, message }`). The threshold logic lives server-side; the
  host disk-pressure check (a `statvfs` probe of `/nix`: ≥85% used → warn,
  ≥95% → crit) is the first and only producer today. No new deps (libc).
- `/api/state` carries `server_warnings` (replaces the disk-specific
  field). Empty when all clear.
- frontend: `renderServerWarnings` / `initServerWarnings` in `common.js`
  inject a sticky top-of-<body> banner and render the list, coloured by
  `level`. Wired on every page — dashboard (live, via refreshState),
  FL0W, L0GS, H0M3. No per-warning frontend code; adding a warning kind
  is a pure backend change.

cargo check/clippy/fmt + npm run build green. Closes #1518.
2026-06-08 20:55:15 +02:00
iris
d9d2a52221 feat(stats): hive-wide "favorite tools" rollup on ST4TS
Swarm-level companion to the per-agent favorite-tools doughnut (#1433).
Aggregates each agent's bash_commands(ts, head) table (written by
hive-bash-mcp) across the whole hive and surfaces the top-10 most-run
command heads on the dashboard ST4TS tab, alongside the existing model
mix.

- hive_stats.rs: AgentAgg gains a `bash` head→count map, filled by a new
  guarded `read_bash_heads()` that reuses read_agent's read-only
  connection. A missing `bash_commands` table (capture hasn't run for
  that agent) or any read error yields an empty map — isolated from
  read_agent's error path so it never drops an agent from the rollup.
  HiveStats gains `bash_mix: Vec<KeyCount>` (busiest-first, top 10).
  Unit tests cover the per-head tally + window cutoff and the
  missing-table degrade-to-empty path (in-memory sqlite).
- dashboard: a "favorite tools (bash commands across the swarm)" CSS-bar
  list on the ST4TS pane, mirroring the model-mix bars. Header + list
  stay hidden until bash_mix has data, so a fresh hive shows no empty
  block. (Dashboard ships no chart lib — bars, not a doughnut.)
- docs: dashboard.md ST4TS section documents the new rollup.

Closes #1449. Inert until the hive-bash-mcp capture (#1448, merged) has
recorded data across agents.
2026-06-08 20:46:19 +02:00
iris
cc8f58fb24 feat(stats): make ST4TS model price table operator-tunable
The hive-wide cost estimate on the dashboard's ST4TS tab used a
hard-coded model->price table in hive_stats.rs. Anthropic list pricing
drifts, so move the table to a nix option operators can keep current
without a code change.

- New `services.hyperhive.modelPrices` option: attrset of model-family
  short name -> { input, output, cache_read, cache_write } USD per
  million tokens. Passed to `hive-c0re serve --model-prices <json>`.
- hive_stats: `Prices` is now public + Deserialize; add `PriceTable`
  type and `resolve_prices` (longest case-insensitive substring key
  wins) with the old hard-coded table preserved as `builtin_prices`
  fallback for any model not covered.
- Coordinator holds the parsed table (hive-c0re-local, not injected
  into containers, so not part of HiveEnv); `/api/stats-hive` reads it.
- Docs: dashboard.md ST4TS cost note updated; option self-documents
  via nixosOptionsDoc.

Closes #1434
2026-06-08 20:02:31 +02:00
iris
022fd5015c docs: reflect the H0M3 nav restructure in dashboard.md (#1504)
Follow-up to the #1464 step-2 PRs now on main (route swap + page-link
removal). Brings docs/web-ui/dashboard.md in line with the shipped UI:

- Tab strip no longer lists the FL0W / L0GS / M4TR1X "→" page-links —
  those are separate pages reached from the H0M3 hub now. The strip is
  in-page tabs only (SW4RM / Y3R C4LL / SYST3M / P3RM1SS10NS / SCH3DUL3S /
  ST4TS / P33RS / S3TT1NGS).
- Document the dashboard's new "← home" back-link in the chrome header.
- FL0W / L0GS page sections: they use a slim "← home" header now, not the
  dashboard tab strip (dropped the stale "reuses the dashboard chrome" +
  cross-page-tab-link descriptions).
- M4TR1X / L0GS page intros: reachable from the H0M3 hub tile, not a
  tab-strip "→" entry.
- S3TT1NGS-on-FL0W note: settings live only on the dashboard tab, reached
  via the FL0W page's "← home" → Dashboard.

Docs-only; matches the merged frontend. Closes #1504.
2026-06-07 22:00:47 +02:00
iris
90b7d61792 docs: fix dead /home.html alias in the H0M3 page heading
The route swap (#1501) renamed the source home.html → index.html (served
at /), so /home.html 404s. Drop the stale alias from the dashboard.md
section heading and align it with the leet-speak heading convention
(## FL0W page / ## L0GS page): "## Home page (`/`, `/home.html`)" →
"## H0M3 page (`/`)".

Trailing fix from the #1495 docs PR (the heading nit both argus and I
flagged, which an AGit push issue prevented from landing before merge).
2026-06-07 21:24:31 +02:00
lexis
60fb6a29c3 docs: fix front-matter for dashboard route at /dashboard.html (post-H0M3 routing swap) 2026-06-07 21:13:31 +02:00
lexis
a5268560e1 docs: add operator inbox + flow agent filter + flow collapse + home page docs (follow-up to #1469 #1472 #1473 #1464) 2026-06-07 21:13:17 +02:00
iris
e949129e75 refactor(flow): drop operator-inbox UI, now lives on Y3R C4LL (#1483)
The operator inbox moved to the dashboard's Y3R C4LL tab in #1469
(◆ 1NB0X ◆ section, with per-message + mark-all read). FL0W goes back
to being the pure event firehose, so remove its now-redundant inbox UI:

- flow.js: drop the operatorInbox store, inboxAppendFromEvent,
  buildInboxListNode, renderInbox, the inbox-pill click wiring, and the
  onAnyEvent hook that fed them. The side panel was only used for the
  inbox flyout on this page, so drop Panel.bind() + the Panel import too.
- flow.html: remove the inbox pill, the offscreen inbox-section div, and
  the side-panel markup.
- flow.css: remove the .flow-pill* and .flow-inbox-headless rules.
- home.html: Flow tile desc → "live all-agents message firehose".
- docs/web-ui/dashboard.md: drop the FL0W 0PER4T0R 1NB0X section, point
  at Y3R C4LL, and fix the count-pill + /op-send descriptions.

The agent filter, sent→delivered collapse, compose box, and OS
notifications on operator-bound traffic are unaffected.
2026-06-07 20:40:20 +02:00
iris
e70584b632 feat(frontend): split theme CSS vars into a standalone theme.css
Phase 1 of stylix integration (#1457): extract the Catppuccin palette
into a dedicated, separately-linked stylesheet so a theme swap can
replace just that file without rebuilding the rest of the frontend.

- shared/src/theme.css (new): the `:root` palette, moved out of
  base.css (which now holds only the body typography it references).
- shared/package.json: export `./theme.css`.
- dashboard/src/theme.css + agent/src/theme.css (new): one-line
  re-exports of @hive/shared/theme.css so each package's esbuild emits
  its own standalone `dist/static/theme.css` (palette is NOT inlined
  into the page bundles).
- both build.mjs: add theme.css to the CSS build list.
- every page (dashboard index/flow/logs, agent index/stats/screen):
  link `theme.css` first, ahead of the page CSS, so the `:root` vars
  resolve for everything.
- docs/web-ui/css-vars.md: document the split + the no-rebuild rationale.

Behaviour-neutral — same colours, just relocated. Verified both
`npm run build` outputs: theme.css emits standalone (383b) with the
palette; no `--*` palette defs duplicated into common.css/agent.css.

Phase 2 (nix derivation that swaps theme.css from stylix colours) is a
follow-up; touches nix/frontend.nix, coordinating with damocles.

Part of #1457.
2026-06-06 08:46:45 +02:00
iris
a3e6585266 docs: tighten favorite-tools head normalisation wording
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.
2026-06-06 08:13:12 +02:00
iris
b9aa38960e 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.
2026-06-06 08:13:12 +02:00
iris
f8cf76b62d 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.
2026-06-06 07:56:43 +02:00
iris
03ea6d1bda feat(stats): per-container cpu/mem load (#1424 p3)
C0NT41N3R L04D on the SYST3M tab + GET /api/container-resources.

Backend (hive-c0re/src/container_stats.rs): reads cgroup v2 cpu.stat +
memory.{current,peak,max} for each running agent machine
(machine-h\x2d<name>.scope under machine.slice), read-only/world-
readable so no hive-priv. CPU is a two-sample (~200ms) host-normalised
percentage; one shared sleep covers all agents. Skips agents whose
scope dir is absent (= not running). Network omitted: agents share the
host netns, no per-container counter.

Frontend: a polled C0NT41N3R L04D table on SYST3M (agent / cpu / mem /
peak / limit with meter bars), reusing the ST4TS table style. Polls
/api/container-resources every 5s only while the tab is active.

Backend reviewed-in-principle by damocles (path escaping + cpu delta
math); ping for the on-host sign-off.
2026-06-05 23:06:33 +02:00
iris
cfafc9d93d docs(dashboard): add /api/stats-hive to the endpoint reference 2026-06-05 22:51:11 +02:00
iris
a8a30dd39b docs(dashboard): document the ST4TS hive-wide stats tab
Adds the ST4TS tab to the strip list + a section covering the swarm
rollup, the /api/stats-hive endpoint shape, the read-only/skip-missing
aggregation, pull-on-activation, and the labelled cost estimate. Ships
with the feature (this branch / PR).
2026-06-05 22:51:11 +02:00
iris
9f06899238 docs(web-ui): move css-vars.md into web-ui/
The CSS theme-variable reference documents the dashboard/agent web-UI
stylesheets, so it belongs under docs/web-ui/ alongside shape/dashboard/
agent. Wire it into the web-ui.md index (split list + reading path) and
the CLAUDE.md file map. Closes #1405.
2026-06-05 19:21:43 +02:00
iris
f79b0e601f docs(dashboard): add descriptions field to tool-groups + capabilities API response shape
GET /api/tool-groups and GET /api/capabilities both return a
descriptions map (name → short string) added in feat(#1082). The
map drives native browser tooltips on column headers in the
P3RM1SS10NS tab. The API docs still showed the old 2-field shape.
2026-06-05 16:59:29 +02:00
iris
7d1d5d9bff docs(agent): add GET /api/state, /api/dashboard-state, /api/loose-ends, /api/stats to per-agent endpoints 2026-06-05 15:35:33 +02:00
iris
058035d10a docs(dashboard): note status-age chip data-set-at live-tick in container row docs 2026-06-05 14:32:09 +02:00
iris
429b0583ad docs(shape): document keyed DOM cache pattern alongside paintAtomic 2026-06-05 14:31:59 +02:00
iris
9e555e228b docs(dashboard): note that queued + terminal rebuild-queue timestamps also live-tick 2026-06-05 14:31:16 +02:00
iris
1c1e1dc5a9 docs(dashboard): document live countdown ticker for schedule next-fire and reminder due-at labels 2026-06-05 13:50:44 +02:00
iris
bf25d71fc9 docs(agent): update model quick-picker description — list is now configurable 2026-06-05 13:48:03 +02:00
iris
b6cda34371 docs(web-ui): note live-ticking approval request-age chip + precise stale threshold 2026-06-05 13:47:00 +02:00
iris
717177dbad docs(dashboard): document per-chip question counts in filter row 2026-06-05 13:46:38 +02:00
iris
b6b93f9fff feat(logs): URL deep-link + fetched-age chip for AGENT/SYSTEM tabs
Adds ?agent=name and ?unit=svc URL params to pre-select the agent on
the AGENT tab (used by the per-agent overflow menu journal logs link).
Last-fetched timestamp chip shows how stale the output is.

Agent selection is NOT persisted to localStorage — URL params only.
2026-06-05 13:17:43 +02:00
iris
df1ffdd504 docs(agent): document model quick-picker in overflow menu 2026-06-05 13:14:17 +02:00
iris
1c4619015d docs(web-ui): document browser tab title call-count prefix 2026-06-05 13:12:33 +02:00
iris
d4d8fa6d7a docs(web-ui): expand Y3R C4LL questions section — filter chips, peer override, answer form, history
The M1ND H4S QU3STI0NS paragraph was a minimal stub that omitted
most of the questions UI:

- Filter chips row (all · N / @operator / @peer / per-participant)
  with localStorage persistence
- Peer-targeted questions (agent-to-agent asks) and the
  operator's ability to override-answer them (0V3RR1D3 button)
- Full answer-form anatomy (textarea, option list, merge logic,
  Enter-to-submit, separate cancel form)
- Answered-history collapsible (◆ answ3red (N) details element)

Also clarify the P3NDING APPR0VALS paragraph: explicitly mention
the pending/history tab pair (it was documented in the Approval
card section but not called out at the tab level).
2026-06-05 13:12:12 +02:00
iris
c70823755b docs(web-ui): document BUILD tab auto-scroll, elapsed-time ticker, SSE list refresh
The BUILD sub-tab description was written before the auto-scroll,
live elapsed-time ticker, and SSE-driven list refresh were added.
Update it to cover:

- Live elapsed-time chip: ticks every second via setInterval,
  cleared on finish/error
- Sticky-bottom auto-scroll: follows new output while the operator
  is at the bottom; silently appends when scrolled up
- SSE-driven list refresh: rebuild_queue_changed fires a 2s-debounced
  fetchBuild() while on the BUILD tab; refresh button still works for
  immediate re-fetch
2026-06-05 13:09:07 +02:00
iris
10f22defee docs(web-ui): fix stale container-row 'Line 3' + document overflow menu
The dashboard.md 'Line 3: drill-in triggers' section described inline
↳ logs and ↳ build logs side-panel affordances that were removed from
the container row some time ago (navigation links were consolidated onto
the Line 1 nav strip; journal + build-log viewing moved to /logs.html).

Replace that stale section with accurate documentation of the per-agent
⋮ overflow menu (restart/stop/start/rebuild + journal-logs deep-link +
destroy/purge + deployed-sha forge link).

Also update the AGENT and SYSTEM sub-tab descriptions to cover:
- localStorage persistence of agent/unit selection across page loads
- ?agent= / ?unit= URL params for deep-linking (used by the ⋮ menu)
- 'fetched N ago' chip after each successful fetch (ticks every 30 s)
2026-06-05 13:04:38 +02:00
iris
04b313b5e7 docs(dashboard): note SSE coverage in P3RM1SS10NS tab description 2026-06-05 12:06:32 +02:00
iris
2080fd3866 feat: live SSE updates for P3RM1SS10NS tab (capabilities + tool groups)
Add CapabilitiesChanged and ToolGroupsChanged DashboardEvent variants
so the P3RM1SS10NS tab reflects perm changes without the operator
navigating away and back.

Backend:
- DashboardEvent::CapabilitiesChanged { seq, caps, descriptions,
  assignments } — same payload shape as GET /api/capabilities
- DashboardEvent::ToolGroupsChanged { seq, groups, descriptions,
  assignments } — same payload shape as GET /api/tool-groups
- Coordinator::emit_capabilities_snapshot() and
  emit_tool_groups_snapshot() — read from the JSON files and broadcast
- rebuild_queue.rs PermChange worker: emit after each successful
  commit_capabilities / commit_tool_groups call

Frontend:
- applyCapabilitiesChanged(ev): calls renderCapabilities(root, ev)
- applyToolGroupsChanged(ev): calls renderToolGroups(root, ev)
- Both registered in MUTATION_HANDLERS
- activateTab comment updated (SSE now covers perm changes)

Docs: dashboard.md and CLAUDE.md updated.

This completes SSE coverage for all dashboard sections: SW4RM,
Y3R C4LL, SYST3M, SCH3DUL3S/reminders, and P3RM1SS10NS all
derive live updates from /dashboard/stream.
2026-06-05 12:06:32 +02:00
iris
a1e46e2b3d feat: live SSE updates for the SYST3M reminders section
Add RemindersChanged SSE event so the pending-reminders list in the
SYST3M tab updates live without polling.

Backend emission sites (every path that mutates the reminders table):
- agent_server: store_remind (remind MCP call)
- dashboard.rs: post_cancel_reminder, post_retry_reminder
- questions.rs: cancel_loose_end Reminder kind
- reminder_scheduler: after each delivery batch (any_delivered)

Coordinator gets emit_reminders_snapshot() mirroring the existing
emit_schedules_snapshot() pattern: lists PendingReminder rows from the
broker and emits DashboardEvent::RemindersChanged.

Frontend: applyRemindersChanged(ev) calls renderReminders(ev.reminders)
and is registered as reminders_changed in MUTATION_HANDLERS.

Docs: dashboard.md reminders_changed entry; CLAUDE.md file map updated.
2026-06-05 12:06:32 +02:00
iris
76c4a67b1c feat: live SSE updates for the SCH3DUL3S tab
Add `SchedulesChanged` to the dashboard event channel so the
operator's schedule list updates in real time without requiring a
tab-activation or form-submit refresh.

Backend:
- `dashboard_events.rs`: new `SchedulesChanged { seq, schedules }`
  variant carrying a full `Vec<WireSchedule>` snapshot (same
  snapshot-over-diff rationale as `RebuildQueueChanged`).
- `coordinator.rs`: `emit_schedules_snapshot()` helper — queries the
  scheduled_prompts list, converts to wire shape, broadcasts the event.
- `dashboard.rs`: call `emit_schedules_snapshot()` at the end of each
  operator API handler that mutates a schedule:
  `post_schedule_new`, `post_schedule_fire_now`,
  `patch_schedule`, `post_schedule_cancel`.
- `scheduled_prompts_worker.rs`: call `emit_schedules_snapshot()`
  after each tick that fires schedules, so `last_fired_at_unix`,
  `next_fire_at_unix`, and reaped one-shots surface live.

Frontend:
- `tabs.js`: add `applySchedulesChanged(ev)` — replaces
  `schedulesState` from the snapshot and calls `renderSchedulesList()`.
  Registered in `MUTATION_HANDLERS` as `schedules_changed`.
  Tab-activation re-fetch kept as safety net for approval-path
  inserts and disconnect windows; comment updated to reflect this.

Docs:
- `docs/web-ui/dashboard.md`: document `schedules_changed` event.
- `CLAUDE.md`: add `SchedulesChanged` to the file-map entry.
2026-06-05 12:06:32 +02:00
iris
da52afcf53 docs(agent): update stats page description (Chart.js bundled, reminder chips) 2026-06-05 01:44:01 +02:00
iris
4769d7ce5a docs: remove stale /api/agent/{name}/links references
The c0re-proxy endpoint was removed in the dashboard-state refactor.
Links are now served by agent_links() via two agent-local endpoints:
StateSnapshot.links (GET /api/state, per-agent page) and
DashboardState.links (GET /api/dashboard-state, dashboard card).

Update docs/web-ui/agent.md and the StateSnapshot.links doc comment
to reflect the current source of truth.
2026-06-05 00:46:17 +02:00
iris
f0271f95e4 docs(web-ui): update dashboard.md for dashboard-state endpoint
Replace the stale GET /api/agent/{name}/links reference with
GET /api/dashboard-state (merged in #1292). The new endpoint is
served by the agent backend and returns DashboardState carrying
links, status_text, rate_limited, ctx_tokens, and
context_window_tokens — all agent-owned fields that were previously
(mis)read by hive-c0re from disk.

Also update the ctx_tokens description: it's now sourced from
DashboardState rather than ContainerView (which no longer carries
ctx_tokens/context_window_tokens).
2026-06-04 20:15:09 +02:00
damocles
9f8694e3cf fix(#1249): break sticky-bottom lock when user scrolls up during snap animation 2026-06-04 20:10:37 +02:00
iris
0da736f2a1 fix(docs): web_tools is a tool group, not a capability
Remove web_tools from the C4P4B1L1T13S table in dashboard.md and add
it to the T00L GR0UPS section with a note that it gates Claude built-ins
rather than MCP tools. Fix turn-loop.md to say 'tool-group-gated' and
'web_tools tool group' throughout.
2026-06-02 12:47:18 +02:00
iris
de8c446a3a docs: document web_tools capability in turn-loop and dashboard 2026-06-02 12:47:18 +02:00
iris
834d9cb2c4 docs(web-ui): update CSS bundle description for split stylesheet layout 2026-06-02 12:47:18 +02:00
iris
f55d3baa0a docs(web-ui): add P3RM1SS10NS to tab strip list and URL hash list 2026-06-02 12:47:18 +02:00
iris
b3ccd1500c docs(web-ui): document P3RM1SS10NS tab and tool-groups/capabilities endpoints 2026-06-02 12:47:18 +02:00
iris
14368b2e09 docs(dashboard): add L0GS page section documenting three sub-tabs
/logs.html was undocumented — only mentioned in passing in API
endpoint lists. Adds a proper section covering BUILD / AGENT /
SYSTEM sub-tabs, their API endpoints, and behaviour.
2026-06-02 12:45:42 +02:00
damocles
9a7c917f36 rename(#162): fix MANAGER_AGENT and @manager in docs 2026-06-01 17:58:09 +02:00
damocles
008609d0e7 rename(162): drop HIVE_PORT fallback; sweep remaining hm1nd in docs 2026-06-01 17:40:47 +02:00