Chatbot UI: isolate message scrolling, stabilize input, and improve conversation readability #698
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.
Summary
This PR improves the chatbot user experience during long conversations by isolating message scrolling, keeping the input accessible, and refining message layout for better readability across screen sizes.
Problems addressed
1. Page scroll bleed during long chats
Previously, as conversations grew, scrolling would propagate to the entire page, causing layout overlap with content below the chatbot.
Fix
2. Input field visibility during extended conversations
The input box would move out of view once message height exceeded the viewport, breaking the chat flow.
Fix
3. Message width and alignment on smaller screens
Message cards were too wide on mobile devices, making conversations feel cramped and harder to read.
Fix
4. General UI polish
Testing notes
Assistant responses could not be tested end-to-end in this PR because the chatbot backend is currently exercised locally.
However, all UI behaviors related to scrolling, layout stability, and responsiveness were validated locally using simulated long conversations and loading states.
Disclaimer behavior (unchanged)
The original disclaimer section remains completely intact and unmodified.
During active chats, it stays outside the scrollable chat container and can be accessed by scrolling out of the chat area, exactly as before.
Scope
Screenshots
Landing page (unchanged)
Desktop
Before

After

Mobile
Before

After
