Confirm offline work only after durable background admission #264

Closed
opened 2026-08-08 05:02:57 +00:00 by timmy · 0 comments
Owner

Problem

The issue and authored-message outboxes return success immediately after writing localStorage, while their IndexedDB mirror and Background Sync registration run asynchronously. If the installed app closes after “Queued for sync” but before that async work commits, closed-app delivery was promised without a durable service-worker record.

Slice

Make queue admission awaitable. Keep drafts and show a saving state until IndexedDB admission completes; confirm background delivery only after durable persistence and sync registration. On unavailable background delivery, preserve the foreground queue and report the degraded guarantee truthfully.

Acceptance criteria

  • Blocking IndexedDB admission prevents a success confirmation and retains the draft.
  • Successful durable admission clears the draft and reports queued-for-sync only after commit.
  • Admission or sync failure preserves foreground retry data and reports background delivery unavailable.
  • Issue and authored-message flows retain account binding, idempotency, and cross-tab behavior.
  • Focused and full test suites pass.
## Problem The issue and authored-message outboxes return success immediately after writing localStorage, while their IndexedDB mirror and Background Sync registration run asynchronously. If the installed app closes after “Queued for sync” but before that async work commits, closed-app delivery was promised without a durable service-worker record. ## Slice Make queue admission awaitable. Keep drafts and show a saving state until IndexedDB admission completes; confirm background delivery only after durable persistence and sync registration. On unavailable background delivery, preserve the foreground queue and report the degraded guarantee truthfully. ## Acceptance criteria - Blocking IndexedDB admission prevents a success confirmation and retains the draft. - Successful durable admission clears the draft and reports queued-for-sync only after commit. - Admission or sync failure preserves foreground retry data and reports background delivery unavailable. - Issue and authored-message flows retain account binding, idempotency, and cross-tab behavior. - Focused and full test suites pass.
timmy self-assigned this 2026-08-08 05:02:57 +00:00
timmy closed this issue 2026-08-08 05:11:21 +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#264
No description provided.