AI review: play the current line to check a fix - #13649
Merged
Merged
Conversation
Judging a suggested fix often needs the audio - "their" vs "there" is not decidable from the text alone. The review window now plays the line a suggestion belongs to in the main window's video player and pauses at its end (the same PlayLineAndPauseAtEnd the main window uses, so the waveform playhead is pinned and playback parks on the line's last frame). - "Play current" button at the bottom left, hidden when no video is loaded and disabled until a suggestion is selected - double-click a suggestion plays it - F5 (the user's "play selected lines" binding) or Ctrl/Cmd+Space; bare Space is left alone - it toggles the row's apply checkbox - closing the window stops playback only if the window started it Both entry points pass the hook, and the paragraph index maps 1:1 to a subtitle line in both: the full-subtitle path filters reference-only rows exactly as GetUpdateSubtitle() does, the selection path reuses the ordered block it built. The shortcut key matcher that was private to ReviewSpeechViewModel moved to MainShortcutKeys so both dialogs share it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Judging a suggested fix often needs the audio - "their" vs "there" is not decidable from the text alone. The AI review window can now play the line a suggestion belongs to.
Playback goes through the main window's video player using the same
PlayLineAndPauseAtEndthe main window uses, so the waveform playhead is pinned and playback parks on the line's last visible frame. No second player instance.What's new
Both entry points pass the hook (Tools -> AI review..., and right-click -> Selected lines -> AI review...). The paragraph index maps 1:1 to a subtitle line in both: the full-subtitle path filters reference-only rows exactly as
GetUpdateSubtitle()does, and the selection path reuses the ordered block it built.Along the way
The shortcut key matcher that was private to
ReviewSpeechViewModelmoved toMainShortcutKeys, so both dialogs share one implementation.Testing
7 new headless tests in
AiReviewPlaybackTests: the play hook contract (index handed out, no-selection no-op, no hook = no crash), the F5-plays / Space-doesn't split, stop-only-if-started, and the button's visibility in the real window tree. Full UI suite green (2771 passed).End-to-end with a live engine and a video loaded has not been exercised - the playback path itself is the main window's own.
🤖 Generated with Claude Code