Repository navigation
Delete finished takes automatically: Recycle Bin or permanent, optionally only when space is needed (part of #644) - #716
Conversation
…644) The automatic half of #644. A new setting under Render Settings, "After a clip is finished", keeps the take (default), moves it to the Recycle Bin, or deletes it permanently. "Only when space is needed" (permanent only, since the Recycle Bin frees nothing until emptied) waits until a capture or render batch is short of room on its drives, then deletes the oldest finished takes there until it fits. Turning permanent deletion on asks first. - native::hlcr::take_cleanup decides which takes may go: every stream's last render finished (#438) with the clip file still on disk, nothing queued or rendering. It plans room oldest first and deletes nothing when every finished take together still would not be enough. - take_delete::delete_take_permanently removes the same file list as recycle_take, after the same check, keeping dodstudio_take.json. - Hooks: the render scheduler's end (after render_batch_finished, so the finish step and the batch summary count the rows first), the capture start before build_batch_queue (estimate_batch_capture_bytes plus 15 GiB headroom per drive), and start_queued_render (the first wave's reservations plus the 1 GiB export margin). - Every take that goes is logged ([take-cleanup]) with its size, where it went and why; progress shows in the Render tab's take-delete bar and the Capture footer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…/auto-delete-takes-644 # Conflicts: # native/src/patch/builder/mod.rs # studio/src-tauri/src/capture_manager.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Test pass 2026-10-13: stacked on #712, so no CI. Merged the updated feat/delete-takes-644 in (conflict in native/src/patch/builder/mod.rs: kept this PR's estimate_batch_capture_bytes and dev's STAY_BEHIND constant). |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Updated with dev (#712 and #755 are merged; three small conflicts: docs line, an import, and Live test by Claude, 2026-10-14 night, real Studio over CDP, on three scratch copies of a 898 MB take (
|
…-644 # Conflicts: # studio/src/settings_sync.js
|
Merged dev in (874d69f); conflict in |
…-644 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dev renamed RenderOutcome::Interrupted to Started (an interrupted render is one that started and never ended). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
features.md: dev's rows with this branch's After a clip is finished; builder: this branch's estimate fns with dev's ds_capture_stay_behind comment; settings_sync: both spreads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…use ds_capture_batch hold_command sent the old dodstudio_batch name, which the hook no longer registers since #719, so hold and go did nothing; it now uses runtime_batch::BATCH_COMMAND (with a test). Commands.txt: dev's file with this branch's hold|go. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
features.md: dev's Render Settings row (Presets, Clip Name Template) with this branch's After a clip is finished. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Brought up to date with dev (unattended pass). Head
🤖 Generated with Claude Code |
…-644 # Conflicts: # studio/src/settings_sync.js
…-queued take (part of #644) - After a render batch, whether a take's clip is finished was asked of the Render tab's rows, so a take whose HUD row had been removed went with its HUD frames never rendered. The streams now come from the take folder. - The cleanup took a take's rows out with Delete Take's check, which drops queued rows. A take queued again (Retry) after the cleanup looked was taken off the queue and deleted. It now stays while any row is queued or rendering. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Correctness review (unattended pass). Head What I checked: which takes can go (every stream's last attempt Finished, clip file on disk), takes still queued, rendering or being written, the Recycle Bin vs permanent paths, the delete guard (relative paths, Bugs fixed (07225c6):
Open questions / notes (no change made):
Tests (local): 🤖 Generated with Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Decisions from the user (2026-10-25):
|
Free space was added up across the export or capture drives, so two drives with 60% of a job free each counted as enough, nothing was deleted, and the render then stopped for lack of room. The check now places each piece (a render job, a capture block) whole on one drive, and cleanup deletes the oldest finished takes on the drive that fits the job for the fewest bytes, or reports that no one drive can be made to fit. - take_cleanup: RoomLedger keeps drives apart; choose_deletions picks the drive; SpaceNeed takes pieces instead of one total. - estimate_batch_capture_blocks: one figure per block (highlights that merge count as one); estimate_batch_capture_bytes is now its sum. - first_wave_pieces: one figure per render job of the first wave. - Short log line and toast say "free on one drive". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
renderer.rs: keeps dev's try_reserve with this branch's public EXPORT_SAFETY_MARGIN_BYTES as the margin. settings_manager tests: keep both the #644 take defaults and dev's render_codec default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o longer stops the batch before finished takes can be deleted The Capture tab's own free-space check ran before the backend's make_room, so a capture short of room was refused even when deleting finished takes would have made it fit. With the permanent choice and "Only when space is needed" on, the shortfall is now an orange note and the backend decides: it deletes finished takes first, or stops the batch with its own message. Found in the live test of "Only when space is needed" on a nearly full F:. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…freed
make_room deleted a finished take, then build_batch_queue read the drive's
free space from get_available_bytes' 2 s cache, which still counted the
deleted take, and refused the batch ("Insufficient space across all mapped
drives"). forget_free_space() drops the cached answers and the disk list;
make_room calls it after deleting.
Found in the live test of "Only when space is needed" on a nearly full F:.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Live test: "Only when space is needed" before a capture (2026-10-28, PRE/POST n/a, Studio only)Setup: Destinations = one folder on F:, F:'s free space set with a placeholder file, one highlight (railroad2, row 1: Studio budgets 30.9 GB, the real utvideo take was 12.1 GB), "Delete the take permanently" + "Only when space is needed".
Fixed on this branch
Seen, not fixed here
Not run: Cancel during "Making room" (one delete takes under a second), the two-drive render case (unit tests only). |
…clip moved; Capture Output Free updates after the cleanup When every finished take still isn't enough, the activity-log line and the toast now count the takes kept because their clip isn't where it was rendered (moved or renamed), so a short warning with takes on the drive explains itself. The Capture footer's free-space figure and the launch guard read the drives again on take_cleanup_done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release note: New: finished takes can be deleted automatically when their clips are done, to the Recycle Bin or permanently, or only when the capture drive runs low on space.
The automatic half of #644. It was stacked on #712, which has merged; the base is
devnow and CI runs here.Decisions
The setting
Configuration → Render Output → "After a clip is finished" has three choices:
"Only when space is needed" only works with permanent deletion; its tooltip explains that the Recycle Bin frees no space until it's emptied. A line under the setting says what the current choice does. Both values are saved in settings.json and default to keep and off, including for older settings files.
What gets deleted, and when
native/src/hlcr/take_cleanup.rs):dodstudio_take.jsonthat finished, and that clip file is still on disk.delete_take_permanentlysits next torecycle_take, uses the same guard and keeps the history file.estimate_batch_capture_blocks; highlights that will merge into one recording count as one block).first_wave_pieces).build_batch_queueuses for capture blocks.[take-cleanup]line with the path, size, Recycle Bin or permanent, and why.Test done
clip_movedcases, andplan_roomreporting 1 moved take on a short drive; the toast's wording for 1 and 2.take_cleanup_done. New Playwright check inapp-boot.spec.js(fails without the fix, passes with it).cargo test -p native take_cleanup25 passed,-p desktop-studio take_cleanup5 passed;take_cleanup.test.js14 passed; Playwrightapp-boot+take-cleanup10 passed; clippy 1.98.1 on both crates andcargo fmtclean.cargo test -p native -p desktop-studio: native 793 passed, studio 239 passed. New tests: two drives with 60% of a job free each don't hold it; cleanup deletes on the one drive that fits for the fewest bytes, or reports it can't (90 at most on one drive, with 180 in all); a job that fits on one drive needs nothing while the other is full; several blocks placed across drives; blocks that need room on two drives; the capture block estimate merges highlights that merge.--workspace --all-targets -D warningsandcargo fmt --all --checkare clean.npm run test:unit: 867 passed. Playwrightapp-boot.spec.jsandtake-cleanup.spec.js: 9 passed.Worth knowing
build_batch_queueitself still counts each folder separately until Capture and render count a drive's free space once, however many folders are on it (#774) #819 merges.SpaceNeed { needed_bytes: .. }, which now needspieces: vec![..]), Scheduled Commands can run for only some players' clips (a crosshair per player) #832, Capture and render count a drive's free space once, however many folders are on it (#774) #819, Capture batch: one progress bar from start to end, with each step in plain words and Done in at the end (#952) #1025, Render tab: each batch's bar starts at 0 and shows time left and Done in, and Scan for Takes shows a moving bar (part of #954) #1028, Studio marks clips captured after a batch that ran while it was closed (part of #545) #760 (builder, capture or render manager), and many others only instrings.js.To check by hand (Studio only)
dodstudio_take.jsonstays;Part of #644
🤖 Generated with Claude Code