From f14056996e7317953145814a523b26dd3df6ce1c Mon Sep 17 00:00:00 2001 From: iris Date: Sun, 30 Aug 2026 20:11:20 +0200 Subject: [PATCH] terminal: catch the remaining stale ask/answer references MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit argus, reviewing PR#3793: a third stale ❓ ask mention survived in the same file/table the first pass touched (docs/terminal-rendering.md's icon legend) — tool_icon() has no ask/answer arm at all, confirmed by reading the function directly. Swept the whole tree this time instead of trusting the earlier narrow grep: found three more — docs/web-ui/dashboard.md's S3TT1NGS section still documented the expand-tool-output toggle as living on the dashboard, which moved to the per-agent page's own SettingsMenu popover in #3780 and was never followed up here; markdown.ts/streamRow.ts/terminal.css had the same send/ask/answer/recv phrasing as the original two comments. --- docs/terminal-rendering.md | 2 +- docs/web-ui/dashboard.md | 22 ++++++------------- frontend/packages/agent/src/lib/markdown.ts | 4 ++-- frontend/packages/agent/src/lib/streamRow.ts | 2 +- .../packages/shared/src/terminal/terminal.css | 4 ++-- 5 files changed, 13 insertions(+), 21 deletions(-) diff --git a/docs/terminal-rendering.md b/docs/terminal-rendering.md index 2761d240..4e9ea9c0 100644 --- a/docs/terminal-rendering.md +++ b/docs/terminal-rendering.md @@ -61,7 +61,7 @@ parent's negative pull. | `.turn-time` | `· HH:MM:SS` on turn-start; `· HH:MM:SS · ` on turn-end (child span) | muted, smaller | per-event `ts` (unix seconds) on the live frame + history row | harness | | `.text` | (no prefix; markdown body) | fg | claude `assistant.content[].text` | stream-json | | `.thinking` | `💭 thinking …` | muted, italic | claude `assistant.content[].thinking` | stream-json | -| `.tool-use` (flat) | ` Name args…` | cyan | tool_use w/o rich renderer; `` from the backend's `tool_icon(name)` (`stream_enrich.rs`): 📤 send · 📥 recv · ❓ ask · ⏰ remind · 🏷️ set_status · 🪢 loose-ends · ✂️ cancel_loose_end · ℹ️ get_agent_meta · ✅ ack_until · 📜 get_logs/get_host_journal · ↻ restart · ⏹️ kill · ▶️ start · 🔄 update · 📋 list_containers/list_rooms/list_room_members/list_invites · 📖 read_room/Read · 👁️ mark_read · 🛑 bash kill · 🖥️ bash other · 💬 matrix send/reply/dm · 📦 request_* · ⏱️ schedule · 🔧 default | stream-json | +| `.tool-use` (flat) | ` Name args…` | cyan | tool_use w/o rich renderer; `` from the backend's `tool_icon(name)` (`stream_enrich.rs`): 📤 send · 📥 recv · ⏰ remind · 🏷️ set_status · 🪢 loose-ends · ✂️ cancel_loose_end · ℹ️ get_agent_meta · ✅ ack_until · 📜 get_logs/get_host_journal · ↻ restart · ⏹️ kill · ▶️ start · 🔄 update · 📋 list_containers/list_rooms/list_room_members/list_invites · 📖 read_room/Read · 👁️ mark_read · 🛑 bash kill · 🖥️ bash other · 💬 matrix send/reply/dm · 📦 request_* · ⏱️ schedule · 🔧 default | stream-json | | `.tool-use` `
` | `✏️ Edit · -N +N` (no `→`) | cyan, body is +/- diff | `renderRichToolUse` Edit | stream-json | | `.tool-use` `
` | `📤 send → to · NL` | cyan, body is markdown | rich renderer for send | stream-json | | `.tool-result` (flat) | `← ` | muted | short `tool_result` (≤120c, non-recv) | stream-json | diff --git a/docs/web-ui/dashboard.md b/docs/web-ui/dashboard.md index 31ce3a6e..eaca8607 100644 --- a/docs/web-ui/dashboard.md +++ b/docs/web-ui/dashboard.md @@ -617,9 +617,9 @@ prices. Models not covered fall back to hive-c0re's built-in estimate. Operator-local preferences. State lives in the browser's `localStorage` — preferences do NOT sync between devices and -do NOT survive a profile wipe. Two sections today (browser -notifications, agent terminal); future preferences (theme, density, -etc.) land here as sibling `

