Persistence, History, and Recovery
Browser storage
Compatibility requires preserving these keys:
| Key | Role |
|---|---|
moincraft.svg-animator.project.v3 | Primary canonical autosave |
moincraft.svg-animator.legacy-recovery | Untouched source retained before legacy migration |
moincraft.svg-animator.import-recovery | Versioned exceptional-recovery envelope for malformed autosave and failed import |
moincraft.svg-animator.ui.v3 | UI-only zoom, auto-key, preview, rail, folds, timeline height, and cue state |
(studio.js:19-24, docs/ARCHITECTURE.md:48-59)
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. (docs/ARCHITECTURE.md:54-61)
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 moincraft-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, SVG-Animator-BIBLE.md:234-242)