Skip to content

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

Merged
ccoventry merged 3 commits into
devfrom
fix/render-batch-bar-954
Oct 25, 2026
Merged

ccoventry merged 3 commits into
devfrom
fix/render-batch-bar-954

Conversation

@ccoventry

Copy link
Copy Markdown
Owner

Release note: Fixed: The Render tab's batch bar starts at 0 for each new batch instead of counting takes rendered earlier, and shows the time left and "Done in" at the end. Scan for Takes shows a moving bar while it looks.

Part of #954 (from the #942 audit). The finish-clips wait is left for after PR #885, as the plan says.

What changes

  • The batch bar and its line count only this batch's rows.
    • Rows that an earlier batch finished stay in the table (Scan for Takes should work at any time and merge into the queue #772), and the bar used to count them, so a new batch could start at "Batch 60%" and "(6/10 done)". The batch's own rows were already kept for the end toast; that list now drives the bar and the line too.
    • The bar is hidden until a batch starts. Rows a scan queued are not a batch yet.
    • Once a batch ends, the bar keeps showing how it ended until the next batch starts.
  • The line while it renders: "Rendering 3 of 10 · about 4 min left · 1:23". The time left comes from the frames left at the pace so far, and only shows after the first 5 s (FFmpeg starting up isn't its pace). It moves every second along with the clock.
  • The end line: "Done in 7 min 40 s: 10 rendered", or "Done in 42 s: 8 rendered, 1 failed, 1 cancelled". A batch where everything was cancelled still says "Status: Cancelled", in the same colours as before.
  • Scan for Takes:
    • While it looks, a block slides under the status line and the line says "Looking for takes: 14 found so far · 0:02".
    • At the end the line says "Found 14 takes (3 new) in 2.1 s".
    • The "Scanning render directories..." toast is gone; it only repeated the line. The toast at the end stays.
  • The activity log gets [render] started and [render] done after 460.0 s: 10 rendered, 0 failed, 0 cancelled.

How

Decisions

Other open PRs touching the same files

Test done

  • cargo test --locked -p desktop-studio: 236 passed, including the new the_scan_count_is_sent_at_most_every_33_ms_and_once_at_the_end.
  • rustup run 1.98.1 cargo clippy --locked -p desktop-studio --all-targets -- -D warnings: clean. rustup run 1.98.1 cargo fmt --all: applied.
  • npm run test:unit: 861 passed. New: render_batch_progress.test.js (only this batch's rows, frames and time left, the scan's end line, and the batch's start, end and discard) and "Done in" in batchEndStatus.
  • Playwright (CI=1): render-studio.spec.js, finish-clips and app-boot: 66 passed.
    • New: a second batch's bar starts at 0 (the e2e check the plan asks for).
    • New: Scan slides a block, counts the takes, and ends on "Found 14 takes (3 new) in … s" with no "Scanning" toast.
    • Updated: the batch-bar test now expects 50% where it expected 75%, because the Finished row from before isn't this batch's.
  • Nothing was run live (an unattended pass).

Test steps for you (no game needed)

  1. Render tab: Scan for Takes on a capture folder.
    • A block slides under the status line, and the line counts "Looking for takes: N found so far · 0:0x".
    • It ends on "Found N takes (K new) in X s". No "Scanning…" toast pops up at the start.
  2. Render a few takes.
    • The footer bar starts at 0%, and the line reads "Rendering 1 of N · 0:0x". After a few seconds "· about … left" appears.
    • The end line says "Done in …: N rendered".
  3. Scan again after new captures, and Start again. The bar starts at 0% again, although the earlier rows are still listed as Finished.
  4. The activity log: it has [render] started and [render] done after … s: ….

🤖 Generated with Claude Code

…Done in; Scan slides a bar (#954)

The batch bar and its line counted every row in the table, and rows an
earlier batch finished stay there (#772), so a new batch could start at
"Batch 60%" and "(6/10 done)". render_batch_progress.js keeps the batch's
own rows (the old batchJobIds), its clock and the [render] log lines: the
bar shows this batch's rows, or the last batch's once it ends, the line says
"Rendering 3 of 10 · about 4 min left · m:ss" from frames left at the pace
so far, and the end says "Done in 7 min 40 s: 10 rendered".

Scan for Takes slides a block under the status line with "Looking for
takes: 14 found so far" and a clock, and ends on "Found 14 takes (3 new) in
2.1 s"; the "Scanning..." toast that repeated the line is gone. The backend
sends the count at most every ~33 ms instead of one event per take.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccoventry

Copy link
Copy Markdown
Owner Author

Review (night pass 2026-10-25)

Read: the whole diff: render_manager.rs (ScanCountThrottle), render_batch_progress.js, render_pane.js, render_batch_status.js, strings.js, the harness and the tests.

No bugs found.

Ran (after merging dev in, head aa4e43a6):

  • cargo test --locked -p desktop-studio: 236 pass.
  • Pinned clippy and fmt: clean.
  • npm run test:unit: 861 pass.
  • Playwright: render-studio, finish-clips and app-boot, 66 pass.

Screenshots: from the harness, with Studio's CSS: local\review-images\954\. They show:

  • the scan's sliding block and "Looking for takes: 7 found so far";
  • a second batch at 15% while two rows from the first batch are Finished;
  • the end line "Done in 0.6 s: 2 rendered" with 4 rows Finished.

The real app wasn't driven: another dev server holds port 5173.

Known limits, not this PR's: a batch started by Finish clips (not the Start button) learns its rows from the first snapshot that shows Rendering. A take that finishes inside one 150 ms snapshot gap before that isn't counted. The end toast already had the same gap.

Verdict: ready to merge. It follows #954's plan for this part.

@ccoventry
ccoventry merged commit a5d0618 into dev Oct 25, 2026
5 checks passed
@ccoventry
ccoventry deleted the fix/render-batch-bar-954 branch October 25, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant