Skip to content

fix(next palette): keep query focused after Cmd-P - #24814

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
nx-4303
Oct 24, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
nx-4303

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #4303

“the palette UI is invoked, but the next character typed lands in the terminal ... not the palette text field.”

The palette's detached panel can attach its content before it becomes key. The query field now registers itself as the panel's initialFirstResponder, clears the previous window registration when detached, and the panel re-focuses the field from its becomeKey seam after the key-window handoff. Cmd-P and Cmd-Shift-P therefore keep subsequent typing in the palette query.

Tests:

  • python3 scripts/cmux-next/prepush-gate.py (pass: no new violations)
  • Fleet focused suite: the prior queued step was cancelled when its head was superseded; final-head CI is running on e9e5ca5675c4d426d80557fe7ccb41c6a0703e25.
  • No native build or test run on Big Red; native verification is on the fleet.

Changelog: Cmd-P and Cmd-Shift-P now focus the palette query field reliably during detached panel key-window handoff.

No capture: behavior-only responder handoff; there is no visual-state change, and PaletteFocusTests covers attach, replacement, and detach responder ownership. The native key-window handoff remains fleet/CI verified.

Base: fabbd7139acdc4413a35532898f416a10291f0b4
Head: 58cd2a8d52b6130acc31cae9fb525de709122805

Agent session: big-red

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 9bbf92a: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr24814 -f ref=nx-4303 -f platform=macos -f backend_mode=local

red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base e0bb2a8; does not block

Tour of c112d24d3f (run)

The path-selected recorder failed for core-after, core-before; see the run artifact and failed manifests.

Path-selected interactions

Interaction Changed paths
core Packages/macOS/CmuxNext/Sources/CmuxNextPalette/PaletteController.swift
Packages/macOS/CmuxNext/Sources/CmuxNextPalette/PalettePanel.swift
Packages/macOS/CmuxNext/Sources/CmuxNextPalette/PaletteSearchField.swift
Packages/macOS/CmuxNext/Tests/CmuxNextPaletteTests/PaletteFocusTests.swift

Core UI (before): FAILED — 16 ok, 3 failed, 1 unavailable

tour

Video (mp4)

# Step Result Command
1 Launch ok
2 New workspace ok cmux workspace new --name Tour
3 Type in the terminal ok cmux workspace name:Tour screen current pane current tab current terminal current write --text "echo hello from the cmux-next tour\r"
4 A command reports progress: tab loading spinner ok cmux workspace name:Tour screen current pane current tab current terminal current write --text "clear; printf '\\033]9;4;3\\007'; sleep 900\r"
5 Split right failed: exited 1 cmux action run splitRight
6 Split down failed: exited 1 cmux action run splitDown
7 New terminal tab failed: exited 1 cmux action run newSurface
8 Browser tab ok cmux tab new-browser --url https://example.com
9 Hide the sidebar ok cmux action run toggleSidebar
10 Show the sidebar ok cmux action run toggleSidebar
11 Notification ok cmux notify --title Tour --body "Hello from CI"
12 Notifications panel ok cmux action run showNotifications
13 Agent chat ok cmux agent new-chat
14 Agent workspace ok cmux workspace new --name Agent
15 Agent starts ok cmux workspace name:Agent screen current pane current tab current terminal current write --text "clear; printf '\\033]7501;state=working\\033\\\\'; sleep 8; printf '\\033]7501;state=done\\033\\\\'; sleep 900\r"
16 An agent works: row working spinner ok cmux workspace new --name Notes
17 The agent finishes: done mark in the spinner's place ok
18 Session tree: keycaps on the first rows ok cmux settings set sidebar.sessionTree true
19 Session tree back off for later tours ok cmux settings set sidebar.sessionTree false
20 Profile menu unavailable: exited 1 (the menu shot needs a screen capture route) cmux action run sidebar.profileMenu

Failed steps:

5. Split right
Split right

6. Split down
Split down

7. New terminal tab
New terminal tab

Screenshots (12)

1. Launch
Launch

2. New workspace
New workspace

3. Type in the terminal
Type in the terminal

4. A command reports progress: tab loading spinner
A command reports progress: tab loading spinner

8. Browser tab
Browser tab

9. Hide the sidebar
Hide the sidebar

11. Notification
Notification

12. Notifications panel
Notifications panel

13. Agent chat
Agent chat

16. An agent works: row working spinner
An agent works: row working spinner

17. The agent finishes: done mark in the spinner's place
The agent finishes: done mark in the spinner's place

18. Session tree: keycaps on the first rows
Session tree: keycaps on the first rows

### Core UI \(after\): FAILED — 16 ok, 3 failed, 1 unavailable

tour

Video (mp4)

