diff options
| author | cashmere <cashmere@autistici.org> | 2026-07-27 01:21:20 +0200 |
|---|---|---|
| committer | cashmere <cashmere@autistici.org> | 2026-07-27 01:21:20 +0200 |
| commit | d55d2583a71ae35fa8d0d1bfbec975e67e66aafa (patch) | |
| tree | c7a612f24b12c8602d7fbf139ac2709e4f2f4d9c /notes | |
| parent | 2a372fdec256b8be890e181c221c2a012ead9efa (diff) | |
| download | opencut-d55d2583a71ae35fa8d0d1bfbec975e67e66aafa.tar.gz | |
feat: git-like project versioning (v1)
Linear per-project history per notes/project-versioning.md: named
checkpoints (thumbnail via renderer.captureFrame) plus auto-checkpoints
on save (60s throttle, ring of 20, named never rotate). Restore writes a
safety checkpoint first, then swaps the document outside undo/redo.
Media assets referenced by any version are pinned against deletion.
Migration v31-v32 stamps the schema; the version store lives in its own
IDB database with an in-memory fallback for tests. Versions popover in
the editor header for jump/rename/delete. 12 new tests.
Diffstat (limited to 'notes')
| -rw-r--r-- | notes/project-versioning.md | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/notes/project-versioning.md b/notes/project-versioning.md index 607e4501..bf7b5c69 100644 --- a/notes/project-versioning.md +++ b/notes/project-versioning.md @@ -45,21 +45,21 @@ position stays reachable. - Ring buffer: keep the newest **20** auto versions per project; older auto versions are deleted on write. Named versions never rotate. -### Media storage +### Media storage (revised for v1) -Snapshots share media, they don't copy it. Media blobs move to a -**content-addressed store**: `mediaBlobs: { hash, blob }` with -`MediaAsset` records referencing hashes. A blob is collected only when no -project document and no version snapshot references it. This keeps 50 -snapshots of a project with one 200 MB video at ~one video's cost. +v1 keeps the existing per-project media store as-is: snapshots store the +`SerializedProject` and reference media by asset id. Deleting a media asset +is blocked (or the delete cascades a warning) while any version of the +project still references it, so a restore can never hit a missing blob. +Content-addressed blob dedup across snapshots is deferred to v2 — it is a +media-storage rework that would collide with concurrent export/voice-over +work for little practical gain at snapshot counts we expect. ## Storage layer -New versioned migration (next schema version after current v31) adding two -stores: `projectVersions` and `mediaBlobs`. Follow the existing per-version -migration pattern and its 18-test fixture suite -(`services/storage/migrations/__tests__/`). Existing per-project media -records get re-pointed at hashed blobs by the migration. +New versioned migration (v31→v32; v31 is current) adding one store: +`projectVersions`. Follow the existing per-version migration pattern and its +18-test fixture suite (`services/storage/migrations/__tests__/`). ## Surfaces (all via the actions system, per repo conventions) |
