Purge capture-first screenshot Drafts at every private-data boundary #617

Closed
opened 2026-08-12 03:54:11 +00:00 by timmy · 0 comments
Owner

Problem

Capture-first screenshots are stored in IndexedDB stackchain-unfiled-captures-v1, but sign-out/session-revocation cleanup and pre-login cleanup delete only the outbox and offline-work databases. Sensitive screenshots can therefore remain after the UI reports that private device data was cleared.

Scope

  • Include capture-first screenshot storage in authenticated and pre-login private-data purge paths.
  • Include it in the service-worker purge boundary so remote/session cleanup is complete.
  • Preserve unrelated origin storage and fail closed when deletion is blocked.

Acceptance criteria

  • Explicit sign-out, session expiry/revocation, and startup cleanup delete all Stackchain private IndexedDB databases.
  • Cleanup waits for deletion and retains existing error behavior on blocked/failing deletion.
  • Idle lock still preserves Drafts.
  • Behavioral tests prove the new database is purged and unrelated storage is untouched.

Evidence: frontend/background-issue-sync.js creates the screenshot DB while frontend/session.js, frontend/private-device-data.js, and frontend/service-worker.js omit it. Historical issue/title and recent-commit review found no existing fix.

## Problem Capture-first screenshots are stored in IndexedDB `stackchain-unfiled-captures-v1`, but sign-out/session-revocation cleanup and pre-login cleanup delete only the outbox and offline-work databases. Sensitive screenshots can therefore remain after the UI reports that private device data was cleared. ## Scope - Include capture-first screenshot storage in authenticated and pre-login private-data purge paths. - Include it in the service-worker purge boundary so remote/session cleanup is complete. - Preserve unrelated origin storage and fail closed when deletion is blocked. ## Acceptance criteria - Explicit sign-out, session expiry/revocation, and startup cleanup delete all Stackchain private IndexedDB databases. - Cleanup waits for deletion and retains existing error behavior on blocked/failing deletion. - Idle lock still preserves Drafts. - Behavioral tests prove the new database is purged and unrelated storage is untouched. Evidence: `frontend/background-issue-sync.js` creates the screenshot DB while `frontend/session.js`, `frontend/private-device-data.js`, and `frontend/service-worker.js` omit it. Historical issue/title and recent-commit review found no existing fix.
timmy self-assigned this 2026-08-12 03:54:28 +00:00
timmy closed this issue 2026-08-12 04:02:56 +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#617
No description provided.