Deliver queued authored messages after the app closes #252

Closed
opened 2026-08-08 02:08:01 +00:00 by rockachopa · 0 comments
Member

User problem

Offline issue comments, pull-request comments, and notification replies are persisted only in localStorage and flush only while a dashboard page is open. The installed PWA already delivers queued issue captures after all clients close, so authored replies have a surprising reliability gap.

Vertical slice

  • Mirror authored-message records into the existing account-bound IndexedDB outbox.
  • Route all three authored message kinds through the Background Sync worker with their original idempotency keys.
  • Atomically claim records so foreground reconnect and worker delivery cannot double-post.
  • Reconcile sent/permanent-failure tombstones into Drafts after reopening.
  • Keep the current foreground-only fallback when Background Sync is unavailable.

Acceptance

  1. Each authored kind queued offline can deliver after all clients close.
  2. Delivery uses the correct endpoint, body, owner login, and Idempotency-Key.
  3. Foreground/worker races produce one mutation.
  4. Transient failures release for retry; permanent 4xx records return as Drafts attention.
  5. Cross-account records never send.
  6. Focused and full tests pass.

Non-duplication evidence

Closed #234 added foreground reconnect delivery for authored messages; closed #250 added closed-app delivery only for issue captures. No open or historical issue implements authored-message Background Sync.

## User problem Offline issue comments, pull-request comments, and notification replies are persisted only in localStorage and flush only while a dashboard page is open. The installed PWA already delivers queued issue captures after all clients close, so authored replies have a surprising reliability gap. ## Vertical slice - Mirror authored-message records into the existing account-bound IndexedDB outbox. - Route all three authored message kinds through the Background Sync worker with their original idempotency keys. - Atomically claim records so foreground reconnect and worker delivery cannot double-post. - Reconcile sent/permanent-failure tombstones into Drafts after reopening. - Keep the current foreground-only fallback when Background Sync is unavailable. ## Acceptance 1. Each authored kind queued offline can deliver after all clients close. 2. Delivery uses the correct endpoint, body, owner login, and Idempotency-Key. 3. Foreground/worker races produce one mutation. 4. Transient failures release for retry; permanent 4xx records return as Drafts attention. 5. Cross-account records never send. 6. Focused and full tests pass. ## Non-duplication evidence Closed #234 added foreground reconnect delivery for authored messages; closed #250 added closed-app delivery only for issue captures. No open or historical issue implements authored-message Background Sync.
timmy was assigned by rockachopa 2026-08-08 02:08:01 +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#252
No description provided.