Skip to content

fix(chat): replace Radix ScrollArea with native scroll - #173

Merged
actus7 merged 3 commits into
mainfrom
fix/chat-native-scroll
Jul 30, 2026
Merged

fix(chat): replace Radix ScrollArea with native scroll#173
actus7 merged 3 commits into
mainfrom
fix/chat-native-scroll

Conversation

@actus7

@actus7 actus7 commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Radix ScrollArea thumb position breaks in production because it relies on JS ResizeObserver that miscalculates with streaming content. Switched to native overflow-y-auto which the browser handles reliably. The scrollViewportRef points directly at the scroll div so auto-scroll and scroll-up detection still work.

actus7 added 2 commits July 30, 2026 10:10
Arbitrary Tailwind variants were stripped in production build.
Move the display:block rule for Radix ScrollArea inner wrapper to
globals.css so it survives minification.
The Radix ScrollArea calculates thumb position via JS (ResizeObserver)
which breaks in production builds with dynamic/streaming content. Native
overflow-y-auto uses the browser's built-in scrollbar, which always
renders correctly. scrollViewportRef now points directly at the scroll
container div, preserving auto-scroll and scroll-up detection.
Copilot AI review requested due to automatic review settings July 30, 2026 13:52
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
modelhub Ready Ready Preview Jul 30, 2026 4:02pm

@actus7
actus7 merged commit 53dcdc4 into main Jul 30, 2026
1 of 2 checks passed
@actus7
actus7 deleted the fix/chat-native-scroll branch July 30, 2026 16:01
@github-actions github-actions Bot added the frontend Frontend changes label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Frontend changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants