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:
parent
e056e82d6d
commit
a9114342e4
3 changed files with 17 additions and 7 deletions
|
|
@ -115,10 +115,13 @@ runs on every loose-ends refresh, matches each waiting slot
|
||||||
against pending operator-bound questions by question text, and
|
against pending operator-bound questions by question text, and
|
||||||
injects an inline `.answer-form` (textarea + send button bound to
|
injects an inline `.answer-form` (textarea + send button bound to
|
||||||
`/answer-question/<id>` on the host dashboard) into the matching
|
`/answer-question/<id>` on the host dashboard) into the matching
|
||||||
slot. When a question subsequently resolves (operator answered via
|
slot. When a question subsequently leaves the pending list (answered,
|
||||||
the inline form, the side-panel form, or the dashboard Y3R C4LL
|
cancelled by asker, or TTL-expired), the same reconciler
|
||||||
tab), the same reconciler replaces the form with a struck-through
|
replaces the form with a struck-through `[resolved]` tag so the
|
||||||
`[answered ✓]` tag so the scrollback reflects the closed state.
|
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
|
Lets the operator answer mid-flow without context-switching to the
|
||||||
loose-ends side panel or the dashboard tab. Side panel + dashboard
|
loose-ends side panel or the dashboard tab. Side panel + dashboard
|
||||||
|
|
|
||||||
|
|
@ -606,7 +606,7 @@ pre.diff {
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
align-self: center;
|
align-self: center;
|
||||||
}
|
}
|
||||||
.live .ask-answer-inline-slot .ask-answered-tag {
|
.live .ask-answer-inline-slot .ask-resolved-tag {
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
|
|
|
||||||
|
|
@ -806,11 +806,18 @@ window.marked = marked;
|
||||||
}
|
}
|
||||||
for (const slot of pendingAskBinds) {
|
for (const slot of pendingAskBinds) {
|
||||||
if (slot._boundId) {
|
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);
|
const stillPending = pending.some((q) => q.id === slot._boundId);
|
||||||
if (!stillPending && !slot._resolvedShown) {
|
if (!stillPending && !slot._resolvedShown) {
|
||||||
slot.innerHTML = '';
|
slot.innerHTML = '';
|
||||||
slot.appendChild(el('span', { class: 'ask-answered-tag' }, '[answered ✓]'));
|
slot.appendChild(el('span', { class: 'ask-resolved-tag' }, '[resolved]'));
|
||||||
slot._resolvedShown = true;
|
slot._resolvedShown = true;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue