Make mobile queue priority converge after transient failures and foregrounding #1466

Closed
opened 2026-08-27 10:23:11 +00:00 by timmy · 0 comments
Owner

User problem

Personalized mobile queue order sync currently sends the first edit immediately, can require multiple PUTs for a quick reorder burst, and leaves an online HTTP failure pending indefinitely unless another edit or connectivity event occurs. An already-open second phone also does not discover remote changes when foregrounded.

Vertical slice

Deliver a self-healing account-scoped queue-priority flow: coalesce rapid edits, retry transient failures with bounded backoff, synchronize on reconnect, and hydrate remote order when a clean device returns to the foreground. Preserve the existing explicit 409 conflict choices and prevent stale work crossing an identity switch.

Acceptance tests

  • Four rapid reorder edits publish the latest complete order with one PUT after the debounce window.
  • A transient 503 remains visibly pending, retries without another edit/connectivity event, and settles after success.
  • A clean already-open device reloads remote priority on foreground.
  • Pending timers and in-flight results cannot write/render another account's order.
  • Existing 409 Keep this device / Use other device behavior remains intact.
  • Focused behavioral tests and the full suite pass; packaged browser journeys remain green.

Evidence / non-duplication

At origin/main c5b8014, frontend/mobile-queue-priority.js starts sync from every dashboard onChange, but non-409 failures only restore pending and schedule no retry. frontend/dashboard.js only retries on online; its foreground listener refreshes work but not queue priority. Historical tracker review found related delivered issues #1450/#1458/#1460/#1464, but none covering debounce, transient-online retry, or foreground convergence. Open issues and PR #1282 are unrelated.

## User problem Personalized mobile queue order sync currently sends the first edit immediately, can require multiple PUTs for a quick reorder burst, and leaves an online HTTP failure pending indefinitely unless another edit or connectivity event occurs. An already-open second phone also does not discover remote changes when foregrounded. ## Vertical slice Deliver a self-healing account-scoped queue-priority flow: coalesce rapid edits, retry transient failures with bounded backoff, synchronize on reconnect, and hydrate remote order when a clean device returns to the foreground. Preserve the existing explicit 409 conflict choices and prevent stale work crossing an identity switch. ## Acceptance tests - Four rapid reorder edits publish the latest complete order with one PUT after the debounce window. - A transient 503 remains visibly pending, retries without another edit/connectivity event, and settles after success. - A clean already-open device reloads remote priority on foreground. - Pending timers and in-flight results cannot write/render another account's order. - Existing 409 Keep this device / Use other device behavior remains intact. - Focused behavioral tests and the full suite pass; packaged browser journeys remain green. ## Evidence / non-duplication At `origin/main` c5b8014, `frontend/mobile-queue-priority.js` starts sync from every dashboard `onChange`, but non-409 failures only restore `pending` and schedule no retry. `frontend/dashboard.js` only retries on `online`; its foreground listener refreshes work but not queue priority. Historical tracker review found related delivered issues #1450/#1458/#1460/#1464, but none covering debounce, transient-online retry, or foreground convergence. Open issues and PR #1282 are unrelated.
timmy self-assigned this 2026-08-27 10:23:11 +00:00
timmy closed this issue 2026-08-27 10:43:44 +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#1466
No description provided.