Skip to content

Bump tanstack virtual to 3.14.26 and add the new upstream PR to the patch - #35743

Merged
langleyd merged 3 commits into
developfrom
fix/new-timeline-tanstack-bump-resize-reports
Nov 12, 2026
Merged

langleyd merged 3 commits into
developfrom
fix/new-timeline-tanstack-bump-resize-reports

Conversation

@langleyd

@langleyd langleyd commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

This bumps TanStack Virtual to the latest (react-virtual 3.14.26 / virtual-core 3.19.11) and fixes the at-bottom flake (#35449) in our patch, rather than in the view(supersedes #35727).

Commit 1 is the bump. The patch had to be redone against 3.19.11.

Two previous edits are gone as they have been fixed upstream by TanStack (it fixed a resize landing just after a programmatic scroll, which used to be compensated against the old position).
Three fixes are kept:

Commit 2 is the flake(actually an app issue, but not one that causes a user facing issue I'm aware of, more just a brief data inconsistency). I have now opened this as a PR to fix it upstream(TanStack/virtual#1378). I have moved #35727’s test here.

Commit 3 is code that i had in the patch that compensates for items above the fold changing height when being remeasured(async content changing the height, like an image or url summary loading). TanStack/virtual#1227 clarifies we should be using shouldAdjustScrollPositionOnItemSizeChange as the escape hatch for that. So moving it out of the patch.

Fixes #35449.

TanStack skips the scroll correction for a row that changes height again after it was measured while the user scrolls up (TanStack/virtual#1168), so an image or link preview finishing loading above the viewport shoved the rows on screen. Our virtual-core patch removed that skip; use the escape hatch TanStack provides for it instead, keeping the rest of its default rule.
Rebases our virtual-core patch. Two of its hunks are covered upstream now (a resize while a scroll is being written builds on the written position) and the backward-scroll one is replaced by TanStack's escape hatch in the view, so they are dropped. The two that remain: isValidAnchorItem, and keeping the end in view when the scroller shrinks (TanStack/virtual#1298, with the review changes).
When the timeline gets taller the browser moves scrollTop and fires the scroll event before TanStack's ResizeObserver has seen the new height, so an update could pair the new position with the old height and report leaving the bottom (#35449). Our virtual-core patch now reads the size along with the scroll event (TanStack/virtual#1378), and a shrink seen that way still keeps the end in view.

The test is #35727's, which passes without that PR's hold in the view.
@langleyd
langleyd added this pull request to the merge queue Nov 12, 2026
Merged via the queue into develop with commit 66295b4 Nov 12, 2026
118 of 142 checks passed
@langleyd
langleyd deleted the fix/new-timeline-tanstack-bump-resize-reports branch November 12, 2026 14:25

This branch was successfully deployed

3 active deployments
EndToEndTests — e610814a Deployed Nov 9, 2026 by github-actions[bot]
Netlify — e610814a Deployed Nov 9, 2026 by github-actions[bot]
SharedComponentStorybook — e610814a Deployed Nov 9, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Task Tasks for the team like planning

Projects

None yet

2 participants