You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement @tanstack/react-virtual for efficient rendering of long chat
sessions. Previously, opening a session with 1000+ messages would freeze
the browser. Now only visible messages are rendered.
- Add @tanstack/react-virtual dependency
- Use useVirtualizer hook with dynamic height measurement
- Implement smart auto-scroll that only scrolls when user is near bottom
- Handle scroll position tracking to preserve scroll during loading
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: TODO.md
+1-13Lines changed: 1 addition & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,19 +16,7 @@
16
16
17
17
## Tasks
18
18
19
-
### Performance
20
-
21
-
#### Virtualize long chat session rendering
22
-
**File**: `web/src/pages/WorkspaceDetail.tsx` (or wherever chat messages are rendered)
23
-
24
-
Opening a long chat session (1000+ messages) freezes the browser because all messages are rendered at once. Need to implement virtualized list rendering.
25
-
26
-
**Fix**:
27
-
1. Only render last ~100 messages initially
28
-
2. Use virtualization library (react-window or @tanstack/virtual) to render only visible messages
29
-
3. Load more messages on scroll up
30
-
4. Unload messages when scrolling away to keep DOM size manageable
31
-
5. Keep scroll position stable when loading older messages
0 commit comments