agent/terminal: neutral [resolved] label for closed asks (argus #668)

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.
This commit is contained in:
iris 2026-05-30 21:44:32 +02:00 committed by Mara
commit a9114342e4
3 changed files with 17 additions and 7 deletions

View file

@ -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/<id>` 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

View file

@ -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;

View file

@ -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;