Skip to content

AI review: play the current line to check a fix - #13649

Merged
niksedk merged 1 commit into
mainfrom
claude/play-current-line-faaccf
Aug 15, 2026
Merged

AI review: play the current line to check a fix#13649
niksedk merged 1 commit into
mainfrom
claude/play-current-line-faaccf

Conversation

@niksedk

@niksedk niksedk commented Aug 15, 2026

Copy link
Copy Markdown
Member

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 PlayLineAndPauseAtEnd the 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

  • Play current button at the bottom left of the AI review window - hidden when no video is loaded, disabled until a suggestion is selected
  • Double-click a suggestion to play it
  • F5 (whatever your play selected lines binding is) or Ctrl/Cmd+Space. Bare Space is deliberately left alone: in this window it toggles the row's Apply checkbox
  • Closing the window stops playback only if the window itself started it - a video left playing before the review keeps playing

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 ReviewSpeechViewModel moved to MainShortcutKeys, 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

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>
@niksedk
niksedk merged commit a3eaf41 into main Aug 15, 2026
1 check passed
@niksedk
niksedk deleted the claude/play-current-line-faaccf branch August 15, 2026 07:45
@niksedk niksedk mentioned this pull request Aug 16, 2026
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