Project file lifecycle #25

Closed
opened 2026-10-07 07:34:13 +00:00 by crowmaki · 0 comments
Owner

Parent

#24

What to build

The tracer bullet for the whole app. A filmmaker can create a new Project, close it, and open it again from a .studio file. This ticket sets up the Cargo workspace with a thick studio-core crate (no Tauri) and a thin src-tauri adapter over taurpc. ProjectSession is the public API and the test seam. A minimal SvelteKit screen offers New / Open and shows the Project's title and aspect ratio. Follows ADR-0001 and ADR-0003, and spec section "Project file". This ticket writes the DDL for the tables it creates.

Acceptance criteria

  • studio-core crate exists with a ProjectSession that creates, opens and closes a .studio SQLite file with a fixed application_id; src-tauri only maps DTOs and wraps commands that return a typed error enum
  • Migrations use PRAGMA user_version, are embedded in the core, and run in one transaction after copying the file to <name>.studio.bak-v<N>
  • A file made by a newer schema is refused with a clear error
  • The file runs in WAL while open; a clean close checkpoints and switches to journal_mode=DELETE, leaving a single file at rest
  • A <name>.studio.lock file with PID and host stops a second running instance from opening the same Project
  • A sibling <name>.media/ folder is created; ULID keys and the content-addressed blob table (BLAKE3, media type, size, pixel dimensions) exist, with an unused-blob sweep on open
  • App-wide defaults live in a JSON file in the app config directory, are copied into the singleton project row and list tables at creation, and are never read again by that Project
  • The Project's aspect ratio can be set from the fixed list and changed later
  • The UI can create and open a Project and shows its title and aspect ratio
  • Tests drive ProjectSession against real files in a temp directory (create, reopen, migrate with backup, refuse newer, lock conflict, single file after close); the adapter has a smoke test

Blocked by

  • None (can start immediately)
## Parent #24 ## What to build The tracer bullet for the whole app. A filmmaker can create a new Project, close it, and open it again from a `.studio` file. This ticket sets up the Cargo workspace with a thick `studio-core` crate (no Tauri) and a thin `src-tauri` adapter over `taurpc`. `ProjectSession` is the public API and the test seam. A minimal SvelteKit screen offers New / Open and shows the Project's title and aspect ratio. Follows ADR-0001 and ADR-0003, and spec section "Project file". This ticket writes the DDL for the tables it creates. ## Acceptance criteria - [ ] `studio-core` crate exists with a `ProjectSession` that creates, opens and closes a `.studio` SQLite file with a fixed `application_id`; `src-tauri` only maps DTOs and wraps commands that return a typed error enum - [ ] Migrations use `PRAGMA user_version`, are embedded in the core, and run in one transaction after copying the file to `<name>.studio.bak-v<N>` - [ ] A file made by a newer schema is refused with a clear error - [ ] The file runs in WAL while open; a clean close checkpoints and switches to `journal_mode=DELETE`, leaving a single file at rest - [ ] A `<name>.studio.lock` file with PID and host stops a second running instance from opening the same Project - [ ] A sibling `<name>.media/` folder is created; ULID keys and the content-addressed `blob` table (BLAKE3, media type, size, pixel dimensions) exist, with an unused-blob sweep on open - [ ] App-wide defaults live in a JSON file in the app config directory, are copied into the singleton `project` row and list tables at creation, and are never read again by that Project - [ ] The Project's aspect ratio can be set from the fixed list and changed later - [ ] The UI can create and open a Project and shows its title and aspect ratio - [ ] Tests drive `ProjectSession` against real files in a temp directory (create, reopen, migrate with backup, refuse newer, lock conflict, single file after close); the adapter has a smoke test ## Blocked by - None (can start immediately)
Sign in to join this conversation.
No description provided.