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

Enhances stick-to-bottom behavior in ChatView.tsx during streaming by using stickyFollowRef and isAtBottom for smoother scrolling and accurate UI updates.

  • Behavior:
    • Improved stick-to-bottom behavior during streaming in ChatView.tsx using stickyFollowRef and isAtBottom.
    • Engages sticky follow on "scroll to bottom" and disengages on user up-scroll or row expansion.
    • Uses Virtuoso with followOutput="smooth" for smoother scrolling.
  • State Management:
    • Replaces disableAutoScrollRef with stickyFollowRef for managing sticky follow state.
    • Updates isAtBottom state to track scroll position and control UI elements.
  • UI Updates:
    • Shows/hides scroll-to-bottom button based on isAtBottom state.
    • Adjusts button visibility logic in the chat interface to reflect scroll position changes.

This description was created by Ellipsis for 9df6649. 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

roomote bot commented Nov 3, 2025

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.

Copy link

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
… sync, and hide button flash when engaging sticky follow (#8999)
… forced scroll in atBottomStateChange to reduce jank
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR - Needs Preliminary Review size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Status: PR [Needs Prelim Review]

Development

Successfully merging this pull request may close these issues.

2 participants