feat(tui): hotbar Alt+1-8 discoverability + decision-card key disambiguation#3786
feat(tui): hotbar Alt+1-8 discoverability + decision-card key disambiguation#3786Hmbown wants to merge 2 commits into
Conversation
…guation This is the hotbar discoverability slice that shipped in the 0.8.66 local test candidate (and that #3731 describes as the v0.8.66 candidate state) but never had its own PR, so it could not land on main alongside the rest of 0.8.66. - Sidebar hotbar panel makes the activation chord explicit: title "Hotbar (Alt+1-8)", per-slot "Alt1:label" cells (no longer bare digits that read like raw number keys), and hover/full text "Slot N (Alt+N): ...". - Empty config (`hotbar = []`) now omits the panel entirely and reclaims the sidebar height (`hotbar_panel_enabled`). - `/hotbar help` explains Alt+1 through Alt+8 and `hotbar = []`. - Decision-card vs hotbar number-key disambiguation: bare digits select a decision-card option (`decision_card_number_from_key`, modifiers rejected), and Alt+digit hotbar dispatch is suppressed while a decision card is open — removing the number-key collision. - KEYBINDINGS.md documents Alt-1..8 (Option+number on macOS) and why F-keys / Cmd-number are not the primary chords; hotbar QA matrix covers the decision card state. Builds and tests green on current main (63 hotbar + 2 decision-card tests). Part of the hotbar lane (#3731); the remaining customization/terminal-QA work stays tracked there for 0.8.67.
|
Claude finished @Hmbown's task in 3m 27s —— View job Code Review
Summary: Clean, focused slice. The logic is correct, the guard placement is right, and the extraction refactors improve testability. Two minor observations below — neither is blocking. Priority 1 — Correctness
Modifier check on decision card numbers is sound. Arithmetic in Priority 3 — Reuse / simplification
// in render_sidebar / render_hotbar_panel:
let bindings = resolved_hotbar_bindings(app, config);
if !bindings.is_empty() { ... render with &bindings ... }Not blocking — TUI render latency is not a concern at this scale. Priority 4 — TestsNarrow-width cell rendering is no longer explicitly exercised. The old test at width 20 caught this case with New tests are well-targeted:
Notable good choices
Verdict: Ready to merge. The narrow-width test gap is a mild coverage note, not a correctness issue — behavior at minimum width is still correct (cells clip gracefully to bare accelerators), it's just not asserted. |
…coverability # Conflicts: # crates/tui/src/commands/groups/core/hotbar.rs # crates/tui/src/tui/sidebar.rs
|
Claude finished @Hmbown's task in 2m 23s —— View job Code Review (re-sync)
Summary: Same feature slice as the previous review, now merged with current Priority 1 — Correctness ✓Guard composition is correct.
Priority 3 — Reuse / simplification (new observation)
Net: the layout line is strictly controlled by let (main_area, hotbar_area) = split_sidebar_hotbar_area(area, hotbar_panel_enabled(app, config));
Priority 4 — TestsNarrow-width coverage gap is unchanged. Test bumped from New tests are well-targeted:
Docs ✓
Verdict: Ready to merge. The redundant |
|
Closing in favor of #3788, which landed first and solves the Hotbar chord discoverability better. When I opened this,
That's the same narrow-width clipping risk this PR's per-cell One small, genuinely-separate item this branch also carried that |
Why this exists
The hotbar Alt+1-8 discoverability work shipped in the 0.8.66 local test candidate (the binary built for testing) and #3731 explicitly describes it as the "v0.8.66 local candidate" state — but it never had its own PR, so when the 7 fix PRs + #3756 merged, this slice was left behind and is not on
main. This PR lands it so the release matches what was tested.What's here
Hotbar (Alt+1-8), cellsAlt1:label(not bare digits that look like raw number keys), hoverSlot N (Alt+N): ....hotbar = []) omits the panel and reclaims sidebar height./hotbar helpexplainsAlt+1–Alt+8andhotbar = [].KEYBINDINGS.mddocuments Alt-1..8 (Option+number on macOS) and why F-keys/Cmd-number aren't the primary chords; QA matrix covers the decision-card state.Validation
Built + tested against current
main(f6a19c25d):cargo build -p codewhale-tui✓;hotbartests 63 passed;decision_cardtests 2 passed. All 6 files were untouched by the 0.8.66 merges, so this is a clean addition.Scope decision (your call)
My read is this belongs in 0.8.66 (it's in the tested candidate). If you'd rather ship the basic discoverability in 0.8.67 with the rest of #3731 (customization, terminal QA), just say so and I'll re-milestone/hold. This PR does not close #3731 — it's the discoverability slice; the lane stays open for 0.8.67.