Prevent one-tap loss of IndexedDB-only private work #1000

Closed
opened 2026-08-17 04:29:36 +00:00 by timmy · 0 comments
Owner

Problem

The Private device storage panel counts only stackchain.* Web Storage keys when deciding whether to require confirmation. A phone with queued issues, offline work, unfiled captures, voice transcripts, or reply/photo drafts stored only in IndexedDB can therefore erase that work on the first press. The panel also reports database registrations rather than records.

User flow

Inventory registered private databases without reading content into the UI, report a bounded private-work record count, and conservatively require a second explicit confirmation whenever records exist or inventory cannot be completed. Empty databases must not be described as stored work. Cache-only cleanup remains independent.

Acceptance criteria

  • IndexedDB-only records arm confirmation instead of invoking purge on the first press.
  • Empty registered databases report zero private-work records.
  • Inventory failures/unsupported access display an unknown state and still require confirmation.
  • The UI reports record counts, not the number of registered database names.
  • Existing cache-only cleanup and blocked-deletion behavior remain correct.
  • Behavioral tests cover populated, empty, and unavailable inventories.

Non-duplication evidence

Issue #998/#999 introduced the storage panel, but commit 70c8ea6 gates confirmation solely on Web Storage count (frontend/device-storage.js:44-50,68). No open issue or recent commit covers content-aware IndexedDB inventory or this acceptance gap.

## Problem The Private device storage panel counts only `stackchain.*` Web Storage keys when deciding whether to require confirmation. A phone with queued issues, offline work, unfiled captures, voice transcripts, or reply/photo drafts stored only in IndexedDB can therefore erase that work on the first press. The panel also reports database registrations rather than records. ## User flow Inventory registered private databases without reading content into the UI, report a bounded private-work record count, and conservatively require a second explicit confirmation whenever records exist or inventory cannot be completed. Empty databases must not be described as stored work. Cache-only cleanup remains independent. ## Acceptance criteria - IndexedDB-only records arm confirmation instead of invoking purge on the first press. - Empty registered databases report zero private-work records. - Inventory failures/unsupported access display an unknown state and still require confirmation. - The UI reports record counts, not the number of registered database names. - Existing cache-only cleanup and blocked-deletion behavior remain correct. - Behavioral tests cover populated, empty, and unavailable inventories. ## Non-duplication evidence Issue #998/#999 introduced the storage panel, but commit `70c8ea6` gates confirmation solely on Web Storage count (`frontend/device-storage.js:44-50,68`). No open issue or recent commit covers content-aware IndexedDB inventory or this acceptance gap.
timmy self-assigned this 2026-08-17 04:29:36 +00:00
timmy closed this issue 2026-08-17 04:45:02 +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#1000
No description provided.