We currently autosave full graph payloads into localStorage. This is brittle for larger workflows and can silently drop history when storage writes fail. Session restore is also partial (open tabs/active tab/file metadata are not reliably recovered).
I’d like to move persistence persistence to IndexedDB as the primary store for graph snapshots and workspace session state, with a one-time migration from existing localStorage data.
Scope,
- add a storage layer for graphs/session/meta (versioned schema)
- migrate old localStorage entries on first run
- wire autosave/load to new storage
- keep app usable if one entry is corrupted (skip bad record, continue)
- keep fallback behavior sane when IndexedDB is unavailable
- stop silent history loss behavior during normal saves
- add automated tests for migration, session restore, corrupted-record skip, and IndexedDB-unavailable fallback
- add docs for storage schema, migration flow, fallback behavior, and manual verification steps
Acceptance criteria,
- reload restores previously open graphs + active tab
- large graphs save/load reliably without quota-related loss
- existing users are migrated automatically
- corrupted single record does not block full workspace load