cmux NEXT Inspector and tray: a test clicks everything that looks clickable
Summary
Leo, on the Inspector's Subagents card: "CLICKING ON THESE DOESN'T DO ANYTHING." This adds a test that keeps that from coming back anywhere in the Inspector or the running tray, plus the fixes it found.
webviews/test/inspector-dead-clicks.test.tsx draws the Inspector with the gallery's busy chat: every section, 17 running subagents and chats, and 94 ended. It also draws the tray above the composer with five items. Every handler is a spy. The test then clicks every enabled button, role=button and link, opening folds and lists as it goes (about 180 elements in the Inspector). For each one:
- a button must call a handler, reach the host (
postNative, such as a background task's terminal), or change what the page shows (a fold, a menu, a longer list); - a link must go to an http(s) address.
It also checks that every chevron (disclosure.*) sits inside something clickable, and that no :hover rule lights a disabled button. A third case draws Subagents with no handlers: the lines must be disabled and must not light on hover.
What it found and fixed: disabled lines and disabled Stop buttons still took the hover tint. That is a subagent line with no way to open it, or a Stop that was already sent. .acpmux-summary-link, .cv-subagent__stop and the Inspector's icon buttons now hover only when enabled.
Stacked on #23916 (named Subagents rows). Until that merges, this diff includes it.
Audit: interactive-looking elements in other lanes' sections (not changed here)
- Changes (
ChangesSection.tsx:130,inspector.css.acpmux-chat-inspector-pr:hover): the whole pull request row lights on hover. Clicking its owner chip or the padding outside the link and the ⋯ button does nothing. - Background tasks (
TasksSection.tsx:61-68): a command row ignoresopenProcessTerminal'sfalse, which is what it returns for a peer's or a Cloud chat's command. Unlike the tray'sopenTrayCommand, it then opens nothing and shows nothing. - Connectors (
ChatInspector.tsx:568-580): "Needs reconnect" in the danger color and "N to reconnect" in the head read like actions but are plain text. - Environment Save and Remote Control:
useChatInspectornever passesonSaveEnvironmentorremoteControl, so they appear only in the gallery, where they are no-ops.
Testing
- The new test passed 3/3 on huge-blue at this change. To check that it catches dead clicks:
- Replacing
onOpenSessionwith a no-op made it fail on the five running chat lines. - Reverting the CSS made the tray and no-handler cases fail.
- Replacing
scripts/web-lint.shpassed.
Observed / Not run
- Observed: the runs above.
- Not run: the whole webview suite (CI runs it).
Changelog
Fixed: Subagent lines and Stop buttons that can't be clicked no longer highlight on hover
Proof
No capture: webview-only. The only visible change is the hover state of disabled rows, which the test checks.
Agent session: cosmic-gray
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Adds a test that clicks every look-clickable element in the Inspector and the running tray, and fixes the dead clicks it found. Disabled subagent lines and Stop buttons no longer highlight on hover, so things that can't be opened no longer look clickable.
The Inspector's Subagents card also changes: instead of a row of identical avatars, each running subagent and started chat gets its own named line with its state and current activity, and finished ones fold into a single "94 done · 1 failed" row that expands to show them.
Bug Fixes
- Disabled lines and Stop buttons lost their
:hovertint. - A waiting nested subagent stays under its parent instead of sorting to the top.
- Ended rows without a handler are disabled and don't light on hover.
New Features
- Running subagents and chats are listed by name, up to five, then "Show N more".
- Ended, failed, and stopped agents collapse into one expandable row, failed first.
- Hovering a line shows a card with its name, state, and task.