Pause live output follow while reading#3936
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review This PR introduces a new user-facing feature that pauses live output auto-follow when the user scrolls up to read history. It adds substantial new logic for detecting user navigation intent across multiple input types (wheel, touch, keyboard, scrollbar) and modifies the timeline's auto-scroll behavior. New features with runtime behavior changes warrant human review. You can customize Macroscope's approvability policy. Learn more. |
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Sorry for closing without warning, I thought this PR was stale and only saw @juliusmarminge self-requested a review an hour ago after I closed it. Hope this didn't fuck anyone's workflows. |
…to-scroll # Conflicts: # apps/web/src/components/chat/MessagesTimeline.tsx
|
@juliusmarminge I think it's ready if you wanna merge it |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4c3da13. Configure here.

Summary
Why
LegendList's internal end-maintenance remained enabled after manual navigation, so streamed layout and data updates could pull the viewport back down even after the timeline scroll mode had detached.
Closes #3925
Validation
vp test apps/web/src/components/chat/MessagesTimeline.test.tsxvp checkvp run typecheckNote
Pause live output auto-follow in chat timeline during manual scroll navigation
MessagesTimelinevia wheel, touch, keyboard, pointer, and minimap interactions; confirmed upward navigation disables auto-follow and shows the scroll-to-bottom pill.shouldResumeTimelineAutoFollowlogic in timelineScrollAnchoring.ts.resolveTimelineAutoFollowEnabledForRoute.LegendListmaintainScrollAtEndis disabled when auto-follow is off or a navigation probe is active, preventing the list from snapping back to the bottom during reading.onIsAtEndChangenow receives a structured{ isAtEnd, manualNavigationReachedEnd }object instead of a plain boolean.Macroscope summarized 7be9742.
Note
Medium Risk
Scroll and follow behavior is intricate and user-facing; the
onIsAtEndChangecallback shape changed, though coverage is added in unit tests.Overview
Stops the chat timeline from pulling the viewport back to the live edge while the user reads older messages during streaming. LegendList
maintainScrollAtEndis now tied to an explicitautoFollowEnabledflag instead of staying on after the parent thought follow was off.MessagesTimelinedetects real navigation toward history (wheel, touch, keyboard, scrollbar drag, minimap jumps) via capture handlers and a short navigation probe, then callsonManualNavigation. Scroll handling reports{ isAtEnd, manualNavigationReachedEnd }soChatViewonly re-enables follow whenshouldResumeTimelineAutoFollowagrees (e.g. user scrolled back down after detaching, not spurious “at end” during new-turn anchoring). Thread/route switches reset follow on by default throughresolveTimelineAutoFollowEnabledForRoute.The old
ChatViewscroll-node listeners on wheel/touch/pointerdown are removed in favor of this timeline-owned logic.resolveTimelineIsAtEndnow prefersisWithinMaintainScrollAtEndThresholdso “near end” maintenance does not count as the true live edge.Reviewed by Cursor Bugbot for commit 7be9742. Bugbot is set up for automated code reviews on this repo. Configure here.