cmux NEXT: add palette and context-menu UI inspector entry points

Merged
TE
14d ago
+317-63

Summary

Leo asked: "uh the pointer inspector we want that to basically be able to come on via right click... or command palette...."

This keeps the cmux NEXT UI pointer inspector behind the existing Labs tunable and off by default, while adding the two requested entry points:

  • Inspect UI Element is searchable in the command palette only when Labs is enabled; the existing agent toggle-ui-pointer CLI/MCP action remains unbound by default and keeps its toggle behavior.
  • Native app menus expose Inspect Element on tabs, panes, sidebar rows/sections, workspace rows, the new-tab control and the window background. It records the right-click point, starts the picker, and highlights that native or app-owned webview element immediately.
  • Agent chat, composer and new-tab webviews add the same Labs-gated Inspect Element row to their native context menu. The existing isolated-world picker remains responsible for the DOM/component/source/style payload.

The generated action surface exports stay in sync with the new menu placements. No default shortcut is added.

Validation: git diff --check; fleet compile-check attempted on the exact head (base reds remain in AgentPaneRequest+SafeDescription.swift and AgentPaneFilePut.swift; the changed palette and context-menu files compile before those inherited failures).

Screenshots will be attached from the managed capture fleet after the PR build.

Agent session: big-red


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Adds palette and right-click entry points for the cmux NEXT UI pointer inspector, which remains behind the Labs tunable and off by default.

  • Inspect UI Element (renamed from "Point at cmux UI") is searchable in the palette only when the Labs tunable is on.
  • Native context menus now offer Inspect Element on tabs, panes, sidebar rows and sections, workspace rows, the new-tab control, and the window background; agent chat and composer webviews get the same item, which hides WebKit's browser inspector while enabled.
  • Context-menu invocations start the picker at the click point and highlight that element immediately. Palette, keyboard, and CLI invocations keep the existing toggle behavior.