Skip to content

feat: persist active project in IndexedDB#53

Merged
britle20 merged 1 commit into
developfrom
feat/47-indexeddb-project-persistence
Jun 14, 2026
Merged

feat: persist active project in IndexedDB#53
britle20 merged 1 commit into
developfrom
feat/47-indexeddb-project-persistence

Conversation

@britle20

Copy link
Copy Markdown
Collaborator

Summary

  • Adds an IndexedDB-backed project store with a versioned active project document and a separate imported sample blob store.
  • Restores project state on startup and debounces autosave for clips, arrangement placement, tempo, loop range, and mixer state.
  • Rebuilds imported audio runtime buffers from stored blobs on demand instead of storing runtime objects in project JSON.
  • Adds a minimal transport-bar save status and updates the IndexedDB project persistence #47 feature spec/docs.

Changes

  • New persistence helpers in src/persistence/project-store.ts.
  • App-level restore/autosave wiring and imported audio blob persistence.
  • Audio engine importSampleBlob API for restoring imported samples from IndexedDB blobs.
  • Unit coverage for versioned project document helpers and imported sample ID extraction.

Testing

  • npm run typecheck --if-present: pass
  • npm run lint --if-present: pass
  • npm run test --if-present: pass, 13 files / 77 tests
  • npm run build --if-present: pass
  • npm run dev -- --host 127.0.0.1 --port 5173: started on 5174 because 5173 was occupied; curl -I http://127.0.0.1:5174/ returned 200 OK

Notes / Limitations

  • Browser-level manual refresh verification still needs user review because I cannot interact with IndexedDB through the running UI here.
  • This stores one active local project only; multi-project management and cloud sync remain out of scope.
  • Imported sample bytes are stored as IndexedDB blobs keyed by sampleId; AudioBuffer, File, object URL, and decoded runtime objects remain outside project JSON.

Closes #47

@britle20 britle20 merged commit 7dae7a7 into develop Jun 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant