Repository navigation
fix(web-ui): prevent long model names from clipping composer Harness picker on mobile - #1278
Merged
Merged
Conversation
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
Summary
Fixes #1260.
On narrow mobile viewports (390×844 and 360px), selecting a long model name (such as Claude Code's
Default (recommended)or Pi'scodex / gpt-5.6-luna) caused the model selector in the bottom composer toolbar to resist shrinking and push the adjacentHarnessSelecticon button past the right edge of.controlScrollinto the send-button area (clipping it to a sliver or hiding it entirely).Root Cause
InputBar.module.css,.row[data-phone-toolbar] .standardControlswas locked toflex: none; width: max-content, preventing the right-side control group from shrinking inside.controlScrollwhen sibling controls (PermissionSelect,VoiceInput,FastToggle,HarnessSelect) competed for horizontal space.ModelSelect.module.css,:global([data-phone]) .triggersetmax-width: noneand:global([data-phone]) .triggerLabelsetflex-shrink: 0; max-width: 100px, preventing the model label from shrinking below 100px when the row became tighter than the full unshrunk control width.Changes
apps/web-ui/packages/client/ui-model-selection/src/client/ModelSelect.module.css:.rootasflex: 0 1 auto; min-width: 0.:global([data-phone]), constrain.triggerwithmax-width: 100%and change.triggerLabelfromflex-shrink: 0toflex: 0 1 auto; min-width: 0; max-width: 100pxso long model names truncate smoothly with ellipsis up to the existing 100px ceiling while yielding space on narrow rows.apps/web-ui/packages/client/ui-model-selection/src/client/HarnessSelect.module.css:.controlsflex: 0 1 auto; min-width: 0; max-width: 100%so the wrapper shrinks aroundModelSelectwhile keepingHarnessSelect's.trigger(flex-shrink: 0,40×44pxon mobile) intact.apps/web-ui/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css:.row[data-phone-toolbar] .standardControlsto shrink (flex: 0 1 auto; min-width: 0; margin-left: 0) while keeping.modesand[data-slot="conversation.input.right"] > *non-shrinking (flex-shrink: 0).flex: none; width: max-contenton.row[data-phone-toolbar][data-toolbar-measuring] .standardControlsduringobserveControlRow's synchronous measurement pass sodata-actions-overflowstill moves overflow actions (e.g., screenshot) into the+menu when unshrunk demand exceeds available width.min-width: 0/max-width: 100%/flex: 0 1 autoconstraints to.pendingModeland.pendingModelLabelunder:global([data-phone])for consistent pending-session layout.Validation
npx prettier --checkon all 3 modified CSS files — passednpx tsc -b packages/shared-contracts packages/desktop-control && npm run build:web:ui— passed (all 43 Web UI client plugins + browser shell built cleanly)lightningcss-compiled CSS modules in both Playwright Chromium (Google Chrome) and WebKit (Safari):Default (recommended)+ permission + voice):clipped=0,overlaps=false, label cleanly ellipsizes to78px,HarnessSelect(40px) and Send (44px) fully visible with 4px gap.codex / gpt-5.6-luna+ permission + voice + fast):clipped=0,overlaps=false, label ellipsizes to36px,HarnessSelectand Send fully visible.Default (recommended)+ permission + voice; and minimalcodex / gpt-5.6-luna):clipped=0,overlaps=false,HarnessSelectand Send fully visible.data-actions-overflowstill triggers as expected via[data-toolbar-measuring].labelW=137,HarnessSelect=30px, zero visual regression).