` blocks in `settings.html`. +do NOT survive a profile wipe. One section today (browser +notifications); future preferences land here as sibling `

` +blocks in `settings.html`. **◇ browser notifications** — `🔔 enable notifications` button when permission ungranted; `🔕 mute / 🔔 unmute` toggle once granted @@ -630,18 +630,10 @@ single status line explains why. See `### Browser notifications` below for the dispatch model + the three signals the dashboard emits OS notifications on. -**◇ agent terminal** — a single `☐/☑ expand tool output panels` -toggle button (`role="switch"`, live `aria-checked`). Controls whether -every per-agent page's terminal defaults otherwise-collapsed -`
` rows (long tool-results, Write/Edit diffs, …) open; rows -that already default open regardless (send/ask/answer/recv) are -unaffected either way. Pure client-side — the key + get/set live in -`@hive/shared/prefs.js` (`getExpandDetailsPref`/`setExpandDetailsPref`) -so this page and every agent page's `app.js` read/write the exact same -`localStorage` key without a backend field; the shared terminal -factory reads it live via its `expandDetails` option (see -docs/web-ui/shape.md::Shared terminal pane), so a change here applies -to any already-open agent tab's next rendered row without a reload. +The "expand tool output panels" toggle used to live here too; it +moved into the per-agent page's own settings popover (`SettingsMenu`, +`@hive/shared/settings-menu.js`) since it's agent-terminal-only and +this tab is shared with swarm-ui — see that component's file comment. The FL0W page does NOT host this pane — settings live only on the dashboard's S3TT1NGS tab (reach it via the FL0W page's `← home` diff --git a/frontend/packages/agent/src/lib/markdown.ts b/frontend/packages/agent/src/lib/markdown.ts index 9b363b74..2b1e785f 100644 --- a/frontend/packages/agent/src/lib/markdown.ts +++ b/frontend/packages/agent/src/lib/markdown.ts @@ -1,6 +1,6 @@ // Markdown → sanitized HTML, ported from app.js's `mdNode`. Message -// bodies rendered into the live stream (assistant text, send/ask/answer/ -// recv payloads) are untrusted (peer-agent / matrix-relayed content, +// bodies rendered into the live stream (assistant text, send/recv +// payloads) are untrusted (peer-agent / matrix-relayed content, // agent-authored files) — `marked` itself no longer sanitizes (v5+ // dropped the built-in sanitizer), so every parse is run through // DOMPurify before it's ever handed to `dangerouslySetInnerHTML`. diff --git a/frontend/packages/agent/src/lib/streamRow.ts b/frontend/packages/agent/src/lib/streamRow.ts index e985f922..53328c4f 100644 --- a/frontend/packages/agent/src/lib/streamRow.ts +++ b/frontend/packages/agent/src/lib/streamRow.ts @@ -40,7 +40,7 @@ export interface StreamRow { * body today) — its own class, no markdown parsing. */ childText?: StreamRowMeta; /** Sanitized-markdown body: appended under a flat row (assistant - * text) or inside an open details row (send/ask/answer/recv bodies). */ + * text) or inside an open details row (send/recv bodies). */ markdownBody?: string; /** Plain `
` body inside a details row (generic long tool output). */
   plainBody?: string;
diff --git a/frontend/packages/shared/src/terminal/terminal.css b/frontend/packages/shared/src/terminal/terminal.css
index 2abc36f8..da1832f4 100644
--- a/frontend/packages/shared/src/terminal/terminal.css
+++ b/frontend/packages/shared/src/terminal/terminal.css
@@ -276,8 +276,8 @@ details.row > pre.tool-body { color: var(--fg); }
 details.row > pre.diff-body .diff-add { color: var(--green); }
 details.row > pre.diff-body .diff-del { color: var(--red); }
 details.row > pre.diff-body .diff-ctx { color: var(--fg); }
-/* Markdown body inside a row (assistant text, send/recv/ask/answer
-   message bodies). Inline elements get muted accents; block elements
+/* Markdown body inside a row (assistant text, send/recv message
+   bodies). Inline elements get muted accents; block elements
    reset the parent row's hanging indent so content lays out cleanly. */
 .live .row .md p { margin: 0.2em 0; }
 .live .row .md p:first-child { margin-top: 0; }