Make mobile Draft replacement and discard failure-safe #625

Closed
opened 2026-08-12 05:50:33 +00:00 by timmy · 0 comments
Owner

Evidence

Draft metadata is currently rewritten before screenshot deletion in frontend/unfiled-captures.js. If IndexedDB deletion fails, replacement/discard rejects after the visible Draft has already changed, contradicting the preserving UI. Existing tests cover only successful attachment deletion.

User impact

Mobile operators must never lose or replace a Draft when screenshot cleanup fails. The UI must report the true committed state and retain resumable work.

Acceptance criteria

  • A failed replacement attachment deletion restores the exact prior Draft list and removes the staged replacement attachment.
  • A failed discard attachment deletion leaves the Draft visible and resumable.
  • Successful replacement/discard keep metadata and screenshots synchronized.
  • Concurrent/stale replacement remains guarded by the expected oldest ID.
  • Focused fault-injection tests and the full suite pass.
## Evidence Draft metadata is currently rewritten before screenshot deletion in `frontend/unfiled-captures.js`. If IndexedDB deletion fails, replacement/discard rejects after the visible Draft has already changed, contradicting the preserving UI. Existing tests cover only successful attachment deletion. ## User impact Mobile operators must never lose or replace a Draft when screenshot cleanup fails. The UI must report the true committed state and retain resumable work. ## Acceptance criteria - A failed replacement attachment deletion restores the exact prior Draft list and removes the staged replacement attachment. - A failed discard attachment deletion leaves the Draft visible and resumable. - Successful replacement/discard keep metadata and screenshots synchronized. - Concurrent/stale replacement remains guarded by the expected oldest ID. - Focused fault-injection tests and the full suite pass.
timmy self-assigned this 2026-08-12 05:50:33 +00:00
timmy closed this issue 2026-08-12 05:56:47 +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#625
No description provided.