Commit dd11c9e
committed
refactor(tui): unify mapping-editor focus authority on app-shell
Migrates the last two-panel screen onto appShell() + panel() +
Keymap, and fixes the "weak two-panel focus model" TR.B5 flagged:
activePanel was tracked separately from real OpenTUI focus, and
focusActivePanel() faked focus by swapping selectedBackgroundColor
with no border indicator. Three paths (search ENTER, the / key, the
CSV column picker) moved focus outside that method, so tracked
focus, real focus, and the visual highlight could silently desync.
Replaces it with a single focusPanel(target) authority — the only
place border colour, real focus, and focusTarget change together.
'search' and 'right' both live inside the Schema Fields panel, so
both light its border; only which child owns input focus differs.
All three former desync paths now route through it.
Adds a regression suite proving border colour and real focus stay
in sync across Tab, search-focus, and the search-ENTER handoff.
Requires InputRenderable.blur on the shared test double, added here.1 parent 148f43f commit dd11c9e
3 files changed
Lines changed: 239 additions & 160 deletions
File tree
- src/tui/screens
- tests
- fixtures/tui
- tui/screens
0 commit comments