{{ message }}
Repository navigation
Conversation
tigerBeA
marked this pull request as draft
September 7, 2026 08:39
tigerBeA
marked this pull request as ready for review
September 7, 2026 08:47
2 tasks done
Collaborator
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.

🎯 Changes
Fixes #1266.
Live reproduction · Standalone source
With
anchorTo: 'end'anddirectDomUpdates, growing an earlier message can leave the viewport above the bottom when the last message keeps its size.resizeItemapplies its scroll adjustment before notifying the React adapter, so the browser clamps the write against the old sizer height. The internal offset advances, but the actual DOM position remains behind. In the regression, growing the previous message by 24px leaves a persistent 24px gap.Apply the adapter's existing, size-guarded
applyContainerSizebefore delegating toscrollToFn. The browser then sees the updated scroll range when applying the adjustment. This covers the resize path in direct DOM mode using the same ordering principle as #1237; related to #1209. The change is scoped to the React adapter's direct DOM mode.A separate, statically configured chat-resize E2E fixture uses
directDomUpdateswithuseFlushSync: false; the original chat fixture and its default-mode coverage are preserved. The regression grows the previous message while keeping the last message at a fixed viewport height, then checks the realscrollHeightandscrollTop. It uses the native ResizeObserver and browser scrolling, with native scroll anchoring disabled so it cannot mask a missing virtualizer adjustment.Validation (Node 24.8.0 from
.nvmrc, pnpm 11.9.0 frompackageManager):/chat-resize/regression fails with an actual bottom gap of 24px. Restoring the fix makes it pass.NX_NO_CLOUD=true NX_DAEMON=false CI=1 pnpm run test:pr --parallel=2 --skip-nx-cachepasses, including all 34 React browser tests, 7 React library tests, type checks, lint, builds, and package validation. Nx caching was disabled for this run.✅ Checklist
pnpm run test:pr.🚀 Release Impact
@tanstack/react-virtual.Summary by CodeRabbit
Bug Fixes
Tests