Skip to content

End-of-batch toast counts every highlight marked Captured (#1667) - #1672

Merged
ccoventry merged 2 commits into
devfrom
fix/batch-toast-captured-count-1667
Dec 4, 2026
Merged

ccoventry merged 2 commits into
devfrom
fix/batch-toast-captured-count-1667

Conversation

@ccoventry

@ccoventry ccoventry commented Dec 4, 2026 •

Copy link
Copy Markdown
Owner

Release note: Fixed: the end-of-batch toast now counts every highlight marked Captured, not only the last ones.

Closes #1667

Cause: with Render While Capturing on, each clip's highlights are marked Captured as the clip settles (markClipCaptured, #861). The end-of-batch handler then finds them already Captured, so markBlockCaptured reports only highlights it moves itself, and the toast's count covers just the leftovers. It affects every batch with Render While Capturing, not only demo groups. Without it, all marking happens at the end and the count was right.

Fix: markBlockCaptured records each highlight it moves to Captured in a Set of uids on the dispatch, in both the per-clip and the end pass, and the toast uses batchMarkedText(dispatch) (the Set's size), so a highlight counts once however often its status changes. No file ceiling change: the file stays at its limit.

Test done

Pre-PR check

  • Readers of markClipCaptured/lastDispatch: only capture_pane.js; markedUids is a field on a fresh dispatch per batch, so it resets each batch and is not sent over IPC (the streaks are, the dispatch is not).
  • Another batch's clip is ignored by the session id check, so it cannot add to this count.
  • No other open PR touches these lines that I checked.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…1667)

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

Copy link
Copy Markdown
Owner Author

Review findings

# Finding Severity Outcome
1 Nothing tests the two lines that are the fix medium Fixed in ce2282b: the count decision is one helper batchMarkedText, plus an e2e step on the real handler, test the end-of-batch toast counts highlights marked per clip as well as at the end (fails on dev)
2 A highlight can be counted twice when its status is reset between the passes low Fixed in ce2282b: markBlockCaptured fills a Set of uids on the dispatch, test counts a highlight once when its status was reset between the two passes
3 The count can contradict the failed-in-game toast for a clip marked per clip low Filed #1674
4 Re-captured highlights are still not counted low Filed #1673
5 marked Captured counts highlights already Rendered low Filed #1673
6 batchMarkedCount called twice on one long line nit Fixed in ce2282b: the line is now one batchMarkedText call, test batchMarkedText counts the highlights marked per clip as well as at the end
7 The ceiling reason in the PR body was off by one nit Fixed in ce2282b: the helper moved the logic out so the file is back at 1404 lines, the ceiling raise is reverted to 1405 and the body corrected
8 Two behaviours in one test and dynamic imports nit Fixed in ce2282b: tests split one per behaviour with static imports, test batchMarkedText says nothing without a dispatch
9 Live batch with Render While Capturing on both installs not tested low Filed #1674
10 Failed clip with Render While Capturing not tested low Filed #1674
11 Cancelled batch and second-batch reset not tested low Filed #1674

@ccoventry
ccoventry merged commit f8fda6a into dev Dec 4, 2026
11 checks passed
@ccoventry
ccoventry deleted the fix/batch-toast-captured-count-1667 branch December 4, 2026 05:45
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.

End-of-batch toast undercounts the highlights marked Captured

1 participant