fix(ui): prevent snap-to-bottom and flickering during upward session scroll - #13009
Conversation
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Incremental review of Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
Files Reviewed (4 files)
Previous Review Summary (commit c514c08)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit c514c08)Status: 1 Issue Found | Recommendation: Address before merge Overview
The scroll-flicker fix itself (resize guard, debounced pause, wheel activity tracking) is sound and well-tested. One behavioral regression risk remains around nested scrollable regions in the chat transcript. Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
Files Reviewed (4 files)
Reviewed by kimi-k3 · Input: 25.4K · Output: 5.8K · Cached: 28K Review guidance: REVIEW.md from base branch |
…oll-flicker fix(ui): prevent snap-to-bottom and flickering during upward session scroll
Problem
When scrolling up in an idle Agent Manager or chat transcript, resizing virtualized elements triggers
onContentResizeincreateAutoScroll. When the session is inactive, this callback was unconditionally invokingscrollToBottom, forcibly snapping the viewport back to the bottom and fighting upward scroll gestures. In addition, wheel gestures did not mark user activity on the scroll tracker, causing debounced scroll handlers to misclassify user scrolls, andoverflow-anchor: autoon the scroll container clashed with Virtua's virtualized scroll offset compensation.Solution
onContentResizenow checks!userActivity.isRecent()before pinning to the bottom when inactive, allowing upward scroll gestures to proceed without interruption.bottom()snap inhandleScrollfor unclassified scroll shifts with a debounced pause.createUserActivitynow invokesmark()on all scrollable wheel inputs (both directions) to keep the recent interaction state accurate.overflowAnchor: "none"on the message list scroll container to avoid competing browser-native anchor adjustments during virtual list DOM recycling.