Skip to content

fix(app): let long model, agent and variant names truncate in the composer footer - #47330

Closed
Capicua25x wants to merge 2 commits into
anomalyco:devfrom
Capicua25x:fix/composer-long-model-names-dev
Closed

Capicua25x wants to merge 2 commits into
anomalyco:devfrom
Capicua25x:fix/composer-long-model-names-dev

Conversation

@Capicua25x

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?

On a phone the V2 composer footer (agent / model / variant) runs under the send button when the model has a longer display name: the row is a flex row, and none of the controls can get narrower than their text, so the last one is pushed under the button.

Every control already renders its label in a truncate span, but that span sits inside an inline-flex button, which sits inside the TooltipV2 trigger div (display: flex). Flex items default to min-width: auto, so at each of those three levels the box refuses to shrink below its content and truncate never gets to act.

The change is min-w-0 at those levels: the label spans, the shared agent/variant trigger button (it had max-w-[220px] without a min-w), and the tooltip trigger wrapper around the model control and the configured selects. With that the labels ellipsize instead of overflowing, and nothing changes on wide viewports. 3 files, +6/-4.

How did you verify your code works?

  • Built dev (1.18.28) with the patch, ran it on an Android phone (~412 px): the variant control no longer sits under the send button; the model name ellipsizes first.
  • Headless Chromium at 360 px, measuring getBoundingClientRect of the footer controls before/after: before, the variant control spanned x 303–385 (past the viewport, under the send button at x 291); after, Build 73–120, model 124–230, variant 234–291, send button 291–319.
  • Qwen and GLM sessions work as before (the change is CSS classes only).

Screenshots / recordings

Phone, before / after:

Headless Chromium at 360 px, before / after:

Checklist

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

…he composer footer

The composer footer is a flex row (+ / agent / model / variant / send). Each control's label is a
'truncate' span inside an inline-flex ButtonV2, and the button sits inside a TooltipV2 trigger div
(display: flex). A flex item defaults to min-width: auto, so at every level of that chain the box
refuses to shrink below its content and 'truncate' never gets a chance: with a long model display
name on a narrow viewport the row overflows and the variant control ends up under the send button.

Fix: min-w-0 on the label spans, on the shared agent/variant trigger button (it had max-w without
min-w), and on the TooltipV2 trigger wrapper of both the model control and the configured selects,
so the ellipsis can kick in. No change on wide viewports.
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

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

Based on the search results, I found one related PR that may be addressing a similar issue:

Related PR found:

This PR appears to be related to the same problem area (controls covering the send button in the composer footer), though it may have been closed or superseded by the current PR #47330.

Additionally, PR #43298 (fix(app): keep prompt submit visible on narrow displays) is also in the same area and may be related to narrow viewport display issues with the composer footer.

These PRs share the same root cause domain (composer footer overflow issues on narrow displays), but the current PR (#47330) is the one that specifically addresses the truncation fix.

…omalyco#43295)

Mocks a model with a long display name and a variant, opens a session at 320 px and asserts that the
controls row, the model button and the variant chip all end before the send button starts, and that the
send button stays inside the viewport. Adds a data-slot="prompt-controls" anchor on the controls row.

The idea of asserting the send button's box against the controls' box at 320 px comes from
bmpenuelas' anomalyco#43298; this is a fresh spec written for the truncation approach.
@Capicua25x

Copy link
Copy Markdown
Author

Added a regression test (e2e/regression/prompt-controls-narrow.spec.ts): long model name + variant at 320 px, asserting the controls end before the send button. It fails on dev (variant chip right edge at 439 px vs the button at 263 px) and passes with the fix. The 320 px box assertion follows the idea in #43298 by @bmpenuelas.

@Capicua25x

Copy link
Copy Markdown
Author

Tried both approaches on a phone side by side and I prefer the scroll track in #43298: every name stays readable and nothing collides. Closing this one in favor of #43298. For reviewers: bmpenuelas' four commits replay cleanly on current dev (his branch is ~230 commits behind), and the build works.

@Capicua25x Capicua25x closed this Sep 4, 2026
@russrapper15-png

russrapper15-png commented Sep 4, 2026 via email

Copy link
Copy Markdown

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