Repository navigation
Keep the new timeline at the bottom when its viewport changes height - #35374
Merged
Merged
Conversation
When the new timeline's scroller shrinks (a banner appears, the composer grows, the window is resized), the browser keeps `scrollTop`, so a reader at the bottom was left with the newest messages below the fold. Rows whose height follows the window, such as collapsed code blocks, made window resizes lose the bottom even with a resize handler in the view, because TanStack compensated them before the handler ran. The fix is a new hunk in our @tanstack/virtual-core patch rather than code in TimelineView: an end-anchored list now keeps an end-pinned view pinned when its scroll element shrinks, the same way it already does when a row grows. It is proposed upstream to TanStack Virtual and can be dropped once released. The rest of the patch is unchanged.
MidhunSureshR
approved these changes
Oct 7, 2026
This branch was successfully deployed
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.
Currently on opening a room, if the new labs timeline gets resized(say when the pinned message banner appears or the composer changes height) it doesn't stay pinned to the bottom. Similarly if you resize the browser window when you are already scrolled to the bottom, it doesn't stay at the bottom.
The result of which can look like this:

As reported in #35124.
After the fix, if you were already pinned to the bottom, it stays pinned(when composer/banner forces a resize, or the window changes height)
Screen.Recording.2026-10-07.at.14.14.04.mov
tanstack/virtual "knows" when we are at the bottom so I think should handle the case where the scroller grows.
I have opened an upstream Issue and linked it from an upstream PR TanStack/virtual#1298 and updated the patch in this PR.
AI assistance