Fix Dock paste routing to selected terminal
Merged
AU
4mo ago+133+133+012345678901234567890123456789-1-1-0123456789
Summary
- make Dock panel selection converge the AppKit first responder with the selected terminal
- restore the selected Dock pane after transient clipboard-manager window activation
- add real Ghostty responder-chain regression coverage in a red/green commit pair
Testing
- CI is the test gate; local xcodebuild/tests are intentionally skipped per issue instructions
- project wiring and Swift source checks only on this Mac
Closes #9097
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by cubic
Fixes Dock paste routing so keyboard input always goes to the selected terminal pane. The AppKit first responder now follows Dock selection and is restored to the selected pane after transient focus (e.g., window becomes key) changes.
- Bug Fixes
- Prefer
focusedPaneIdinfocusFirstControl()so Dock selection focuses the intended terminal, not the first pane. - Add tests ensuring Dock selection sets the first responder and that focus restoration keeps it on the selected terminal.
- Prefer
Summary by CodeRabbit
- Bug Fixes
- Improved dock focus restoration so the selected terminal remains active after switching focus.
- Ensured keyboard input stays directed to the selected terminal when focus is reset or restored.