{{ message }}
fix(site): keep at least 8 characters of the model name visible in the model selector - #28487
Merged
Merged
Conversation
…e model selector trigger The trigger's min-w-0 chain let the label collapse to zero width when the composer badge row was full, leaving only the provider icon and chevron. Give the label a min-w-[8ch] floor and remove the min-w-0 overrides so the floor propagates; the badge overflow (+N) pill absorbs the remaining pressure. The gap between the label and the chevron is unchanged.
… min-w-0 Removing min-w-0 made the label wrapper's automatic minimum the full nowrap label width, so nothing could shrink: truncation stopped and the chevron was pushed out and clipped. Restore the original inner structure (min-w-0 wrapper + truncate label) and put an explicit min-width on the trigger button: 8ch of label plus the fixed chrome (padding, provider icon, gaps, chevron). The button now shrinks and truncates normally but never below ~8 characters, with the chevron always inside the pill.
tracyjohnsonux
enabled auto-merge (squash)
August 25, 2026 17:34
With the model selector no longer collapsing, the shrink pressure moved to the workspace pill, whose overflow-hidden wrapper clipped it down to just the status icon with no chevron. Raise its md min-width from 2.75rem to the same 8ch + 3.125rem floor as the model selector, and make the trigger fill the wrapper so the truncating name span shrinks instead of the wrapper clipping the chevron.
calc() requires whitespace around +, and Tailwind arbitrary values encode spaces as underscores. calc(8ch+3.125rem) produced invalid CSS that was silently dropped, so the floor never applied.
calc() requires whitespace around +, and Tailwind arbitrary values encode spaces as underscores. calc(8ch+3.125rem) produced invalid CSS that was silently dropped, so the floor never applied.
The plain span wrapping WorkspacePill had an automatic minimum equal to the pill's full content width, so under pressure the pill never shrank and was clipped to just its icon. Make the wrapper a flex container that can shrink, with the same md 8ch + chrome floor as the pill itself. Verified in Storybook at narrow desktop panel widths: both pills hold 8 characters with ellipsis and visible chevrons.
…urizes Treat the attached workspace like the other overflow-managed badges. When the row overflows and the workspace would otherwise survive only as a tiny minimum-width pill, stop rendering it in the visible row and surface it through the +N overflow popover instead. Update the stories to exercise the real attached-workspace path used by the chat view.
… overflow The below-md icon-only variant was the remaining tiny state: at narrow viewports the pill collapsed to a bare status icon that always fit, so it never entered the overflow popover. Render name and chevron at every breakpoint with the 8ch floor; when the floored pill no longer fits, the badge overflow system moves it into the +N popover. The pill renders whenever workspace data is present, with attachedWorkspace only enriching its overflow-popover fallback badge.
Contributor
Author
|
To use Codex here, create a Codex account and connect to github. |
ibetitsmike
reviewed
Aug 26, 2026
ibetitsmike
left a comment
Collaborator
There was a problem hiding this comment.
Disclosure: This review was researched and written by Xum, an AI coding agent, acting for @ibetitsmike.
Ran the repo frontend-review audit (FE1-FE10 from .claude/docs/FRONTEND_PATTERNS.md) over the merge-base diff (4 files under site/src/).
FE1 PASS LongWorkspaceNameMobile play opens the +N overflow popover and asserts the collapsed workspace renders
FE2 PASS no any / casts / non-null assertions
FE3 PASS reuses ToolBadge, WorkspacePill, Popover, useOverflowCount; tight scope
FE4 PASS min-width floor math comments carry rationale (8ch + 3.125rem chrome)
FE5 PASS n/a - layout/styling only
FE6 PASS accessible names include visible text; trigger keyboard-reachable; overflow items leave the a11y tree cleanly
FE7 PASS n/a - no queries/mutations touched
FE8 PASS n/a - no effects touched
FE9 PASS MockWorkspace / MockWorkspaceAgent reused
FE10 PASS role/name queries (findByRole button/dialog)
Notes:
ModelSelectorandWorkspacePillshare the samemin-w-[calc(8ch_+_3.125rem)]floor, so at least 8 characters of the model name stay visible before overflow kicks in; a collapsed workspace falls back to a functionalToolBadgepopover (direct link + remove button).- Pre-existing, not introduced here: the story retains a
closest(".flex.items-center.justify-between")+ scrollWidth/clientWidth geometry assertion carried over from the old story body.
Verdict: clean per the FE rule contract; no blocking findings. CI green at 2817c51c.
Contributor
Author
ibetitsmike
approved these changes
Aug 26, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
When the composer's button area fills up (badges, workspace pill, MCP servers), the model selector trigger in the chat input collapses down to just the provider icon and chevron — the model name is truncated away entirely. The trigger
Buttonhadmin-w-0, so the flex chain allowed thetruncatelabel to shrink to zero width.Fix
Add an explicit width floor on the trigger button:
min-w-[calc(8ch+3.125rem)]— 8ch of label plus the fixed chrome around it (px-2padding,size-3provider icon, twogap-1gaps,size-3.5chevron).min-widthreplaces the button's automatic minimum, so it still shrinks and the label still truncates with an ellipsis, but never below ~8 visible characters.min-w-0wrapper +truncatelabel) is unchanged, so truncation behavior and the label–chevrongap-1are identical to before; the chevron always stays inside the pill.+Noverflow pill absorbs the remaining width pressure.No behavior change for the other
ModelSelectorcallsites other than gaining the same floor, which only applies under width pressure.Iteration notes
An earlier revision removed
min-w-0from the button and label wrapper and putmin-w-[8ch]on the label. That backfired: withoutmin-w-0, the wrapper's automatic minimum became the full nowrap label width, so nothing could shrink — truncation stopped and the chevron was pushed out and clipped. The final approach floors the button width explicitly instead, leaving the shrink/truncate mechanics untouched.This PR was generated by Coder Agents on behalf of @tracyjohnsonux.