fix(max): constrain AI chat composer height#4
Open
lordspline wants to merge 2 commits into
Open
Conversation
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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.
Problem
PostHog AI chat composer can grow too tall when a long prompt is pasted, which can leave the send and queue controls unreachable in constrained viewports.
Fixes PostHog#62461
Changes
How did you test this code?
Agent-authored verification:
pnpm --filter=@posthog/frontend formathogli test frontend/src/scenes/max/components/QuestionInput.test.tsxpnpm --filter=@posthog/frontend typegen:writeto generate ignored local Kea type files before type checkingpnpm --filter=@posthog/frontend typescript:check👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Automatic notifications
Docs update
Not needed for this UI bug fix.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Captain Capy implemented this from a human-directed bug report. I reproduced and measured the composer in the main scene, side panel, laptop, narrow, and very-short viewport cases before changing the layout.
I chose a Max-specific viewport cap rather than changing the shared LemonTextArea API, after checking the queued-message block, slash-command autocomplete, and hands-free surface. The goal is to preserve existing textarea autosize, keyboard behavior, focus, labeling, shared-thread behavior, and autocomplete anchoring while preventing the composer from consuming the viewport.
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.