From a9114342e4a7bc3c01a7f154c762ac4540fd7580 Mon Sep 17 00:00:00 2001 From: iris Date: Sat, 30 May 2026 21:44:32 +0200 Subject: [PATCH] agent/terminal: neutral [resolved] label for closed asks (argus #668) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Loose-ends endpoint only carries pending state — a question disappearing from the list can mean answered, cancelled by asker, or TTL expired. Previous [answered ✓] glyph implied successful operator response across all three paths. Rename .ask-answered-tag → .ask-resolved-tag and use the neutral [resolved] label. Full resolution detail (who answered with what) remains visible via the question's history in the side panel. Addresses argus review note on #668. --- docs/terminal-rendering.md | 11 +++++++---- frontend/packages/agent/src/agent.css | 2 +- frontend/packages/agent/src/app.js | 11 +++++++++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/docs/terminal-rendering.md b/docs/terminal-rendering.md index a3d44441..eed6948c 100644 --- a/docs/terminal-rendering.md +++ b/docs/terminal-rendering.md @@ -115,10 +115,13 @@ runs on every loose-ends refresh, matches each waiting slot against pending operator-bound questions by question text, and injects an inline `.answer-form` (textarea + send button bound to `/answer-question/` on the host dashboard) into the matching -slot. When a question subsequently resolves (operator answered via -the inline form, the side-panel form, or the dashboard Y3R C4LL -tab), the same reconciler replaces the form with a struck-through -`[answered ✓]` tag so the scrollback reflects the closed state. +slot. When a question subsequently leaves the pending list (answered, +cancelled by asker, or TTL-expired), the same reconciler +replaces the form with a struck-through `[resolved]` tag so the +scrollback reflects the closed state. The label is neutral +because `/api/loose-ends` only carries pending state — full +resolution detail is visible via the question's history in the +side panel. Lets the operator answer mid-flow without context-switching to the loose-ends side panel or the dashboard tab. Side panel + dashboard diff --git a/frontend/packages/agent/src/agent.css b/frontend/packages/agent/src/agent.css index 486c685b..5c51f484 100644 --- a/frontend/packages/agent/src/agent.css +++ b/frontend/packages/agent/src/agent.css @@ -606,7 +606,7 @@ pre.diff { color: var(--muted); align-self: center; } -.live .ask-answer-inline-slot .ask-answered-tag { +.live .ask-answer-inline-slot .ask-resolved-tag { color: var(--muted); font-style: italic; text-decoration: line-through; diff --git a/frontend/packages/agent/src/app.js b/frontend/packages/agent/src/app.js index cb61e2ca..f490f649 100644 --- a/frontend/packages/agent/src/app.js +++ b/frontend/packages/agent/src/app.js @@ -806,11 +806,18 @@ window.marked = marked; } for (const slot of pendingAskBinds) { if (slot._boundId) { - // Already bound — check if the question got resolved. + // Already bound — check if the question got resolved. The + // loose-ends endpoint only returns pending questions, so + // disappearance can mean "answered", "cancelled by asker", + // or "TTL expired" (argus #668 review). Use the neutral + // `[resolved]` label rather than a check-mark that would + // misrepresent the cancel / expire paths; full resolution + // state is visible via the question's history in the + // side panel. const stillPending = pending.some((q) => q.id === slot._boundId); if (!stillPending && !slot._resolvedShown) { slot.innerHTML = ''; - slot.appendChild(el('span', { class: 'ask-answered-tag' }, '[answered ✓]')); + slot.appendChild(el('span', { class: 'ask-resolved-tag' }, '[resolved]')); slot._resolvedShown = true; } continue;