agent pane: the Inspector floats beside the transcript, and pushes the chat when there is no room
The Inspector (the chat's right-hand panel) lay over the chat at every pane width, so in a narrow pane or one side of a split it covered the transcript: Leo's prompt sat on "Background tasks", and Retry and Edit sat on "5 finished". Now it never lies over the transcript's text.
- Wide pane: the panel floats as a dropdown under the header's toggle, in the right gutter beside the transcript's centered column. The transcript does not move. It floats only when the gutter,
(pane − column) / 2frommodel.ts transcriptColumnwith the chat's real column (Text Width and the DebugchatWidthincluded), fits the panel plus 8px on each side. - Otherwise it pushes: the panel takes its own column and the chat reflows beside it. A pushed panel narrows to keep a 440px chat and its 8px margin, down to its 260px minimum. In a 560px pane of a split, that leaves a 292px chat that the panel never covers.
- Clicking elsewhere does not close it; only its toggle does (unchanged).
- Settings > Agent Chat > Inspector: Push still always pushes. The default (
overlay) now means float when there is room, else push. The Settings description still says "Overlay lies over the chat"; renaming that choice is a Swift follow-up. - An output's diff split that leaves no room for a readable chat beside the panel still makes the panel step aside until the toggle. That now applies with the default too, since the default pushes when cramped.
- A dropdown, never a sidebar. Floating or pushing, the panel is the same glass dropdown (base's
.ui-glass). Both placements use base's floating-card radius, inset and ceiling: it sits at the header's foot, 8px from the pane's right edge, and is as tall as its sections. Past the ceiling (560px, and 80% of the room under the header), it scrolls inside. Pushing, it still reserves its width in the shell's row but aligns to the top, so the column below it is the chat's own page, not an empty slab. Leo: "this BECAME A ... SIDEBAR ... ALL THIS ... DEAD SPACE". The card chrome is a separate PR.
Before / after
Gallery agent-pane.inspector-motion, state reopened (the whole pane with the Inspector open), built at the merge-base and at this branch on the Linux gallery, at three pane widths (dark). "Covers" counts the transcript rows and composer the panel's rect meets, read in Chromium.
| Pane | Before | After |
|---|---|---|
| 700px (one side of a split) | overlay, full height, covers 3![]() | push, 260px, 186px tall, covers 0![]() |
| 1000px | overlay, full height, covers 3![]() | push, 186px tall, covers 0![]() |
| 1600px | overlay, covers 0![]() | floats in the gutter, 186px tall, covers 0![]() |
No capture: webview-only; Linux gallery before/after above
Changelog
Fixed: The chat's Inspector no longer covers the transcript: it floats beside the text when the window is wide and pushes the chat aside when it is not.
Observed / Not run
test/chat-inspector-placement.test.ts(new, Chromium and WebKit):- At 1600px the panel floats, meets no transcript row or the composer, and the transcript does not move.
- At 560, 700, 900 and 1200px it pushes and meets no row or the composer.
- At 700px (push) and 1600px (float) the panel is under half the pane's height, and the foot of its column is the page, not the panel. This case was committed before the hugging fix.
- A click elsewhere leaves it open, and the toggle closes it.
- It is committed before the fix (b214749eb85); at the base the narrow cases fail because the panel lies over the rows.
test/chat-inspector.test.tsx: the placement test now asserts float at 1600, push at 1200 and 720 (the panel narrows to 272px), and Settings Push.test/chat-inspector-overlay-toggle.test.tsnow opens at 1600px, so the panel floats there as the test expects. It still expects the panel's top at the header's foot.test/chat-inspector-overlay-transcript.test.tscomes from another lane (66046fae1f8, fix-agent-inspector-overlap): no row or prompt bubble ends within 18px of the open panel's left edge at 900px, and when closed the rows go back to the centered column. One change: it now waits fordata-placement="push"instead of"overlay", because at 900px the default now pushes. Its row checks are unchanged.cmux-ci compile-check --apppassed on f62f2c3998e and was rerun on ec1eb1c1757 (after taking feat-cmux-next).- Ran
scripts/web-lint.sh: its only errors are on base (TS2339 in test/composer-row-layout.test.ts, which this PR does not touch) andpython3 scripts/cmux-next/prepush-gate.py(no new violations). The browser tests run in CI, not on the Mac.
Leo-ask: ask-4a486ecf55
Leo-ask: ask-dd9354c78d
Leo-ask: ask-93e2f41461
Agent session: cosmic-gray





