Skip to content

fix(ui-kit-chat): let the model pill shrink so the running-state composer row fits phone widths - #153

Merged
omridevk merged 2 commits into
mainfrom
fix/composer-row-shrink
Jul 30, 2026
Merged

fix(ui-kit-chat): let the model pill shrink so the running-state composer row fits phone widths#153
omridevk merged 2 commits into
mainfrom
fix/composer-row-shrink

Conversation

@omridevk

Copy link
Copy Markdown
Contributor

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

Copilot AI review requested due to automatic review settings July 30, 2026 18:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/ui-kit-chat/src/styled/model-selector.tsx
Copilot AI review requested due to automatic review settings July 30, 2026 19:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@omridevk
omridevk merged commit 2aa2b01 into main Jul 30, 2026
29 of 30 checks passed
@omridevk
omridevk deleted the fix/composer-row-shrink branch July 30, 2026 22:17
@github-actions github-actions Bot mentioned this pull request Jul 31, 2026
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.

2 participants