This repository was archived by the owner on Sep 16, 2026. It is now read-only.
Repository navigation
fix: completely disable virtualization to fix React errors #418/#185 - #435
Merged
Merged
Conversation
EMERGENCY FIX: The @tanstack/react-virtual library causes infinite re-render loops during hydration in React 19, even with the virtualizerRef workaround from PR #434. The error occurs INSIDE the library code, not in our wrapper. This completely disables virtualization until @tanstack/react-virtual officially supports React 19. References: - TanStack/virtual#743 - TanStack/virtual#924 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Greptile OverviewGreptile SummaryDisables Key Changes
Issues Found
Recommendations
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant ChatMessagesPanel
participant React19
participant TanStackVirtual
participant ScrollArea
Note over ChatMessagesPanel: shouldVirtualize = false (HARDCODED)
User->>ChatMessagesPanel: Page load/reload
ChatMessagesPanel->>React19: Initial render
React19->>ChatMessagesPanel: Set isMounted = false
Note over TanStackVirtual: Virtualizer created but disabled
ChatMessagesPanel->>TanStackVirtual: useVirtualizer(enabled: false)
TanStackVirtual-->>ChatMessagesPanel: virtualizer (inactive)
Note over ChatMessagesPanel: Dead code: virtualizerRef, measureElementRef, virtualListContainerStyle never used
ChatMessagesPanel->>React19: useEffect() completes
React19->>ChatMessagesPanel: Set isMounted = true
Note over ChatMessagesPanel: Render path: shouldVirtualize = false
ChatMessagesPanel->>ScrollArea: Render all messages (non-virtualized)
ScrollArea->>User: Display all messages at once
User->>ScrollArea: Scroll interaction
ScrollArea->>ChatMessagesPanel: handleScroll event
ChatMessagesPanel->>ChatMessagesPanel: Update isAtBottom state
Note over ChatMessagesPanel,TanStackVirtual: ✅ No React 19 hydration errors<br/>✅ No infinite re-render loops<br/>⚠️ Performance impact for long chats
|
Contributor
There was a problem hiding this comment.
Additional Comments (1)
-
apps/web/src/components/chat-messages-panel.tsx, line 133-171 (link)style: dead code - the virtualizer,
virtualizerRef,measureElementRef, andvirtualListContainerStyleare never used sinceshouldVirtualizeis hardcoded tofalseconsider removing lines 133-171 or adding a feature flag to re-enable virtualization later
Score: 4/5 - this is definitely dead code that should be cleaned up, but it doesn't cause runtime issues
1 file reviewed, 1 comment
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
virtualizerRefworkaround was insufficient - errors still occurshouldVirtualize = falseto force all messages to use the non-virtualized render pathRoot Cause Analysis
The
@tanstack/react-virtuallibrary has known compatibility issues with React 19:The previous fixes (PRs #431, #432, #433, #434) attempted workarounds but the error persists because it originates INSIDE the library's internal code, not in our component wrapper.
Trade-off
Test plan
🤖 Generated with Claude Code