Skip to content

fix(app): prevent prompt controls from covering send - #43383

Closed
OpeOginni wants to merge 2 commits into
anomalyco:devfrom
OpeOginni:prompt-overflow
Closed

OpeOginni wants to merge 2 commits into
anomalyco:devfrom
OpeOginni:prompt-overflow

Conversation

@OpeOginni

@OpeOginni OpeOginni commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #43382
Closes #43295
Closes #42834

Type of change

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

What does this PR do?

  • Prevents the Agent, Model, and Variant controls from covering the send button on narrow desktop and mobile layouts.
  • Keeps the Model selector visible while moving Agent and Variant into a grouped overflow menu when the composer is narrow.
  • Keeps all three controls inline when the composer has enough space.
  • Reserves space for the send button and truncates long selector labels safely.
  • Uses a grouped overflow design inspired by how T3Code handles these controls.

How did you verify your code works?

  • Ran bun typecheck in packages/app.
  • Ran bun typecheck in packages/session-ui.
  • Ran bun test in packages/session-ui with 83 passing tests.
  • Passed the repository pre-push typecheck across 30 packages.

Screenshots / recordings

Screen.Recording.2026-08-19.at.10.26.39.mov

Checklist

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

@Enough1122

Copy link
Copy Markdown

AI code review — automated review for reference; please use your judgment.

  • packages/session-ui/src/v2/components/prompt-input/index.tsx:640 — the overflow trigger's aria-label/Tooltip use label(), which is the agent label whenever an agent control exists, yet the opened menu can contain both the variant and agent groups; screen-reader users hearing "Choose agent" then finding variant options inside is confusing. Use a neutral name like "More options", or compose the label from whichever groups are actually present.
  • packages/session-ui/src/v2/components/prompt-input/index.tsx:258-268 — the visibility predicate (props.variantControlVisible ?? true) && view.variant && view.variant.options().length > 1 is spelled out three times in ten lines (outer Show, the variant prop ternary, plus the earlier wrapped select); extract one derived value so a future edit to the gating rule cannot update one copy and miss the others.
  • packages/session-ui/src/v2/components/prompt-input/index.tsx:221,250 — the wrapped selects stay mounted under hidden @2xl:contents, so their keybinds (Mod+., Shift+Mod+D) presumably stay live at narrow widths where their triggers are display:none; invoking the shortcut would then open a popover anchored to an invisible element (or appear to do nothing). Verify the popover behavior when hidden, or suppress the keybind handling in that state.
  • packages/app/src/components/prompt-input-v2.tsx:503 — moving min-w-0 max-w-[220px] onto TooltipV2 assumes that class lands on the trigger wrapper; if TooltipV2 applies class to the floating panel instead, the 220px cap now constrains tooltip content rather than the button and long model names will lay out differently than before. Confirm which node receives the class in both call sites (:503 and :584).
  • packages/session-ui/src/v2/components/prompt-input/index.tsx:247 — no test pins the breakpoint contract (inline selects visible ≥@2xl, overflow menu below, never both); a small component test asserting mutual exclusivity would guard against silent breakage from future Tailwind class tweaks.

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

Projects

None yet

2 participants