Keep mobile delivery recovery single-flight until retry settles #1016

Closed
opened 2026-08-17 09:50:52 +00:00 by rockachopa · 0 comments
Member

Problem

The guided mobile Delivery flow delegates Retry/Authorize to a synthetic hidden-card click and awaits only a microtask. The recovery action becomes enabled and clears Working… while the actual outbox mutation can still be in flight, allowing duplicate taps and false completion state.

Evidence: frontend/mobile-delivery-recovery.js defaultActivate() calls action.click(); await Promise.resolve(), while the real async retry is owned by handlers in frontend/dashboard.js. Existing tests inject a direct synchronous callback and do not exercise this production boundary. Historical issue/release/title and recent-commit scans found guided recovery (#1012/#1014) but no settled single-flight behavior.

Acceptance

  • One directly awaited recovery operation owns each retry/authorization attempt.
  • While unresolved, the primary action remains disabled with truthful progress; repeated activation dispatches exactly one operation.
  • Success advances to the next queued delivery or completes the flow.
  • Failure retains the current delivery with actionable status and allows retry only after settlement.
  • Focused behavioral tests prove the in-flight lock before implementation and the full suite stays green.
  • The assembled phone release journey gates this behavior in CI.
## Problem The guided mobile Delivery flow delegates Retry/Authorize to a synthetic hidden-card click and awaits only a microtask. The recovery action becomes enabled and clears `Working…` while the actual outbox mutation can still be in flight, allowing duplicate taps and false completion state. Evidence: `frontend/mobile-delivery-recovery.js` `defaultActivate()` calls `action.click(); await Promise.resolve()`, while the real async retry is owned by handlers in `frontend/dashboard.js`. Existing tests inject a direct synchronous callback and do not exercise this production boundary. Historical issue/release/title and recent-commit scans found guided recovery (#1012/#1014) but no settled single-flight behavior. ## Acceptance - One directly awaited recovery operation owns each retry/authorization attempt. - While unresolved, the primary action remains disabled with truthful progress; repeated activation dispatches exactly one operation. - Success advances to the next queued delivery or completes the flow. - Failure retains the current delivery with actionable status and allows retry only after settlement. - Focused behavioral tests prove the in-flight lock before implementation and the full suite stays green. - The assembled phone release journey gates this behavior in CI.
timmy was assigned by rockachopa 2026-08-17 09:50:52 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#1016
No description provided.