-
Notifications
You must be signed in to change notification settings - Fork 2.8k
ChatView: smoother stick-to-bottom during streaming #8999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewed commit 9df6649. No new issues found. Mention @roomote in a comment to trigger your PR Fixer agent and make changes to this pull request. Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the auto-scroll behavior in the chat view by replacing the disableAutoScrollRef pattern with a more intuitive "sticky follow" approach that works in conjunction with Virtuoso's built-in followOutput feature.
Key changes:
- Renamed
disableAutoScrollReftostickyFollowRefwith inverted logic (true = follow enabled, false = follow disabled) - Added
followOutput="smooth"to the Virtuoso component to leverage built-in scroll following - Removed the custom auto-scroll effect that triggered on message length changes
- Simplified scroll behavior logic in
atBottomStateChangeand wheel event handlers
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… sync, and hide button flash when engaging sticky follow (#8999)
… forced scroll in atBottomStateChange to reduce jank
9df6649 to
36d6498
Compare
Fixes issues where sometimes the session would lose its stickyness to the bottom of the window during streaming events.
BEFORE
Sticky.-.Old.mp4
AFTER
Sticky.-.New.mp4
Summary
Key changes
Tests
Rationale
Important
Improves stick-to-bottom behavior in
ChatView.tsxduring streaming usingVirtuosowith smooth follow mode and updated sticky follow logic.ChatView.tsxusingVirtuosowithfollowOutputset to "smooth".disableAutoScrollRefwithstickyFollowRefto manage sticky follow state.isAtBottomandshowScrollToBottomstate handling to reflect new scroll behavior.handleWheelandonScrollto disable sticky follow on user scroll actions.This description was created by
for 36d6498. You can customize this summary. It will automatically update as commits are pushed.