fix(site/src/pages/AgentsPage): cap queued messages list height so chat scroll keeps working#24950
Merged
Merged
Conversation
…at scroll keeps working When many messages were queued the input section grew unbounded. The sibling ChatScrollContainer is flex-1 min-h-0 so it absorbed the shrinkage and clientHeight collapsed to 0, leaving the chat history unscrollable. QueuedMessagesList now caps itself at 40svh and scrolls inside its own pane. The composer textarea already self-caps at max-h-[50vh]. Linear: CODAGT-313 Generated by Coder Agents.
DanielleMaywood
approved these changes
May 5, 2026
Comment on lines
+173
to
+175
| // Cap the queue at ~40% of the small viewport so a long queue | ||
| // does not push the chat history's scroll container down to | ||
| // zero height (CODAGT-313). The list scrolls inside its own pane. |
Contributor
There was a problem hiding this comment.
We don't need the comment
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.
Linear: CODAGT-313
Summary
When many messages are queued in the agent chat, the chat history becomes unscrollable: mouse wheel and scrollbar drag both stop responding.
The input wrapper in
AgentChatPageView.tsx:496isshrink-0 overflow-y-autowith nomax-height, sooverflow-y-autois a no-op and the section grows unbounded asQueuedMessagesListadds rows. Its siblingChatScrollContainerisflex-1 min-h-0, so it absorbs the shrinkage andclientHeightcollapses to 0. The chat list is then a zero-height viewport with nothing to scroll.Measured against the actual
AgentChatPageViewrendered in Storybook with 20 queued messages (1280x800):clientHeightmainDemo
Left (
main): wheel-up does nothing because the chat scroll container has been crushed to zero height.Right (this PR): the queued list scrolls inside its own pane and the chat history scrolls normally.
Recording is
AgentChatPageViewrendered through Storybook with the production component source. The same gesture (wheel-up over the chat history, then wheel-down over the queued list) is applied to both sides. Source for the recording is inbpmct/codagt-313-assets.Change
Why this spot, not the outer wrapper
The composer textarea already self-caps at
max-h-[50vh]inChatMessageInput.tsx:688, so the only unbounded growth source in the input section is the queued list. Capping the list keeps the constraint colocated with the component that owns it, and any future consumer ofQueuedMessagesListis automatically safe.40svh(small viewport height) so the queue doesn't fight with the iOS keyboard once it appears, matching theh-dvhdecision in #24848.Generated by Coder Agents.