cmux NEXT: the pane toolbar's "…" menu opens on press (polish: press-drag-release)
Summary
POLISH sweep, pane toolbar. The "…" button at the trailing end of a pane's tab bar opened its menu only after the mouse came up, so press, drag to a row, release could not pick anything. POLISH.md asks every menu button for press-drag-release, and a plain click must still open the menu and leave it open.
TitlebarBandButton.pressMenuopens a menu on mouse-down, the way a pop-up button does. "…" uses it.- The button's action still opens the menu for a keyboard or VoiceOver press.
- "…" stays highlighted while its menu is open.
- Menus now show through
presentMenu, so the test can observe the press. The long-press Back/Forward lists use it too, with no change in behavior.
Visible change: pressing "…" in a pane's toolbar opens its menu at once, and you can drag to a row and release to run it.
Verification
Test: PaneToolbarTests.moreOpensItsMenuOnPress. Both runs are fleet cmux-ci run --class light --script scripts/ci/run-swift-testing-suites.sh --arg Packages/macOS/CmuxNext (Xcode 26.6).
- Red on the test commit:
(presented → []) == [["Search Agent Chats", "Toggle Pane Zoom"]]. The suite's other 4 tests passed. - Green on the head: see the comment below.
- Not live-verified: the test proves the menu opens on press. The press-drag-release and click-stays-open behavior after that comes from AppKit (
NSMenu.popUpcalled during mouse-down, the same wayNSPopUpButtonworks), and I did not check it by hand in a running build.
check-concurrency, check-system-blue and check-no-godfiles pass; the godfile notes are all for files already over budget on base.
Changelog
Fixed: The pane toolbar's "…" menu opens when you press it, so you can drag to an item and release to pick it.
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
The pane toolbar's "…" menu now opens on mouse-down, so you can press, drag to a row, and release to run it. Previously the menu waited for the mouse-up, so a single drag couldn't pick anything.
- Adds a
pressMenuhook toTitlebarBandButtonthat opens the menu on press like a pop-up button; a plain click leaves the menu open. - The button stays visually pressed while its menu is open.
- The button's action still opens the menu for keyboard or VoiceOver presses.
- Routes menu presentation through
presentMenuso tests can observe the press; the long-press Back/Forward lists use it too with no behavior change. - Adds
PaneToolbarTests.moreOpensItsMenuOnPressto cover the press path.