Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Nov 3, 2025

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

  • Smoother, reliable stick-to-bottom during token streaming
  • Use Virtuoso followOutput="smooth" + sticky follow mode
  • Engage sticky on “scroll to bottom”, auto-disengage on user up-scroll or expanding rows
  • All chat tests pass

Key changes

  • ChatView: enable followOutput and manage sticky pin: webview-ui/src/components/chat/ChatView.tsx
  • Guard textarea and row-height scrolls using isAtBottom

Tests

  • webview-ui chat specs: 99/99 passing

Rationale

  • Removes after-render debounce jumps and reduces complexity
  • Lets Virtuoso own bottom-follow; tiny sticky follow ensures robust pin under fast streams

Important

Improves stick-to-bottom behavior in ChatView.tsx during streaming using Virtuoso with smooth follow mode and updated sticky follow logic.

  • Behavior:
    • Improved stick-to-bottom behavior during streaming in ChatView.tsx using Virtuoso with followOutput set to "smooth".
    • Sticky follow mode engages on "scroll to bottom" and disengages on user up-scroll or row expansion.
  • State Management:
    • Replaced disableAutoScrollRef with stickyFollowRef to manage sticky follow state.
    • Updated isAtBottom and showScrollToBottom state handling to reflect new scroll behavior.
  • Event Handling:
    • Added handleWheel and onScroll to disable sticky follow on user scroll actions.
  • Misc:
    • All chat tests pass, ensuring no regressions in functionality.

This description was created by Ellipsis for 36d6498. You can customize this summary. It will automatically update as commits are pushed.

Copilot AI review requested due to automatic review settings November 3, 2025 19:40
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused labels Nov 3, 2025
@roomote
Copy link
Contributor

roomote bot commented Nov 3, 2025

Oroocle Clock   Follow along on Roo Cloud

See this task on Roo Code Cloud

Reviewed commit 9df6649. No new issues found.

Previous Reviews

Mention @roomote in a comment to trigger your PR Fixer agent and make changes to this pull request.

Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Copy link
Contributor

Copilot AI left a 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 disableAutoScrollRef to stickyFollowRef with 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 atBottomStateChange and wheel event handlers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 3, 2025
@hannesrudolph hannesrudolph moved this from Triage to PR [Draft / In Progress] in Roo Code Roadmap Nov 3, 2025
@hannesrudolph hannesrudolph added PR - Draft / In Progress and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Nov 3, 2025
@hannesrudolph hannesrudolph moved this from PR [Draft / In Progress] to PR [Needs Prelim Review] in Roo Code Roadmap Nov 3, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 4, 2025
@hannesrudolph hannesrudolph force-pushed the feat/chatview-sticky-follow branch from 9df6649 to 36d6498 Compare December 4, 2025 16:10
@mrubens mrubens merged commit 61aabe7 into main Dec 4, 2025
18 of 19 checks passed
@mrubens mrubens deleted the feat/chatview-sticky-follow branch December 4, 2025 19:38
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Dec 4, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer PR - Needs Preliminary Review size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants