You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: Operations feed never shows "your response was not recorded" after a respond race — fetchItems() wipes the copy and the UI only renders it as a refresh-failure detail #2377
On the desktop Operations feed, when POST /api/operator-queue/{id}/respond is refused because the item is no longer pending (409 lost race, #1017; or 400 already terminal), stores/operatorQueue.js::respondToItem sets error to the "your response was not recorded" copy and calls fetchItems() — whose first line sets error = null. The copy is therefore wiped synchronously and is effectively never visible. Even when error does survive, Operations.vue renders it only as the detail line under the "Couldn't refresh the queue — showing the last items that loaded" banner, i.e. under a headline about refreshing, not about an unrecorded answer. The operator's card simply disappears and nothing says their answer was dropped.
Context
Found while pinning the shared respond payload for #2370 (the /m fix). /m routes the same refusal to a persistent page-level notice and scrolls it into view; desktop has no equivalent surface. The copy itself is now the shared, attribution-free QUEUE_RESPONSE_NOT_RECORDED in src/frontend/src/utils/operatorQueue.js; what is missing is a channel that survives the refetch and a headline that names the event. The behavioural store test in src/frontend/tests/unit/operatorQueueResponse.spec.js deliberately does NOT pin the wipe (it asserts only the refetch) so this stays fixable.
Acceptance Criteria
After a 409/400 refusal the Operations feed shows a persistent, dismissible notice with the QUEUE_RESPONSE_NOT_RECORDED copy (an InlineError with its own headline — not the detail of the refresh-failed banner), and it survives the immediate refetch and the 10 s poll until dismissed
A transient refusal does not masquerade as a refresh failure (the refresh-failed banner appears only when a fetch actually failed)
The behavioural store test asserts the notice is observable after respondToItem on a 409 and a 400
No change to the respond payload or the agent write-back
Technical Notes
src/frontend/src/stores/operatorQueue.js — respondToItem catch branch, fetchItems (error.value = null at its start), error ref
src/frontend/src/views/Operations.vue — the queueRefreshFailedInlineError that renders operatorQueueStore.error as :detail
Partially addressed by #2378 (32ded859) — AC3 done, the presentation half remains
#2378 had to touch this issue's territory: it widened respondRefusedAsNotPending to cover 400 and 404 alongside 409, and those two statuses previously fell through to the generic apiErrorMessage branch and did leave a message. Routing them into the wipe branch without fixing the ordering would have widened this bug to two statuses that used to report — so the wipe is fixed there.
What is now done
The copy survives its own refetch.respondToItem awaits fetchItems() and assigns QUEUE_RESPONSE_NOT_RECORDED after it, instead of assigning first and calling it un-awaited.
AC3 — "the behavioural store test asserts the notice is observable after respondToItem on a 409 and a 400" — done, for 404 as well. The spec's old comment that deliberately left the wipe unpinned is gone. Mutation-checked: reverting the fix fails the assertions.
What remains for this issue
AC1 — the notice still has no channel of its own. It rides error, which Operations.vue renders only as the :detail of "Couldn't refresh the queue — showing the last items that loaded."
One detail this issue's body doesn't capture, worth knowing before scoping: InlineError puts detail inside a collapsed <details> disclosure labelled "Technical detail". So the operator sees a headline about refreshing and must expand a disclosure to discover their answer was not recorded. The copy reaching the DOM is not the same as the operator reading it.
The 15s poll still clears it — fetchItems nulls error on every tick, so the notice is transient even now.
AC2 — a refusal still masquerades as a refresh failure.
The lastRefusal-ref shape suggested in Technical Notes still looks right, and is now the only thing standing between this and done.
Verified behaviour, for whoever picks this up
Reproducing the refusal by hand is impossible and it costs time to find that out: POST /respond broadcasts operator_queue_responded, and the other tab's store marks the item responded locally, sub-second, so the card leaves openItems before anyone can click. The way to drive it is to resolve the item directly in the DB — no broadcast, so the open tab still shows it pending — then answer it. Against the running stack, same scenario twice:
Activity
fix(ui): the not-recorded copy survives its own refetch, the stale-fe…
webmixgamer commentedon Aug 24, 2026
Partially addressed by #2378 (
32ded859) — AC3 done, the presentation half remains#2378 had to touch this issue's territory: it widened
respondRefusedAsNotPendingto cover 400 and 404 alongside 409, and those two statuses previously fell through to the genericapiErrorMessagebranch and did leave a message. Routing them into the wipe branch without fixing the ordering would have widened this bug to two statuses that used to report — so the wipe is fixed there.What is now done
respondToItemawaitsfetchItems()and assignsQUEUE_RESPONSE_NOT_RECORDEDafter it, instead of assigning first and calling it un-awaited.respondToItemon a 409 and a 400" — done, for 404 as well. The spec's old comment that deliberately left the wipe unpinned is gone. Mutation-checked: reverting the fix fails the assertions.What remains for this issue
error, whichOperations.vuerenders only as the:detailof "Couldn't refresh the queue — showing the last items that loaded."InlineErrorputsdetailinside a collapsed<details>disclosure labelled "Technical detail". So the operator sees a headline about refreshing and must expand a disclosure to discover their answer was not recorded. The copy reaching the DOM is not the same as the operator reading it.fetchItemsnullserroron every tick, so the notice is transient even now.The
lastRefusal-ref shape suggested in Technical Notes still looks right, and is now the only thing standing between this and done.Verified behaviour, for whoever picks this up
Reproducing the refusal by hand is impossible and it costs time to find that out:
POST /respondbroadcastsoperator_queue_responded, and the other tab's store marks the item responded locally, sub-second, so the card leavesopenItemsbefore anyone can click. The way to drive it is to resolve the item directly in the DB — no broadcast, so the open tab still shows it pending — then answer it. Against the running stack, same scenario twice:🤖 Generated with Claude Code
fix(ui): the not-recorded copy survives its own refetch, the stale-fe…
fix(ui): /m approval card sends the tapped option as the decision — s…