Add ?reset=1 route that wipes secret-flagged data #19

Closed
opened 2026-11-24 01:21:12 +00:00 by eric · 0 comments
Owner

Why: The owner wants to work on the app online (layout, structure edits) without real secrets in the page, so there is less chance of compromise.

Proposed behavior

  • Opening final-wishes.html?reset=1 (also accept #reset=1, since query strings don't apply to file:// URLs in every browser) starts a reset flow.
  • After unlock, every field with secret: true has its value cleared, and so does every sequence frame with secret: true. Image fields are cleared too. Labels, structure and non-secret data stay.
  • The app asks for confirmation first ("This will erase N secret values. Continue?"), then shows a status line after the wipe.
  • Nothing is written until the owner saves. The UI should suggest saving under a new name or making a backup first, so the original file isn't overwritten by accident.
  • The wipe is a pure function in src/ops.js (e.g. clearSecrets(doc), returning a count). It can reuse the secret count from src/print.js, and it needs tests.

Open questions

  • Should wiped fields show a placeholder such as "(removed)", or stay blank?
  • Does reset need a passphrase? Probably yes, since the data is encrypted and the wipe needs the decrypted document.
**Why:** The owner wants to work on the app online (layout, structure edits) without real secrets in the page, so there is less chance of compromise. **Proposed behavior** - Opening `final-wishes.html?reset=1` (also accept `#reset=1`, since query strings don't apply to `file://` URLs in every browser) starts a reset flow. - After unlock, every field with `secret: true` has its value cleared, and so does every sequence frame with `secret: true`. Image fields are cleared too. Labels, structure and non-secret data stay. - The app asks for confirmation first ("This will erase N secret values. Continue?"), then shows a status line after the wipe. - Nothing is written until the owner saves. The UI should suggest saving under a new name or making a backup first, so the original file isn't overwritten by accident. - The wipe is a pure function in `src/ops.js` (e.g. `clearSecrets(doc)`, returning a count). It can reuse the secret count from `src/print.js`, and it needs tests. **Open questions** - Should wiped fields show a placeholder such as "(removed)", or stay blank? - Does reset need a passphrase? Probably yes, since the data is encrypted and the wipe needs the decrypted document.
eric closed this issue 2026-11-24 02:32:08 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eric/final-wishes#19
No description provided.