Batch re-roll of stale circled Takes (#59) #114

Merged
crowmaki merged 2 commits from issue-59-batch-reroll into main 2026-10-09 07:32:18 +00:00
Owner

Closes #59

After a reference change, the filmmaker can refresh coverage in one action: Re-roll stale circled Takes, per Scene (Dailies header) or per Reference set (the set's panel). See User Stories 168–169.

What it does

  • For each Shot in the scope that has a stale circled Take, it queues one new Take. The new Take is a new seed of the Shot's most recently circled stale Take: it is built from the Shot's current inputs, keeps that Take's Generation profile and records rerolled_from.
  • A confirm sheet shows:
    • the stale circled count,
    • the Shots that get a new Take and the Take each one is rolled from,
    • the Shots that are skipped, and why,
    • a Draft / Single-pass final toggle,
    • the estimated time.
  • Skip rule: a Shot is skipped when it already has a current queued Take, meaning one that is waiting, held, rendering or finishing and is not stale. A queued Take that is itself stale does not cause a skip. Circles never change, so a second run queues nothing.
  • A Shot that cannot be queued is also skipped, with queuing's own message. Examples: it is too long, or its prompt override has a broken slot tag.
  • Per Reference set: a circled Take counts only when a counting References reason comes from one of that set's Lock snapshots. A Take that is stale only because of its Board is left to the Scene action.
  • Estimate: the average render time per frame of the finished jobs of the same workflow (h3.draft or h3.final), multiplied by the planned frames. Before any job of that kind has rendered, the sheet says the estimate is unknown. The estimate does not include time spent waiting in the queue or post-steps.

Changes

  • studio-core: a new stale_reroll module with stale_reroll_plan and reroll_stale_circled. Staleness now records which Lock snapshots each reason comes from (stale_reference_sets).
  • Tauri: the stale_reroll_plan and reroll_stale_circled commands, and DTOs.
  • UI: RerollStaleDialog, buttons in the Dailies header and in ReferenceSetPanel, and a pure reroll.ts with bun tests.
  • CONTEXT.md: the "New seed" entry now covers the batch action and its kind toggle.

Notes

  • The batch is not atomic. Each Shot is queued in its own transaction. If a later Shot fails with an unexpected error, the Takes queued before it stay queued. Running it again is safe because of the skip rule.
  • The plan is worked out again when the user confirms. The sheet reloads on every change while it is open.

Tests

  • crates/studio-core/tests/stale_reroll.rs (8 tests) covers counting, one Take per Shot of the chosen kind with circles unchanged, idempotence, a stale queued Take not causing a skip, a held current Take causing a skip, per-Reference-set scoping, blocked Shots and the estimate.
  • cargo test --workspace --all-features: 692 passed, 2 failed. The two failures are ffmpeg::tests::a_proxy_*. They also fail on main, because the local ffmpeg build has no libopenh264 encoder.
  • bun test src scripts: 211 passed.
  • bun run check: clean.

Screenshots

To get rendered, circled Takes, the Project was seeded against the fake ComfyUI. In it, 1A and 1B are stale, and 1C's fresh Take is already queued.

Dailies header button

Confirm sheet, draft

Confirm sheet, Single-pass final with no history

Reference set panel button

Confirm sheet for MARK's turnaround set

After queuing: 1A-3 waits, circles unchanged

Closes #59 After a reference change, the filmmaker can refresh coverage in one action: **Re-roll stale circled Takes**, per Scene (Dailies header) or per Reference set (the set's panel). See User Stories 168–169. ## What it does - For each Shot in the scope that has a stale circled Take, it queues one new Take. The new Take is a new seed of the Shot's most recently circled stale Take: it is built from the Shot's current inputs, keeps that Take's Generation profile and records `rerolled_from`. - A confirm sheet shows: - the stale circled count, - the Shots that get a new Take and the Take each one is rolled from, - the Shots that are skipped, and why, - a Draft / Single-pass final toggle, - the estimated time. - **Skip rule:** a Shot is skipped when it already has a current queued Take, meaning one that is waiting, held, rendering or finishing and is not stale. A queued Take that is itself stale does not cause a skip. Circles never change, so a second run queues nothing. - A Shot that cannot be queued is also skipped, with queuing's own message. Examples: it is too long, or its prompt override has a broken slot tag. - **Per Reference set:** a circled Take counts only when a counting References reason comes from one of that set's Lock snapshots. A Take that is stale only because of its Board is left to the Scene action. - **Estimate:** the average render time per frame of the finished jobs of the same workflow (`h3.draft` or `h3.final`), multiplied by the planned frames. Before any job of that kind has rendered, the sheet says the estimate is unknown. The estimate does not include time spent waiting in the queue or post-steps. ## Changes - `studio-core`: a new `stale_reroll` module with `stale_reroll_plan` and `reroll_stale_circled`. Staleness now records which Lock snapshots each reason comes from (`stale_reference_sets`). - Tauri: the `stale_reroll_plan` and `reroll_stale_circled` commands, and DTOs. - UI: `RerollStaleDialog`, buttons in the Dailies header and in `ReferenceSetPanel`, and a pure `reroll.ts` with bun tests. - `CONTEXT.md`: the "New seed" entry now covers the batch action and its kind toggle. ## Notes - The batch is not atomic. Each Shot is queued in its own transaction. If a later Shot fails with an unexpected error, the Takes queued before it stay queued. Running it again is safe because of the skip rule. - The plan is worked out again when the user confirms. The sheet reloads on every change while it is open. ## Tests - `crates/studio-core/tests/stale_reroll.rs` (8 tests) covers counting, one Take per Shot of the chosen kind with circles unchanged, idempotence, a stale queued Take not causing a skip, a held current Take causing a skip, per-Reference-set scoping, blocked Shots and the estimate. - `cargo test --workspace --all-features`: 692 passed, 2 failed. The two failures are `ffmpeg::tests::a_proxy_*`. They also fail on `main`, because the local ffmpeg build has no `libopenh264` encoder. - `bun test src scripts`: 211 passed. - `bun run check`: clean. ## Screenshots To get rendered, circled Takes, the Project was seeded against the fake ComfyUI. In it, 1A and 1B are stale, and 1C's fresh Take is already queued. ![Dailies header button](https://git.crowmaki.me/attachments/b303efbb-2827-4208-aa8c-2763fdb2e08e) ![Confirm sheet, draft](https://git.crowmaki.me/attachments/75aa1303-2a95-478b-b77c-b88ae76ae0d7) ![Confirm sheet, Single-pass final with no history](https://git.crowmaki.me/attachments/94c31c24-4b5a-4ccf-9294-dfb98dc05f41) ![Reference set panel button](https://git.crowmaki.me/attachments/82231b93-12c4-4045-9098-6b78098f6f85) ![Confirm sheet for MARK's turnaround set](https://git.crowmaki.me/attachments/6e5cc3cc-2c75-42e3-9f50-71c6c97e001c) ![After queuing: 1A-3 waits, circles unchanged](https://git.crowmaki.me/attachments/10a1b579-2d85-4953-a540-b31738ef1a19)
"Re-roll stale circled Takes" queues, in one action, a new seed of each
Shot's most recently circled stale Take, per Scene or per Reference set.

- studio-core: stale_reroll module with stale_reroll_plan (counts, Shots to
  queue, Shots skipped and why, estimated time from rendered jobs) and
  reroll_stale_circled. A Shot with a current queued Take, or one that
  cannot be queued, is skipped; circles never change, so a second run
  queues nothing. Per Reference set, a circled Take counts only when a
  counting References reason comes from that set's Lock snapshots.
- Tauri: stale_reroll_plan and reroll_stale_circled commands.
- UI: a confirm sheet with counts, the Shots, skipped Shots, a draft /
  Single-pass final toggle and the estimated time, opened from the Dailies
  header and from a Reference set's panel.
- Reuse reroll_request for the batch, overriding only the kind.
- Build each Shot's current job once for both the stale and skip checks.
- Skip reasons cross to the webview as a tagged enum.
- A held current Take counts as on the way (tested).
- CONTEXT.md: "New seed" covers the batch action and its kind toggle.
crowmaki deleted branch issue-59-batch-reroll 2026-10-09 07:32:18 +00:00
Sign in to join this conversation.
No description provided.