fix(ai): constrain chat input height to prevent button overflow#29
Open
lordspline wants to merge 1 commit into
Open
fix(ai): constrain chat input height to prevent button overflow#29lordspline wants to merge 1 commit into
lordspline wants to merge 1 commit into
Conversation
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Visual QA —
|
| Before (master) | Textarea grows to maxRows={10}; overflow happens silently with no scrollbar affordance |
| After (PR) | Textarea capped at max-height: 16rem (the top of the clamp range); a scrollbar appears, making overflow explicit |
Long message typed (narrow 375×812)
| Before (master) | Textarea grows tall, no scrollbar visible in the textarea itself |
| After (PR) | Clear vertical scrollbar visible; send button (→) remains accessible at the bottom-right corner |
Key observations
- Empty state: visually identical ✅
overflow-y: auto !important: scrollbar now appears on overflow — this is the most visible change ✅max-height: clamp(6rem, calc(100vh - 12rem), 16rem): at test viewports (800–812px height), the 16rem cap is the binding constraint. The100vh - 12rembranch protects very short viewports (mobile keyboard open, ~300–450px) wheremaxRows={10}alone would push the send button off-screen ✅- Send button (→): accessible in all tested states ✅
- No regressions on the suggestion chips or empty-state layout ✅
See screenshots in the next 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


This PR fixes an issue where typing long messages in the PostHog AI chat caused the input box to grow beyond the viewport, making the send button unreachable and the page unscrollable.
clamp(6rem, calc(100vh - 12rem), 16rem)to caps height at reasonable limits across all viewportsNeed help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.