fix(web-ui): snap chat to bottom instantly on pane tab re-activation - #565
Merged
Conversation
added 2 commits
August 17, 2026 18:04
Dockview hides inactive tab panels with display:none, so a re-shown pane loses its scroll position and the ResizeObserver-triggered redraw catches up through the smooth-scroll path (.chat-scroll has scroll-behavior: smooth), visibly animating to the bottom. Re-activating an already-loaded pane now resyncs density (a hidden pane measured 0x0) and redraws with forceScroll, which snaps with scroll-behavior:auto.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Switching back to a chat tab in a split layout animates a smooth scroll from the top to the bottom of the transcript instead of opening already at the bottom.
Root cause
dockview hides inactive tab panels with
display:none. A re-shown pane has lost its scroll position; the ResizeObserver-driven redraw then catches up through.chat-scroll'sscroll-behavior: smooth, producing the animated scroll. A hidden pane also measures 0x0, leaving density at 'strip', so density must be resynced before the forced redraw or the snap is skipped.Fix
On
onDidVisibilityChange, redraw already-loaded panes withforceScroll: true(after resyncing density), which snaps viascroll-behavior: auto. First show still loads as before.Tests
test/tab-switch-scroll-snap.test.tscovering the forced redraw ordering and the auto-behavior snap path.split-canvas-entry.test.tsto the new handler shape.