Skip to content

Pause transcript auto-scroll on manual scroll - #64

Merged
wassgha merged 5 commits into
mainfrom
cursor/transcript-scroll-follow-fba8
Aug 3, 2026
Merged

wassgha merged 5 commits into
mainfrom
cursor/transcript-scroll-follow-fba8

Conversation

@wassgha

@wassgha wassgha commented Aug 2, 2026 •

Copy link
Copy Markdown
Owner

Problem

While video plays, the transcript keeps the active word in view via scrollIntoView. That sync is useful, but any manual scroll was immediately overridden on the next active-word change.

Fix

  • Track a follow playhead mode (on by default) in useTranscriptPlayheadFollow.
  • User scroll (wheel/touch/rail) pauses follow only once the active word leaves the viewport.
  • Wheel over a non-scrollable transcript is ignored — no Follow chip.
  • The Follow playhead control appears only while playing, unfollowed, and the playhead is offscreen; its icon is an up/down arrow toward the active word.
  • Clicking the control (or a transcript word) resumes auto-scroll. Scrolling back onto the playhead also resumes follow.

Test plan

  • Play a long transcript — active word stays in view while following.
  • Scroll away during playback — position sticks; Follow playhead appears with correct arrow.
  • Wheel on a short, non-scrollable transcript — Follow playhead does not appear.
  • Tiny scroll that keeps the playhead in view — Follow playhead does not appear.
  • Click Follow playhead / click a word — resume sync.

Demo

No button when content fits
Button only when scrolled away
Up arrow toward playhead
transcript-scroll-follow-demo.mp4

Open in Web Open in Cursor 

cursoragent and others added 4 commits August 2, 2026 21:47
Auto-follow still keeps the active word in view during playback, but
wheel/touch and the custom scroll rail now unfollow so manual browsing
is not overridden. A Follow playhead control (and clicking a word)
resumes sync.

Co-authored-by: Wassim Gharbi <wassgha@gmail.com>
Use an arrow that matches whether the playhead is above or below the
current transcript viewport so the control cues the jump direction.

Co-authored-by: Wassim Gharbi <wassgha@gmail.com>
Wheel over a non-scrollable transcript no longer toggles follow UI.
Unfollow waits until a user scroll actually leaves the playhead, and
the chip only appears while the active word is out of view.

Co-authored-by: Wassim Gharbi <wassgha@gmail.com>
Move auto-scroll, unfollow-on-scroll, and Follow control state out of
TranscriptPanel into useTranscriptPlayheadFollow.

Co-authored-by: Wassim Gharbi <wassgha@gmail.com>
@wassgha
wassgha marked this pull request as ready for review August 3, 2026 00:21
Resolve TranscriptPanel conflict by keeping playhead-follow hook wiring
alongside main's floating toolbar and disfluency placeholder changes.

Co-authored-by: Wassim Gharbi <wassgha@gmail.com>
@wassgha
wassgha merged commit c81926e into main Aug 3, 2026
1 check failed
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.

2 participants