fix: a popup already open when storage becomes unreadable keeps rendering the stale profile #373

Closed
opened 2026-08-23 21:06:25 +02:00 by clawbot · 1 comment
Collaborator

Found by a deployability verification of next at 75a5fa9, observed in a real browser.

If storage becomes unreadable while the popup is already open, the popup keeps rendering the stale profile — view-main with the old balance — instead of moving to the recovery screen added by #311. Reopening the popup recovers correctly.

Benign as it stands: nothing can be signed without a password, and the stale view is read-only. But it is the #311 family — the recovery screen exists precisely so the user is never left looking at something untrue about their wallet, and here they are, until they happen to reopen.

Not in milestone 1.0.0: it requires storage to fail underneath a live popup, and the failure is read-only and self-correcting on reopen.

Definition of done

  • A popup that discovers unreadable state while open moves to the recovery screen rather than continuing to render the last good profile.
  • It must not thrash: a transient read failure should not flap the user between views.
  • Test: corrupt storage under an open popup and assert the view changes. Fails against current head — state the mutation and observed result.
  • make check green.
Found by a deployability verification of `next` at `75a5fa9`, observed in a real browser. If storage becomes unreadable **while the popup is already open**, the popup keeps rendering the stale profile — `view-main` with the old balance — instead of moving to the recovery screen added by https://git.eeqj.de/sneak/AutistMask/issues/311. Reopening the popup recovers correctly. Benign as it stands: nothing can be signed without a password, and the stale view is read-only. But it is the https://git.eeqj.de/sneak/AutistMask/issues/311 family — the recovery screen exists precisely so the user is never left looking at something untrue about their wallet, and here they are, until they happen to reopen. Not in milestone 1.0.0: it requires storage to fail underneath a live popup, and the failure is read-only and self-correcting on reopen. ## Definition of done - [ ] A popup that discovers unreadable state while open moves to the recovery screen rather than continuing to render the last good profile. - [ ] It must not thrash: a transient read failure should not flap the user between views. - [ ] Test: corrupt storage under an open popup and assert the view changes. Fails against current head — state the mutation and observed result. - [ ] `make check` green.
Author
Collaborator

Built in #439.

An open popup now moves to the recovery screen when a save finds the stored record failing the same check the popup runs at open; every save reads the record first, so it is found at the next navigation or ten-second refresh. A storage read or write that merely errors keeps the "NOT SAVED" banner and does not change the screen, and nothing writes over a record that fails the check, so the switch is one-way and cannot flap.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/AutistMask/pulls/439. An open popup now moves to the recovery screen when a save finds the stored record failing the same check the popup runs at open; every save reads the record first, so it is found at the next navigation or ten-second refresh. A storage read or write that merely errors keeps the "NOT SAVED" banner and does not change the screen, and nothing writes over a record that fails the check, so the switch is one-way and cannot flap. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#373