From 23f4f1823b5cfc5f989c439ad0d22cd13dfe148c Mon Sep 17 00:00:00 2001 From: iris Date: Fri, 6 Nov 2026 01:07:57 +0100 Subject: [PATCH] hive-agent: the per-agent page has no message box; its send route and the broker's operator message are removed The page's composer (its input, slash commands and completion), POST /send in hive-agent, the OperatorMsg request of the agent socket and its handler in hive-c0re, and the broker-error helper only the send route used are deleted: writing to an agent is the swarm UI's terminal. cancel turn, new session and log out stay in the state badge's menu; POST /api/compact stays, with nothing on the page calling it. The request-line limit keeps its size, and its comment says it is a generous bound now. The docs describe the actions in place of the footer and the prompt. --- README.md | 2 +- docs/turn-loop/claude-invocation.md | 4 +- docs/web-ui/README.md | 8 +- docs/web-ui/agent.md | 62 ++---- frontend/packages/agent/src/Root.tsx | 34 +--- frontend/packages/agent/src/agent.css | 121 ++---------- .../agent/src/components/LiveStream.tsx | 19 +- .../agent/src/components/TermInput.tsx | 187 ------------------ .../packages/agent/src/hooks/useLiveStream.ts | 14 +- frontend/packages/agent/src/index.html | 2 +- .../packages/agent/src/lib/termActions.ts | 16 +- hive-agent/src/web_ui/actions.rs | 43 +--- hive-agent/src/web_ui/mod.rs | 31 +-- hive-c0re/src/gateway_nginx.rs | 2 +- hive-c0re/src/socket_server/mod.rs | 23 --- hive-core-agent-sock/src/lib.rs | 5 - hive-sock-client/src/request_line.rs | 9 +- 17 files changed, 77 insertions(+), 505 deletions(-) delete mode 100644 frontend/packages/agent/src/components/TermInput.tsx diff --git a/README.md b/README.md index b1ca1adf..d5e83869 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ box it gets: at `/knowledge`, plus hyperhive's own docs in the container. → [knowledge](docs/integrations/knowledge.md) - **web UI** — a per-agent page behind the gateway: live terminal of the - turn stream, model / effort switching, cancel, `/compact`. + turn stream, model / effort switching, cancel. - **GUI** (opt-in, `services.hyperhive.agent.gui.enable`) — a Wayland desktop with screenshot / keyboard / mouse tools, viewable over VNC in the web UI. diff --git a/docs/turn-loop/claude-invocation.md b/docs/turn-loop/claude-invocation.md index 00cb3a15..2e2bb643 100644 --- a/docs/turn-loop/claude-invocation.md +++ b/docs/turn-loop/claude-invocation.md @@ -105,8 +105,8 @@ primary mechanism; hyperhive still owns that). `outputStyle` is fleet-wide preamble/recap Concise drops carries no information a turn-loop consumer needs. -**Session reset** is available via `POST /api/new-session` (or -`/new-session` slash command). It does _not_ touch the session inline — +**Session reset** is available via `POST /api/new-session` (the state +badge's `new session` menu row). It does _not_ touch the session inline — that would race a mid-write claude process. Instead `Bus::request_session_reset()` sets a one-shot flag consumed at the next turn boundary by `drive_turn`, which **archives** the current session: it renames the backing diff --git a/docs/web-ui/README.md b/docs/web-ui/README.md index d16afe7f..d9cba937 100644 --- a/docs/web-ui/README.md +++ b/docs/web-ui/README.md @@ -75,8 +75,8 @@ JS renders — no full-page reloads. - **[Dashboard layout](dashboard.md)** — every tab and standalone page, in full implementation detail: endpoint shapes, event wiring, exact badge-derivation rules. -- **[Per-agent page](agent.md)** — the per-agent terminal, composer, - side panel, slash commands, and per-agent endpoints. +- **[Per-agent page](agent.md)** — the per-agent terminal, + side panel, actions, and per-agent endpoints. - **[Shape (shared by both)](shape.md)** — the SPA skeleton, SSE multiplexing, terminal pane, listener bind, per-agent relative paths, `data-async` form pattern, atomic repaint. @@ -106,8 +106,8 @@ touching the code rather than using the UI: [`terminal-rendering.md`](terminal-rendering.md) (full row taxonomy and dispatch walkthrough); for a high-level summary see [`agent.md`](agent.md) (Per-stream rendering). -- **"What slash commands does the agent accept?"** → - [`agent.md`](agent.md) (Terminal-embedded prompt). +- **"What actions does the agent page offer?"** → + [`agent.md`](agent.md) (Actions). - **"What are the per-agent HTTP endpoints?"** → [`agent.md`](agent.md) (Per-agent endpoints). - **"Which CSS variable to use / where are colours defined?"** → diff --git a/docs/web-ui/agent.md b/docs/web-ui/agent.md index 33601703..af241216 100644 --- a/docs/web-ui/agent.md +++ b/docs/web-ui/agent.md @@ -4,9 +4,10 @@ > [Shape (shared)](shape.md) · [Dashboard layout](dashboard.md) -Three fixed-position layers frame a full-viewport terminal: a header, -scrollable main content, and a footer composer — plus a slide-in side -panel for flyouts and long content. +Two fixed-position layers frame a full-viewport terminal: a header and +scrollable main content — plus a slide-in side panel for flyouts and long +content. The page has no message box: to write to an agent, use the swarm +UI's terminal. ## Header @@ -91,13 +92,9 @@ at a given viewport width. Two columns: (`GET /api/state`'s `links` field) also feeds `DashboardState.links` for the dashboard card's icon strip — `agent_links()` in hive-agent is the single source of truth for - both. The dashboard link lives in this 🔗 popover, and - `/new-session` / `/logout` are - typed slash commands with their own type-twice confirm (see - below). - - `/cancel` (slash command, below) is the only cancel-turn path; the - turn-loop state badge already shows `thinking` as the - discoverability cue. + both. The dashboard link lives in this 🔗 popover. `cancel turn`, + `new session` and `log out` are rows of the state badge's menu, each + with a click-again confirm (see Actions below). Values throughout come from `GET /api/state`'s cold-load snapshot, @@ -129,22 +126,14 @@ and scrolls behind the fixed header + footer. `.terminal-wrap` applies `backdrop-filter: blur` for the frost effect, which creates a CSS stacking context — anchoring the pill inside that context would confine its `z-index` below the - fixed composer in the root stacking context, and it'd never + fixed header in the root stacking context, and it'd never float. `.agent-main` has no backdrop-filter (no stacking-context creators), so the pill's `z-index` reaches the root and properly - composites above the composer. Geometry is unchanged — + composites above the header. Geometry is unchanged — `.agent-main` and `.terminal-wrap` both `inset: 0` fill the same area. -## Footer / composer - -**Fixed-overlay footer** (`