Storage view and Purge (#69) #126

Merged
crowmaki merged 2 commits from issue-69-storage-view into main 2026-10-09 21:11:13 +00:00
Owner

Closes #69. Part of #24.

What it does

Storage (rail → Storage) shows where the Project's disk went:

  • Totals: the project file with the free space inside it, the media folder, and the Edit package. For the package it shows what is shared with the media folder through hard links, and what sits in _Removed/.
  • One sortable table of every item that uses space, filtered by kind and Scene:
    • Rendition files and latents, with what a Purge would really free, counted by hard link. A final hard-linked into the Edit package frees nothing until the package lets go of it.
    • What the project file keeps (Source sheets, Reference versions, Atlases, Keyframes, Board panels, Performances), with what uses each. These are deleted in their own editors (ADR-0004).
  • Badges: circled, NG, purged, missing, linked, used by N. A details panel lists files, link counts, Used by, and a jump to Dailies, the Board, the sheet or the Animatic.

Purge deletes a Rendition's files or a draft's latents and keeps the row, its recorded size and hash, and its poster frame.

  • A circled Take's Rendition files are blocked. So are latents while a Promotion is made from them, and Rendition files while their post-steps run.
  • A file another program holds open (a player, Resolve) makes the purge skip that item and name the file. The item stays purgeable, so nothing is stranded.
  • One confirmation shows the exact bytes freed, what stops working (no playable Rendition, Promotion unavailable, the clip stays in the Edit package until the next export) and what a guard leaves alone. It cannot be undone.

Purged Takes stay in Dailies as purged tiles with a greyed poster. They offer Re-roll same seed, which queues a new Take of the Shot with the Take's own seed and current inputs, linked rerolled_from.

Missing files: opening Storage marks Rendition files and latents that went missing outside the app (schema step 38: missing_at, latents_missing_at). They show as missing and are treated like purged ones: they don't play, the Edit package and the Animatic leave them out, and Promotion refuses missing latents. When a file comes back, the mark clears the next time Storage opens.

Source-sheet deletion, the suggestion filters, orphan files, Empty _Removed, Compact and the Dailies shortcuts are #70.

Notes

  • Link counts come from nlink on Unix and GetFileInformationByHandle on Windows (new windows-sys target dependency, already in the lockfile).
  • Byte counts cross to TypeScript as plain numbers, the same way PointDto does.

Screenshots

Storage with a missing Take selected
Purge confirmation
Purged and missing Takes in Dailies

Tests

  • crates/studio-core/tests/storage.rs: totals and real sizes; a file held open on Windows leaving its item to purge again; in-file items and what uses them; reclaimable bytes with a final hard-linked into the Edit package; purge keeps the Take, poster and provenance, and the package's clip survives; re-roll same seed; the circled guard; the pending-Promotion guard and purged latents ending Promotion; missing files found on open, left out of the export, and cleared when back.
  • src/lib/storage/storage.test.ts, src/lib/scenes/takes.test.ts: formatting, badges, sort and filter, jump links, and purged and missing Renditions not playing.
  • cargo test --workspace --all-features, bun test src scripts and bun run check pass.
Closes #69. Part of #24. ## What it does **Storage** (rail → Storage) shows where the Project's disk went: - **Totals:** the project file with the free space inside it, the media folder, and the Edit package. For the package it shows what is shared with the media folder through hard links, and what sits in `_Removed/`. - **One sortable table** of every item that uses space, filtered by kind and Scene: - Rendition files and latents, with what a Purge would really free, counted by hard link. A final hard-linked into the Edit package frees nothing until the package lets go of it. - What the project file keeps (Source sheets, Reference versions, Atlases, Keyframes, Board panels, Performances), with what uses each. These are deleted in their own editors (ADR-0004). - **Badges:** circled, NG, purged, missing, linked, used by N. A details panel lists files, link counts, Used by, and a jump to Dailies, the Board, the sheet or the Animatic. **Purge** deletes a Rendition's files or a draft's latents and keeps the row, its recorded size and hash, and its poster frame. - A circled Take's Rendition files are blocked. So are latents while a Promotion is made from them, and Rendition files while their post-steps run. - A file another program holds open (a player, Resolve) makes the purge skip that item and name the file. The item stays purgeable, so nothing is stranded. - One confirmation shows the exact bytes freed, what stops working (no playable Rendition, Promotion unavailable, the clip stays in the Edit package until the next export) and what a guard leaves alone. It cannot be undone. **Purged Takes stay in Dailies** as purged tiles with a greyed poster. They offer **Re-roll same seed**, which queues a new Take of the Shot with the Take's own seed and current inputs, linked `rerolled_from`. **Missing files:** opening Storage marks Rendition files and latents that went missing outside the app (schema step 38: `missing_at`, `latents_missing_at`). They show as **missing** and are treated like purged ones: they don't play, the Edit package and the Animatic leave them out, and Promotion refuses missing latents. When a file comes back, the mark clears the next time Storage opens. Source-sheet deletion, the suggestion filters, orphan files, Empty `_Removed`, Compact and the Dailies shortcuts are #70. ## Notes - Link counts come from `nlink` on Unix and `GetFileInformationByHandle` on Windows (new `windows-sys` target dependency, already in the lockfile). - Byte counts cross to TypeScript as plain `number`s, the same way `PointDto` does. ## Screenshots ![Storage with a missing Take selected](https://git.crowmaki.me/attachments/867f2b3b-3992-4682-abf8-a50e61dde616) ![Purge confirmation](https://git.crowmaki.me/attachments/93f10a77-b8f3-4223-b6d1-8a2af7c249fd) ![Purged and missing Takes in Dailies](https://git.crowmaki.me/attachments/4dedf996-70cc-4609-a9ab-8e869adbfa0d) ## Tests - `crates/studio-core/tests/storage.rs`: totals and real sizes; a file held open on Windows leaving its item to purge again; in-file items and what uses them; reclaimable bytes with a final hard-linked into the Edit package; purge keeps the Take, poster and provenance, and the package's clip survives; re-roll same seed; the circled guard; the pending-Promotion guard and purged latents ending Promotion; missing files found on open, left out of the export, and cleared when back. - `src/lib/storage/storage.test.ts`, `src/lib/scenes/takes.test.ts`: formatting, badges, sort and filter, jump links, and purged and missing Renditions not playing. - `cargo test --workspace --all-features`, `bun test src scripts` and `bun run check` pass.
Storage shows where the Project's disk went: the project file with the
free space inside it, the media folder, and the Edit package with what
it shares with the media folder through hard links and what sits in
_Removed/. One sortable table lists every item that uses space, filtered
by kind and Scene: Rendition files and latents with what a Purge would
really free by hard-link count, and what the project file keeps (Source
sheets, Reference versions, Atlases, Keyframes, Board panels,
Performances) with what uses each.

Purge deletes a Rendition's files or a draft's latents and keeps the row,
its recorded size and hash, and its poster frame. A circled Take's
Rendition files are blocked, and so are latents while a Promotion is
made from them. One confirmation shows the exact bytes freed, what stops
working and what a guard keeps; Purge cannot be undone. A purged Take
stays in Dailies as a purged tile with "Re-roll same seed", which queues
a new Take of its Shot with the Take's own seed.

Opening Storage marks Rendition files and latents that went missing
outside the app (schema step 38). Missing files are treated like purged
ones: they don't play, the Edit package and Animatic leave them out, and
Promotion refuses missing latents.

Co-Authored-By: Claude <noreply@anthropic.com>
A Purge deletes every file it can and marks an item purged only once all
its files are gone, so a file another program holds open leaves its item
to purge again rather than stranding its bytes. The outcome names the
files that stayed, and open views hear about the Takes that changed
either way.

A missing Rendition still counts the files it has left, so a Purge of it
shows the exact bytes it frees. A file whose links cannot be counted is
taken as the media folder's alone, as the folder totals take it.

Storage items say whether a Purge can take them, so the view no longer
restates the rule. A Take whose files went missing while circled still
offers Re-roll same seed, and the view reloads once per burst of
changes. CONTEXT.md gains Missing and Re-roll same seed.

Co-Authored-By: Claude <noreply@anthropic.com>
crowmaki deleted branch issue-69-storage-view 2026-10-09 21:11:14 +00:00
Sign in to join this conversation.
No description provided.