#523 The editor trusts only a list of hashes in its stored dismissals
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#523
- pull request
- state:merged
Closes #512. The capacity notice's dismissals are kept in `localStorage`, which other pages of the same origin can read and write. In some browsers that's every `file://` page. **Changes:** - **Reading:** `capacityDismissed()` reads only a list of strings. A value that's anything else counts as no dismissals. Before, a non-list value made every redraw fail. - **Storing:** dismissals are kept as short hashes (FNV-1a) of the timeline and its advice, so a timeline's title or file path is no longer written there. An earlier dismissal won't match its hash, so its notice shows once more. **Tests:** `capacity-browser.mjs` checks that only hashes are stored, and that a non-list value written by another page leaves the editor working and the notice showing again. It runs in CI; this machine has no browser. Typecheck and unit tests pass here. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/pull/523
Related
Open #523 The editor trusts only a list of hashes in its stored dismissals in the timeline