🐛 Fix TUI focus navigation requiring Tab/arrow twice (#2) #14

Open
ossfixx4756 wants to merge 1 commit from ossfixx4756/sshception:fix/2-tui-focus-navigation-twice into dev

1 commit

Author SHA1 Message Date
ef2e14c173 🐛 Fix TUI Escape stranding focus in home screen (issue #2)
Navigation could require an extra Tab/Down because focus sometimes rested on a reblessed Form container (non-actionable):

- escaping the selected-host dialog now cancels it and returns focus to the host list, and escaping main actions returns to the primary action;
- the dialog's internal Form selection cursor is reset on every reopen so the first Tab lands on the next action instead of being a no-op;
- Escape is bound per view mount instead of subscribing once per 'Select host' press on the session-wide emitter (listeners accumulated and kept stealing focus with stale closures);
- add node-based regression tests for the focus flows.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-10-28 00:23:56 +00:00