Repository navigation
fix(keymap): enable digit tab switch in gui - #284
Conversation
The DIGITS fallback only answered tui, so bare 1-9 never reached Tabs.act in gui. Widen the gate to gui as well and assert tab1 and tab9 under both frontends. Ctrl+1-3 views still win by mask and typed digits still reach the query lines.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to Unmodified GUI digits reach the existing numbered-tab selection, while digits typed into search or filter fields remain text. No actionable merge risk remains. Pre-merge checks |
|
|
merged as authored; a bare digit switches to that tab (979bcd3, v0.3.10). Thanks @joebaus! https://github.com/thisisgm/flea/releases/tag/v0.3.10 |
Bare 1-9 never switched tabs in the GUI while t, w, [ and ] all worked.
Root cause: the [digits] fallback in tools/flea-keymap-gen only answered when frontend is tui, but ui/Pane.qml reaches Focus.handleKey which calls Keymap.lookup with no frontend, so it defaults to gui and every digit returned empty. ui/js/Tabs.js already handled tab1 through tab9, so only the lookup needed to change.
Fix: widen the DIGITS gate to tui or gui, regenerate ui/js/Keymap.js with the tool, and assert tab1 and tab9 under both frontends in tests/js/keymap.js. The modifiers check is untouched, so Ctrl+1 through Ctrl+3 still switch views, and typed digits still reach the filter and search lines because those return before the lookup. The file budget ceiling for tests/js/keymap.js moves 309 to 310 for the added assertion.
Verified: tests/keymap-gen.sh clean, ./tests/js.sh keymap 646 checks 0 failed, ./tests/js.sh tabs 204 checks 0 failed, full ./tests/js.sh 11271 checks 0 failed, file budget exit 0, qmllint gate 0 regressions, plus a live FLEA_UI=$PWD/ui ./target/release/flea --gui run where 1/2/3 switch tabs and 9 on three tabs reports No tab 9.
Known limitation left out on purpose: the ? sheet still does not list 1-9 because no sheet group claims tab1 through tab9, so they stay bound and hinted but off the sheet. Happy to follow up separately.
Summary by CodeRabbit