fix(agent): keep agent chat sidebar scroll container shrinkable - #18252
fix(agent): keep agent chat sidebar scroll container shrinkable#18252euvre wants to merge 1 commit into
Conversation
Add min-h-0 to the message list scroll container in the agent debug chat drawer (pages/agent/chat/box.tsx), matching the sibling chat containers (next-chats/chat/chat-box/single-chat-box.tsx, agent/explore/components/session-chat.tsx) which already carry it. Without an explicit min-h-0 the flex item relies on overflow:auto zeroing its automatic minimum size; making it explicit keeps the streaming answer view anchored to the bottom of the sidebar regardless of how ancestors size the flex column.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe chat message container now uses ChangesChat layout
Estimated code review effort: 1 (Trivial) | ~2 minutes Mergeability Score: ⚪ Minimal · up to This change makes the chat scroll container explicitly shrinkable to preserve streaming auto-scroll behavior without changing the drawer layout; no actionable merge-blocking risk remains. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
wangq8
left a comment
There was a problem hiding this comment.
Reviewed. Adding min-h-0 to the flex-1 overflow-auto scroll container is correct and matches the sibling chat containers (single-chat-box.tsx, session-chat.tsx). This is the canonical fix for the flex-item automatic-minimum-size issue that breaks bottom-anchored auto-scroll. LGTM.
Problem
In the agent canvas debug chat sidebar, the streaming answer area could fail to stay anchored to the bottom because the message-list scroll container (
web/src/pages/agent/chat/box.tsx) was aflex-1 overflow-autoflex item without an explicitmin-h-0. Both sibling chat containers already carrymin-h-0on the same pattern:web/src/pages/next-chats/chat/chat-box/single-chat-box.tsx(line 86)web/src/pages/agent/explore/components/session-chat.tsx(line 122)Change
Add
min-h-0to the scroll container class list inbox.tsx, so the flex item is explicitly shrinkable instead of relying onoverflow:autozeroing its automatic minimum size, keeping the auto-scroll-to-bottom behavior stable regardless of how ancestors size the flex column.Verification
Ran the agent debug chat drawer against a ~6k-char streaming answer and sampled the scroll container every second:
scrollTop + clientHeight >= scrollHeight - 25held for every sample (atBottom true), computedmin-height: 0px, and the drawer layout is unchanged.