Skip to content

fix(app): fit composer controls on mobile and enlarge touch targets - #52940

Closed
afonsoft wants to merge 3 commits into
anomalyco:devfrom
afonsoft:mobile-model-chip
Closed

afonsoft wants to merge 3 commits into
anomalyco:devfrom
afonsoft:mobile-model-chip

Conversation

@afonsoft

@afonsoft afonsoft commented Oct 3, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #43295

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Two mobile fixes in the composer control row (v1 PromptInput + v2 PromptInputV2):

1. Overflow on narrow viewports. The model chip renders its full name (e.g. "LongCat 2.5 Preview Free", ~200px+) alongside the agent select, effort/variant select and submit button, overflowing the right edge — and in V2 rendering the controls over the send button, so tapping "send" opens a selector instead. Root cause: the tooltip trigger divs wrapping each control (and the data-component wrapper divs in v1) had no min-width override, so flex items could not shrink below min-content. Fix: min-w-0 across the chain + smaller caps below sm (model 140–150px, agent/variant 110px). Desktop widths unchanged; chips now ellipsize on mobile.

2. Touch targets below 44px. Composer chips and icon buttons are 28–32px tall (h-7, size-8, ButtonV2 normal/large), below the WCAG 2.5.5 / platform HIG 44px recommendation. Fix: pointer-coarse: variants grow the interactive box to 44px (h-11!/size-11!) only on touch devices. Because the controls are ghost/ghost-muted variants, the visual footprint is unchanged on mobile — only the hit region grows into the surrounding dead space. ! is required because component heights come from [data-size] attribute selectors that outrank plain utilities.

How did you verify your code works?

  • bun typecheck in packages/session-ui, packages/app and packages/opencode; bun turbo typecheck across the monorepo — clean (runs in the pre-push hook).
  • Class-level changes only; pointer-coarse is a built-in Tailwind v4 variant (@media (pointer: coarse)), so nothing changes on mouse/desktop.

Screenshots / recordings

N/A — no visual change on desktop; on mobile the model/effort chips ellipsize instead of overflowing, and tap targets reach 44px.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

The composer control row overflowed on narrow viewports: the model chip
rendered its full name (~200px+) plus the agent and effort selects, and
the tooltip trigger divs wrapping each control carried no min-width, so
nothing could shrink. Add min-w-0 to every control wrapper/trigger and
cap chip widths at 140-150px below the sm breakpoint (restoring the
desktop caps at sm and up) so names ellipsize instead of pushing the
row out of the viewport.

Co-Authored-By: Afonso Dutra Nogueira Filho <[email protected]>
@afonsoft

afonsoft commented Oct 3, 2026

Copy link
Copy Markdown
Author

cc @Hona @Brendonovich — could you review and approve? Mobile composer fix: model + effort chips now ellipsize below the sm breakpoint instead of overflowing the viewport.

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@afonsoft afonsoft changed the title fix(app): fit model and effort selectors on mobile fix(app): fit composer controls on mobile and enlarge touch targets Oct 3, 2026
@github-actions github-actions Bot removed needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@thdxr

thdxr commented Oct 10, 2026

Copy link
Copy Markdown
Member

This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web UI V2 prompt controls overlap the send button on narrow displays

2 participants