fix(ui-kit-chat): let the model pill shrink so the running-state composer row fits phone widths - #153
Merged
Merged
Conversation
…oser row fits phone widths
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes narrow-phone composer overflow by making the model selector shrink while preserving Stop and Send controls.
Changes:
- Adds coordinated shrinking constraints to model selector wrappers and trigger.
- Threads model fixtures through testkits.
- Adds a 320px Playwright regression test.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
packages/ui-kit-chat/src/styled/model-selector.tsx |
Makes the styled trigger shrinkable. |
packages/ui-kit-chat/src/primitives/model-selector/model-selector.tsx |
Allows Ark wrappers to shrink within flex layouts. |
packages/harness-testkit/src/create-fake-harness.ts |
Supports model fixtures. |
packages/extension-testkit/src/core-kit.ts |
Passes models into the fake harness. |
packages/embed/test/helpers/boot.ts |
Exposes models through embed test setup. |
packages/embed/test/embed.it.test.ts |
Adds model fixtures and narrow-phone coverage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Jul 30, 2026
Merged
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.
The composer action row overflows the panel edge at phone widths during a running turn: Stop renders beside Send (+38px, deliberate - Send queues a follow-up while streaming) and nothing in the row could shrink. RCA traced it to the model pill's min-width:auto floor - but the one-line fix was insufficient: two Ark Combobox wrappers (Root, the actual flex item, and Control) also pin at max-content. Three coordinated classes: Root gets shrink min-w-0, Control gets shrink max-w-full min-w-0, the styled trigger gets min-w-0 shrink; the pill's existing inner truncate engages and the row fits from 393px down to 320px.
Latent since the row was written - PR #144 masked the idle state by widening the panel 40px; running state was never covered.
Regression guard at 320px (at 393px the 4px overflow keeps both buttons technically in-viewport, so no legal web-first assertion can catch it - a guard there would be vacuous): new IT asserts model pill, Stop, and Send are fully in-viewport while a scripted run streams. Proven non-vacuous: fails with the CSS reverted. Also threads an optional models sidecar through harness-testkit/extension-testkit so the IT renders a real model pill (the fake harness previously exposed none).
Verified by orchestrator: full diff review incl. hard-rule greps, embed rebuild + IT 15/15 rerun post-rebase, fallow pass 0 introduced.
🤖 Generated with Claude Code