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

Merged
TE
13d ago
+51-0

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