Persistence, History, and Recovery
Browser storage
The browser uses exactly these current localStorage keys:
| Key | Role |
|---|---|
svnm.svg-animator.project.v3 | Primary canonical autosave |
svnm.svg-animator.import-recovery | Versioned exceptional-recovery envelope for malformed autosave and failed import |
svnm.svg-animator.ui.v3 | UI-only zoom, auto-key, preview, rail, folds, timeline height, and cue state |
(studio.js:19-23, docs/ARCHITECTURE.md:48-62)
Storage denial is fail-soft: the editor starts with safe defaults or announces save/recovery failure. Valid autosave restoration stays separate from exceptional raw evidence. Each exceptional source can be downloaded or cleared independently, and dismissal alone does not erase it. Project-file v2 parsing is an engine import capability and does not add a browser-storage key. (docs/ARCHITECTURE.md:50-62, engine.js:4573-4660)
Immutable revisions
ProjectHistory clones the initial project and keeps bounded before/after snapshots. New mutations truncate the redo tail, merge compatible rapid edits, and enforce the history bound. Transactions gather intermediate gesture updates into one revision and save outcome. (project-history.js:61-81, project-history.js:141-205, project-history.js:239-272)
Binary assets
IndexedDB database svnm-storyboard-assets uses separate image and audio stores. Cache identities are deterministic; admission, quota accounting, and eviction are transactional and bounded. Cache failure cannot make the editor unusable or become an SVG-export input. (asset-cache.js:7-17, asset-cache.js:48-99)