Start summaries while post-meeting transcription runs

Merged
CO
2mo ago
+294-1

Generate from saved live text before batch repair and refresh after repair completes. Preserve the refresh requirement across reloads and cover repair failure, cancellation, and secondary windows.


[!NOTE]
Medium Risk
Reorders post-capture summary and batch repair in capture finalization and recovery, which could affect summary timing, duplicate enhance calls, or marker state if edge cases are missed.

Overview
When capture stop needs batch_then_enhance, the app now kicks off an early summary from the saved live transcript before post-stop batch repair runs, then regenerates the summary after repair finishes so notes reflect the repaired text.

A durable refreshSummaryAfterRepair flag on the capture lifecycle marker records that two-pass behavior, is validated on load (only strict true is kept), and survives reload so recovery can run batch first and still schedule the regenerate pass. Early enhance runs after transcript/editor flush; if the first enhance fails, repair still continues and the post-repair regenerate is attempted. Failed or cancelled repair keeps the first summary and leaves recovery state intact.

Tests cover marker persistence, the stop/repair ordering, repair failures, secondary-window requestMainAutoEnhance, and reload recovery with the flag set.

Reviewed by Cursor Bugbot for commit 0ee77d007ebb0f5fc55acf7150fa1f51051cb513. Bugbot is set up for automated code reviews on this repo. Configure here.