Use binary screenshot storage and upload end to end #491

Closed
opened 2026-08-10 14:50:00 +00:00 by timmy · 0 comments
Owner

User problem

Screenshot capture currently expands every image by about 33% by encoding it as base64 in JSON before storing and uploading it. On mobile this wastes IndexedDB quota, metered bandwidth, battery, and server memory across both online and offline delivery.

Scope

  • Persist newly captured screenshots as Blob records in IndexedDB.
  • Upload screenshots as multipart binary requests online and from the background outbox.
  • Preserve delivery of legacy base64 queue records.
  • Keep MIME/signature validation, the 2 MiB binary limit, idempotency, claim fencing, and upload checkpoints.

Acceptance

  • A 2 MiB screenshot travels with only multipart framing overhead, not base64 expansion.
  • Online comments and offline new-issue/comment queues deliver binary screenshots exactly once.
  • Existing base64 queue records remain deliverable.
  • 2 MiB is accepted and 2 MiB + 1 byte is rejected before Gitea upload.
  • Focused and full tests pass.

This is distinct from #467-#477, which added screenshot UX, offline storage, editing, and retry safety but retained base64 transport.

## User problem Screenshot capture currently expands every image by about 33% by encoding it as base64 in JSON before storing and uploading it. On mobile this wastes IndexedDB quota, metered bandwidth, battery, and server memory across both online and offline delivery. ## Scope - Persist newly captured screenshots as Blob records in IndexedDB. - Upload screenshots as multipart binary requests online and from the background outbox. - Preserve delivery of legacy base64 queue records. - Keep MIME/signature validation, the 2 MiB binary limit, idempotency, claim fencing, and upload checkpoints. ## Acceptance - A 2 MiB screenshot travels with only multipart framing overhead, not base64 expansion. - Online comments and offline new-issue/comment queues deliver binary screenshots exactly once. - Existing base64 queue records remain deliverable. - 2 MiB is accepted and 2 MiB + 1 byte is rejected before Gitea upload. - Focused and full tests pass. This is distinct from #467-#477, which added screenshot UX, offline storage, editing, and retry safety but retained base64 transport.
timmy self-assigned this 2026-08-10 14:50:00 +00:00
timmy closed this issue 2026-08-10 15:06:08 +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#491
No description provided.