Pane Focus and Switching
🏔️ Pane Focus and Switching
Objective
The current code draws three panes but has no concept of focus — every key event
is handled by a single global match. As soon as Hero gains an edit mode (M2) or
RHSB hosts plugin panels (M5+), this becomes ambiguous: pressing n in Hero
should not create a file in LHSB. Establish focus as a first-class App state,
give the user a deterministic way to move it, and route input through the
focused pane.
Success Criteria
- An
enum FocusedPane { LHSB, Hero, RHSB }(or equivalent) lives inAppstate - A user-discoverable key cycles focus forward and backward through the three panes
- The active pane's chrome (border colour or accent) is visibly distinct from inactive panes, using DPN palette
- Key events route to the focused pane's handler; global keys (quit, focus-switch, palette) remain global
- Modal input states (the existing LHSB create/rename/delete prompts) suspend focus-switching cleanly — focus cannot leave a pane mid-prompt
- No regression in existing
No due date
0% Completed