cmux NEXT Inspector: the card stops at a ceiling, never a full-height column, however busy the chat
Leo, 2026-10-22: "also wtf this sidebar like ik we're fixing it not being a whole fucking sidebar and shit but why does it FLICKER AND WHY DOES IT STAY ON IN THESE RANDOM SITUATIONS WITHOUT BEING CLOSABLE!?" His screenshot shows an in-pane diff with the Inspector over it, running from under the header to the pane's foot (Subagents "+94", Background tasks "175 finished").
This PR fixes the "whole sidebar" part. Closing the card (a close button and Esc) and the flicker each get their own PR.
Cause. #24020 made the overlay a card as tall as its sections, capped at the pane's foot (max-height: calc(100% - top - inset)). Over the in-pane diff it is the same card with the same CSS; nothing in the CSS is specific to the diff. But a busy chat's sections (Subagents +94, Tasks 175, Changes, Outputs) are taller than any pane. So the card always reached the cap and read as a full-height column, over the chat and over a diff alike.
Fix (inspector.css only). Over the chat, the overlay card's max-height is the smallest of:
--acpmux-inspector-max-height(560px);- 80% of the room under the header;
- the old cap, the pane less its inset.
Past that, its body scrolls, as before. The pushed column (the Push setting the viewer picks) is unchanged.
Test (red first). webviews/test/chat-inspector-overlay-toggle.test.ts, "over the chat the Inspector never runs the pane's height, however tall its sections". In real Chromium and WebKit, with every section padded taller than the pane, at pane heights of 1400, 800 and 420:
- Red at base:
short: falsein both engines. - Green: all 8 tests in the file pass.
Capture. Before and after from the same harness (papercut chat, 1100ร820, sections padded to a busy chat's height):
- Before: the glass runs from under the header to the window's foot, covering the composer.
- After: the card ends at about 600px, and the composer and the last answer show below it.
The webview gallery run in CI attaches screenshots.
๐ค Generated with Claude Code
Agent session: huge-blue
Summary by cubic
Fixes the Inspector overlay reading as a full-height column over a busy chat. The card was as tall as its sections, capped at the pane's foot; a busy chat's sections (Subagents +94, Tasks 175) always exceeded any pane, so the card covered the whole pane, including the composer. The card now stops at a ceiling โ the smallest of 560px, 80% of the room under the header, and the old cap โ and its body scrolls past that.
- Over the in-pane diff the card behaves the same, since it was never diff-specific.
- The pushed column (the setting the viewer picks) is unchanged; closing the card and the flicker are separate PRs.
- Adds a Chromium and WebKit test asserting the card stays short at pane heights 1400, 800, and 420, with sections padded taller than the pane.