# Step Result Command
1 Launch ok
2 New workspace ok cmux workspace new --name Tour
3 Type in the terminal ok cmux workspace name:Tour screen current pane current tab current terminal current write --text "echo hello from the cmux-next tour\r"
4 A command reports progress: tab loading spinner ok cmux workspace name:Tour screen current pane current tab current terminal current write --text "clear; printf '\\033]9;4;3\\007'; sleep 900\r"
5 Split right failed: exited 1 cmux action run splitRight
6 Split down failed: exited 1 cmux action run splitDown
7 New terminal tab failed: exited 1 cmux action run newSurface
8 Browser tab ok cmux tab new-browser --url https://example.com
9 Hide the sidebar ok cmux action run toggleSidebar
10 Show the sidebar ok cmux action run toggleSidebar
11 Notification ok cmux notify --title Tour --body "Hello from CI"
12 Notifications panel ok cmux action run showNotifications
13 Agent chat ok cmux agent new-chat
14 Agent workspace ok cmux workspace new --name Agent
15 Agent starts ok cmux workspace name:Agent screen current pane current tab current terminal current write --text "clear; printf '\\033]7501;state=working\\033\\\\'; sleep 8; printf '\\033]7501;state=done\\033\\\\'; sleep 900\r"
16 An agent works: row working spinner ok cmux workspace new --name Notes
17 The agent finishes: done mark in the spinner's place ok
18 Session tree: keycaps on the first rows ok cmux settings set sidebar.sessionTree true
19 Session tree back off for later tours ok cmux settings set sidebar.sessionTree false
20 Profile menu unavailable: exited 1 (the menu shot needs a screen capture route) cmux action run sidebar.profileMenu

Failed steps:

5. Split right
Split right

6. Split down
Split down

7. New terminal tab
New terminal tab

Screenshots (7)

1. Launch
Launch

2. New workspace
New workspace

3. Type in the terminal
Type in the terminal

4. A command reports progress: tab loading spinner
A command reports progress: tab loading spinner

8. Browser tab
Browser tab

9. Hide the sidebar
Hide the sidebar

11. Notification
Notification

Tours are data in scripts/cmux-next/media/tours: add a step or a tour file to show your feature.

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 24, 2026
@blacksmith-sh

blacksmith-sh Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Found 12 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpojjcylr0/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpxteuwo86/summary-fail.json (live):/summary-fail.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
convention violations found (ERROR lines above)./
convention violations found (ERROR lines above).
View Logs
test_base_passes (main.NoticesPairTests.test_base_passes)/
test_base_passes (main.NoticesPairTests.test_base_passes)
View Logs
test_bot_attempt_three_drops_stale_owned_pool_placement (main.PathRoutingStructure.
test_bot_attempt_three_drops_stale_owned_pool_placement)/
test_bot_attempt_three_drops_stale_owned_pool_placement (main.PathRoutingStructure.
test_bot_attempt_three_drops_stale_owned_pool_placement)
View Logs
test_notices_for_another_ghostty_next_commit_fail (main.NoticesPairTests.test_notic
es_for_another_ghostty_next_commit_fail)/
test_notices_for_another_ghostty_next_commit_fail (main.NoticesPairTests.test_notic
es_for_another_ghostty_next_commit_fail)
View Logs

...and 2 more test failures. View all on Blacksmith: run 40075725231, run 40075725046

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-gn1kz created for this PR by the cmux coordinator.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent Codex xhigh): SHIP at 9bbf92a621897835b5bce69c4d4ac9a4819fa6d2

Session receipt: review-nx-4303-final (Codex xhigh, read-only) reviewed the exact diff against base da29053203f0778fa982e9c86adc0ca3927c9aae; no P0-P3 findings. It verified initial-responder cleanup/registration, the PalettePanel key-transition focus callback, controller wiring, and the focused regression test.

Test coverage note: PaletteFocusTests directly covers initial-responder registration; detach cleanup and full becomeKey/controller integration are covered by the source trace but not exercised as separate test cases (non-blocking).

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent Codex xhigh): SHIP at 58cd2a8d52b6130acc31cae9fb525de709122805

Session receipt: review-nx-4303-final2 (Codex xhigh, read-only) reviewed the exact four-file diff against base fabbd7139acdc4413a35532898f416a10291f0b4; no P0-P3 findings. It verified that responderWindow clears only its own old initial responder, replacement attachment takes over safely, detaching the replacement clears it, and the PalettePanel.becomeKey() callback is wired through the controller.

The regression test now covers attach -> replacement -> detach responder ownership. No native build/test was run by the reviewer; fleet/CI remains the native verification path.

@teamleaderleo teamleaderleo added the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Oct 24, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Ready-to-land handoff at exact head 58cd2a8d52b6130acc31cae9fb525de709122805 (base judged by CI: fabbd7139acdc4413a35532898f416a10291f0b4).

  • Independent and primary reviews: SHIP; latest independent receipt review-nx-4303-final2.
  • prepush-gate and git diff --check: pass; app compile and cmux-next fast tier: SUCCESS.
  • cmux-next crash-class rules and release-notary are base-owned failures unrelated to this four-file diff.
  • High-signal review-line update is metadata-only; its owning job failed twice on installation HTTP 403 rate limiting while patching the status comment, with no source failure.

The ready-to-land label is now applied for normal pinned squash landing; no admin or override was used.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

reviewed 58cd2a8; c112d24 adds only a base update.

Verification: git range-diff 106952416560b52a1286c48108d9fe67f22121b6..58cd2a8d52b6130acc31cae9fb525de709122805 1268d987d21abb94bb8227aa0ea69da802c982b0..c112d24d3fc0938bfed5ad53d8a96c608530f1bf maps the reviewed commit exactly (=); the combined merge diff has no conflict-resolution entries in the palette files.

@teamleaderleo
teamleaderleo merged commit 2351457 into feat-cmux-next Oct 24, 2026
122 of 132 checks passed
@teamleaderleo
teamleaderleo deleted the nx-4303 branch October 24, 2026 08:00
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

This branch was previously deployed

1 inactive deployment
ci-routing-agent — c112d24d Deployed Oct 24, 2026 by teamleaderleo via namespace autofix #2388
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant