feat(tui): hide Hotbar until explicit opt-in (#3807)#3815
Conversation
A fresh install (no `hotbar` key) showed the eight default Hotbar slots, because `resolve_hotbar_bindings` mapped an absent key to the built-in defaults. The Hotbar is now an opt-in personalization feature, so a fresh config must render no panel. - config: `resolve_hotbar_bindings(None, ...)` now resolves to no bindings instead of the defaults, so the panel, the Alt+1-8 dispatch, and the setup wizard are all empty until the user opts in. An explicit `[[hotbar]]` config (configured users) and `hotbar = []` (already disabled) are byte-for-byte unaffected — only the meaning of an absent key changes, so no settings migration is needed. - Add `default_hotbar_bindings_toml()` so `/hotbar on` can persist the recommended slots explicitly, keeping `DEFAULT_HOTBAR_ACTIONS` the single source of truth. - `/hotbar on` (`restore_hotbar_defaults`) now writes the explicit default bindings instead of deleting the key (which would now hide the Hotbar). `/hotbar off` still writes `hotbar = []`; `/hotbar` still opens the wizard. Removed the now-unused `remove_hotbar_from_config` and its tests. Updated the tests that asserted the old default-visible behaviour to the opt-in contract and added round-trip coverage for `/hotbar on`.
|
Claude finished @Hmbown's task in 3m 39s —— View job PR Review: feat(tui): hide Hotbar until explicit opt-in (#3807)
SummaryClean, well-scoped change. The core semantic inversion ( Findings1. Dead code:
|
Closes #3807.
Problem
A fresh config with no
hotbarkey still rendered the built-in default slots. For v0.8.66, Hotbar should stay available but hidden until a user explicitly opts in.Change
hotbarkey as no bindings.hotbar = []and explicit[[hotbar]]configs./hotbar onpersist the recommended defaults explicitly instead of deleting the config key./hotbar offwritinghotbar = [].This was split from
origin/codex/3799-inline-approvalso #3807 can be reviewed independently from the approval-layout fix.Verification
cargo fmtcargo test -p codewhale-config --locked hotbarcargo test -p codewhale-tui --bin codewhale-tui --locked hotbargit diff --check