fix: Insights chat panel scrolls off-screen after messages load#1991
fix: Insights chat panel scrolls off-screen after messages load#1991octo-patch wants to merge 1 commit intoAndyMik90:developfrom
Conversation
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe main chat area container in the Insights component received updated Tailwind layout classes to enforce proper flex sizing behavior. The change adds Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the Insights component by adding min-h-0 and overflow-hidden to the main chat area container, which prevents flex blowout and ensures the internal scroll area functions correctly. I have no further feedback to provide.
Fixes #1977
Problem
The Insights chat panel becomes invisible after messages load. The content briefly flashes on screen, then scrolls off the top of the viewport because the inner flex column lacks proper height constraints.
Without
min-h-0, the flex item respects its defaultmin-height: auto, allowing it to grow taller than its parent. This causes theScrollAreainside to also grow unconstrained, pushing content beyond the visible viewport.Fix
Add
min-h-0 overflow-hiddento the main chat area's inner flex column container inInsights.tsx:This constrains the flex item's minimum height to 0, allowing the
ScrollAreato properly contain its content within the available viewport space.Notes
The second part of the original issue (scrollIntoView scrolling the wrong ancestor) has already been addressed in the current codebase — the code now uses
viewportEl.scrollTopdirectly instead ofscrollIntoView().Test
Summary by CodeRabbit