Queue screenshot comments for offline delivery #477

Closed
opened 2026-08-10 10:49:40 +00:00 by timmy · 0 comments
Owner

Problem

Assigned-issue screenshot comments upload before the authored outbox is reached. Offline or retryable upload failures therefore preserve the composer but cannot enter the durable background queue, unlike text comments and screenshot-bearing new issue captures.

Evidence on origin/main (ec339d2): frontend/dashboard.js calls prepareComment() before enqueueDurably(); frontend/authored-outbox.js persists body-only authored records; frontend/background-issue-sync.js stages attachments only for new issue captures. Historical issue/title and recent-commit review found no existing offline screenshot-comment delivery slice.

User flow

On mobile, an operator can attach PNG/JPEG/WebP to an assigned issue comment while offline, durably admit text plus image, and continue. Reconnect uploads the image with a stable stage key, checkpoints Markdown, then posts exactly one combined comment. Admission failure preserves the composer, preview, and Today position.

Acceptance criteria

  • Screenshot bytes are admitted to IndexedDB before queued confirmation; localStorage contains metadata only.
  • Background/foreground delivery uploads once, checkpoints Markdown, then posts one text+image comment using stable per-stage idempotency keys.
  • Retry after confirmed upload does not upload again.
  • Offline Comment & next advances only after durable admission; failed admission leaves Today unchanged.
  • Records remain account-bound and private-data purge removes queued bytes.
  • Text-only and online comment behavior remain unchanged.
  • Behavioral tests cover durable admission, staged retry, and UI ordering; full suite passes.
## Problem Assigned-issue screenshot comments upload before the authored outbox is reached. Offline or retryable upload failures therefore preserve the composer but cannot enter the durable background queue, unlike text comments and screenshot-bearing new issue captures. Evidence on `origin/main` (`ec339d2`): `frontend/dashboard.js` calls `prepareComment()` before `enqueueDurably()`; `frontend/authored-outbox.js` persists body-only authored records; `frontend/background-issue-sync.js` stages attachments only for new issue captures. Historical issue/title and recent-commit review found no existing offline screenshot-comment delivery slice. ## User flow On mobile, an operator can attach PNG/JPEG/WebP to an assigned issue comment while offline, durably admit text plus image, and continue. Reconnect uploads the image with a stable stage key, checkpoints Markdown, then posts exactly one combined comment. Admission failure preserves the composer, preview, and Today position. ## Acceptance criteria - Screenshot bytes are admitted to IndexedDB before queued confirmation; localStorage contains metadata only. - Background/foreground delivery uploads once, checkpoints Markdown, then posts one text+image comment using stable per-stage idempotency keys. - Retry after confirmed upload does not upload again. - Offline Comment & next advances only after durable admission; failed admission leaves Today unchanged. - Records remain account-bound and private-data purge removes queued bytes. - Text-only and online comment behavior remain unchanged. - Behavioral tests cover durable admission, staged retry, and UI ordering; full suite passes.
timmy self-assigned this 2026-08-10 10:49:40 +00:00
timmy closed this issue 2026-08-10 10:57: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#477
No description provided.