Repository navigation
Conversation
…ths (#2189) The composer's bottom control row neither wrapped nor shed controls, so at narrow chat widths the agent/model/variant/harness chips and the concise toggle crowded and overlapped Send. - Tag the row's flexible control group (.amicode-composer-controls) and each select chip (agent/model/variant/harness) with a slot class. - The control group clips on the x axis (overflow-x: clip, with a 4px padding/-4px margin so focus rings stay inside), and every chip may shrink (min-width: 0) so labels ellipsize instead of painting over Send. The trailing controls are shrink-0. - Explicit shed order on the existing amicode-composer container: variant (36rem) -> harness (32rem) -> model label (28rem, icon-only, label visually hidden so the accessible name stays) -> concise (26rem, unchanged). The harness is never shed while degraded (it is the way back). Closes #2189 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…2189) Each composer chip's trigger sits inside TooltipV2's div[data-component="tooltip-v2-trigger"] (display: flex), and that wrapper is the row's real flex item. min-width: 0 on the button alone never let a chip shrink, so the wrapper gets min-width: 0 too (via :has), the add button's wrapper stays flex-shrink: 0, and the variant/harness sheds hide the wrapper as well so no empty flex item leaves a stray gap. Verified in headless Chrome against the built CSS at 320/400/520/600 px: no control overlaps another, and every visible control (Send included) is hit-testable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
jacktrnr
marked this pull request as ready for review
November 24, 2026 14:45
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.
Closes #2189
Problem
The composer's bottom control row (add, agent, model, variant, harness, concise, Send) neither wrapped nor shed controls. At narrow chat widths the chips overflowed the flexible control group and painted over the concise toggle and Send. Only the concise toggle had a container-query rule. The root cause sits one level deeper than the issue's file pointers: each chip's trigger is wrapped in TooltipV2's
div[data-component="tooltip-v2-trigger"](display: flex). That wrapper is the row's actual flex item, so its automatic min-width pinned every chip at full label width, even the model button that already hadmin-w-0.Approach (the smallest robust one)
CSS only, on the existing
amicode-composercontainer. I didn't add a wrap or an overflow menu.Send can never be overlapped. The control group (
.amicode-composer-controls, now tagged) clips on the x axis (overflow-x: clip). A 4px inline padding offset by a -4px margin keeps the first and last chips' focus rings inside the clip, andclipleaves the y axis visible. Popovers and menus are portaled, so they are unaffected. The trailing wrapper isshrink-0.Labels ellipsize instead of overlapping. Each chip (agent/model/variant/harness) and its tooltip wrapper (matched with
:has) getmin-width: 0. The label spans were alreadytruncate. The add button's wrapper isflex-shrink: 0.Explicit shed order, widest breakpoint first:
The agent chip and Send are never shed. The agent label ellipsizes when needed.
About the 26rem concise breakpoint: it fits the new order. The issue noted that the other chips overflowed before 26rem kicked in. Now variant, harness, and model label all shed earlier, so between 26rem and 28rem the row needs only about 290px of the 416px available, and concise is the last to go. I left the value unchanged to preserve #1633's behavior.
Wiring: slot classes on the agent/variant selects (a new optional
classpassthrough onPromptInputV2ConfiguredSelect), on the model control and its label span, and on the harness trigger.data-harness-degradedsits on the control group. This PR doesn't touchsubmit.tsor the concise logic (#2171, #2172).Tests
packages/app/src/components/prompt-input/composer-row-responsive.test.ts(14 tests). Following the repo's pattern, it asserts the CSS and wiring from source: slot class wiring, the x-clip with focus-ring room, shrinkable chips and tooltip wrappers, a non-shrinking add button, one breakpoint per sheddable control in strict priority order, concise kept at 26rem, variant/harness removed with their wrapper, the harness exempt while degraded, and the model label visually hidden (notdisplay: none). I wrote the tests first and saw them fail (RED), then made them pass.composer-row-responsive+harness-control+session-header: 45 pass, 0 fail.src/v2/components/prompt-input: 38 pass, 0 fail.overlay_typecheck_gate.sh: OK across 7 packages.drift_gate.mjs: PASS.app/.../prompt-input/submit.test.ts:toasterexport not found inui/src/components/toast.tsx.session-ui/.../editable-diff-view.test.ts: 1 cm-selection theme test.Visual check
I built the app CSS (
vite buildin the materializedpackages/app) and loaded it into a harness page. The page reproduces the row's DOM, tooltip-v2-trigger wrappers included. I rendered it in headless Chrome at composer widths of 320, 400, 520, and 600 px, with typical labels, long labels, and a degraded harness. For each visible control the harness measured the visible rect, tested pairwise overlap, and ranelementFromPointat the control's center.The layout is the same in light and dark mode: this change touches no color tokens.
Possible follow-up (not done here, to keep this minimal): with very long labels in the 576–650px band, the variant chip can ellipsize down to a single letter before it sheds at 36rem. Weighting
flex-shrinktoward the model and harness chips would fix that.🤖 Generated with Claude Code