Preserve stop scroll decision on layout changes - #11067
Conversation
…w layouts Remove logic that automatically unpaused scroll when the container temporarily stopped overflowing. Previously, layout changes that reduced content height below the viewport would reset the userScrolled flag, causing the chat to jump back to the bottom when the user had intentionally scrolled up. The stop/pause function now accepts a force parameter to bypass the canScroll check, ensuring an explicit user pause is never cleared by transient layout changes.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The fix is correct. All four The The new tests cover all the key cases and test real implementation behaviour. Files Reviewed (3 files)
Reviewed by claude-sonnet-4.6 · 256,312 tokens Review guidance: REVIEW.md from base branch |
…w layouts (Kilo-Org#11067) Remove logic that automatically unpaused scroll when the container temporarily stopped overflowing. Previously, layout changes that reduced content height below the viewport would reset the userScrolled flag, causing the chat to jump back to the bottom when the user had intentionally scrolled up. The stop/pause function now accepts a force parameter to bypass the canScroll check, ensuring an explicit user pause is never cleared by transient layout changes.
Part of #11030
Why
A conversation can have temporary resizes as components go from direct rendering to virtualized rendering. We had logic in place that would force auto-scrolling if the container didn't overflow, causing a scenario where a user would scroll up - A resize would happen - Be forced again to the bottom.
Implementation
Remove logic that automatically unpaused scroll when the container temporarily stopped overflowing. Previously, layout changes that reduced content height below the viewport would reset the userScrolled flag, causing the chat to jump back to the bottom when the user had intentionally scrolled up.
The stop/pause function now accepts a force parameter to bypass the canScroll check, ensuring an explicit user pause is never cleared by transient layout changes.
Screenshots / Video
This is one of the fixes for the intermittent issue shown in this video (Note the force scroll to bottom)
jump-down.mov
Correct behaviour
correct-scroll-up.mov
Testing