Repository navigation
[CTX-1784] refactor(runtime,config,render): retire the Core-drawn help/which-key paint (Related #2397) - #3105
Conversation
…p/which-key paint (Related #2397) ADR-0014 puts the help/which-key presentation in the first-party `bitty-terminal.help` extension (bitty-plugins#122) and keeps only the mechanism in Core. The shipped plugin reproduces every painted element — title, registry-derived rows in resolved-table order, footer, `+N more` tail, empty state, chrome card tokens, the toggle command, the four historical chords (suggested, mod-aware), and `Esc` dismissal through `overlay.dismissed` — so the Core paint path is removed: - delete `runtime::help` (title/footer/row bounds, `HelpPanelLayout`, `help_panel_layout`, `help_visible`/`help_rows`/`set_help_rows`/ `toggle_help`/`dismiss_help`, `paint_help_panel`) and move the shared `glyph_overlaps_rect` helper into `runtime::present` - drop the `Runtime` help fields, the `paint_help_overlay` step, and the `Esc` help-dismiss branch - remove `ChromeAction::ToggleHelp` (variant, parse alias, canonical, description, catalog row, hint entry), the four `toggle_help` default chords, and `help_rows_from_keymaps` - remove the `help_panel_*` tokens and the dead `HELP_PANEL_ACCENT_ANSI_INDEX` from `bitty-render` - remove the `A::ToggleHelp` dispatch arm The keymap/command registry, overlay geometry/stacking, routing, and the `bitty.keymaps.list` read the plugin consumes are untouched. Tests that asserted the paint are deleted or rewritten; new coverage pins the registry page completeness, the theme-derived presentation surface, the retired action/chords, and that the plugin suggestion now owns the chord.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Xuepoo
left a comment
There was a problem hiding this comment.
Independent review — read-only; no edits, commits, or cargo runs in the lane worktree. All discrimination claims were proven on a throwaway copy under /home/fuyu/.hermes/cache/scratch/.
Checks
-
PASS — parity is real, not asserted. Every retired painted element has reproducing code plus a passing spec in
bitty-plugins/plugins/help(plugin suite run here:lua5.4 tests/run.lua→ 6 specs, 61/61 assertions):- title:
help.rs:19(HELP_PANEL_TITLE) →init.lua:41, paintedinit.lua:409, assertedhelp_spec.lua:65. - rows + ordering from the live registry:
help_rows_from_keymaps(keymap.rs:2166@ base) →M.read_keymapsinit.lua:192-255+M.format_binding_rowinit.lua:259-302; registry order comes from the untouchedbitty.keymaps.listpage (bitty-lua/src/keymaps.rs:19-24); no row cache across shows (init.lua:189-191), asserted by registry mutation + re-show athelp_spec.lua:80-95. - footer:
help.rs:22→init.lua:42, paintedinit.lua:416, assertedhelp_spec.lua:72,124. +N moretail:help.rs:281→init.lua:399-403, assertedhelp_spec.lua:123("+239 more"for 300 bindings).- empty state:
help.rs:192painted nothing → explicitNo keybindings configured/unavailable: <code>: <msg>rows (init.lua:43-44,343-367), assertedhelp_spec.lua:164-193. Documented superset. - four chords
alt+backtick,alt+?,alt+shift+?,alt+shift+/:init.lua:34-39viabitty.keymaps.suggest(init.lua:587-595), exact set/order assertedhelp_spec.lua:14-26; the host appliesmod_keyand user bindings win (SuggestedBindingDirectory,bitty-runtime/src/plugin_runtime/keybindings.rs:123). Escdismissal:selection.rs:2941-2950(base) →init.lua:517-531+overlay.dismissedsubscriptioninit.lua:598-601; Core still hides and queues the observation without consuming the press (chrome_keys.rs:3038-3049,presentation_overlay.rs:219-224), pinned bypresentation_overlay_esc_dismisses_and_reaches_pty(tests.rs:18716).- Documented deltas are supersets or mechanism-owned (
(title)suffix, explicit empty row,Overlayinstead ofRaisedelevation,toneignored by the v1 node reader). No element is missing.
- title:
-
PASS — removal is complete.
git grep -n -E 'paint_help_panel|help_rows|help_panel_|HELP_PANEL_|ToggleHelp|toggle_help|dismiss_help|set_help_rows'at head finds zero production hits. The only survivors are the deliberate retirement fixtures —crates/bitty-config/src/keymap.rs:4882,crates/bitty-runtime/src/plugin_runtime/services.rs:13300(assertions at:13338,:13343),crates/bitty-terminal/src/chrome_keys.rs:8401,9241— plus the plugin command idbitty-terminal.help:toggle_help(bitty-lua/src/keymaps.rs:691,720,727and its tests; a different symbol), and the historicalCHANGELOG.md:2821. -
PASS — no band-aids. No
#[allow(...)]line is added anywhere in the diff (grep '^+.*#\[allow('→ 0 hits).glyph_overlaps_rectis byte-identical to the deleted copy —diffof old vs new shows one doc-comment word ("shared with" → "used by") and nothing else (present.rs:8896); the caller keeps the same(glyph, rect)order (present.rs:6666).grep -n 'HELP_PANEL\|help_panel' crates/bitty-render/src→ 0 hits; no dead constant left. Minor, non-blocking:ContrastRole::HelpRing/help_ring_sourcesurvive and are still consumed by the contrast report (theme.rs:747,config_cli.rs:1876), so they are not orphaned, but the role labelchrome.help-ringnow names a surface Core no longer paints. -
FAIL — config compatibility is a breaking change with no migration note.
ChromeAction::parsefails closed (keymap.rs:1267-1270), so an existingkeymaps = [{ chord = "alt+backtick", action = "toggle_help" }]now errors atkeymaps[].action. Verified on a head build:bitty config check→ exit 2,unknown action 'toggle_help'; expected one of ...(hint list atkeymap.rs:1574no longer names it).- startup → the entire
keymapstable is salvaged away, not just the one entry:bitty: warning: ignoring 'keymaps' in '<file>': ... unknown action 'toggle_help' ...; ignored; using defaults and remaining layers(file.rs:1548,1620,1673;config_cli.rs:872,878). Verified withbitty --headless. So a user who kept the previously documented default also loses every unrelated binding in that table.
The PR body mentions the retirement but carries no migration note fortoggle_help/show_helpconfigs.
-
PASS — new tests discriminate (3 proven by reverting production on a scratch copy). Each fails when the production change is undone and passes at head:
keymap::tests::toggle_help_action_and_its_default_chords_are_retired(keymap.rs:4882): re-adding the variant/parse arm/4 default chords →panicked at keymap.rs:4901: assertion failed: ChromeAction::parse("toggle_help").is_err().plugin_runtime::services::history_tests::keymaps_list_serves_the_complete_default_registry_in_table_order(services.rs:13300): same revert →panicked at services.rs:13338: no Core help action survives in the live registry.chrome_keys::tests::retired_help_chord_reaches_the_shell_instead_of_painting(chrome_keys.rs:8401): revert + restoring a consumingA::ToggleHelparm →panicked at chrome_keys.rs:8414: Mod+backtick must not be a Core-bound chord.
retired_help_chord_is_owned_by_the_plugin_suggestion(chrome_keys.rs:9241) discriminates on the same revert by inspection (match_keymapreturnsSome(ToggleHelp)instead ofNone), though I did not re-run it separately. Note (not a failure):presentation_overlay_surface_follows_the_theme(present.rs:10496) andworkspace_creation_chord_stays_in_the_live_registry(chrome_keys.rs:10356) pass unchanged on base — they guard the surviving mechanism, which is how the PR body presents them, but they are not retirement proofs.
-
FAIL — the replacement surface is not installable from this repo, so a stock user loses the feature silently. The chord correctly reaches the PTY (
chrome_keys.rs:8401proves no Core consume), which is right for an unbound key — but the only thing that re-binds it is the plugin's suggestion, andbitty-terminal.helpcannot be installed from the catalog shipped at this commit:crates/bitty-plugin-host/src/official_catalog.rs:17pinsSOURCE_REVISION = dcd6777…, which predates the help onboarding in bitty-plugins (5485fe7—git cat-file -e dcd6777:registry/official/help.toml→ missing). The catalog has 11 entries (official_catalog.rs:20) and nobitty-terminal.help, soofficial_plugin_for("bitty-terminal.help")(official.rs:80) →Noneandbitty plugin install bitty-terminal.helpfails as an unknown id. The plugin is also not bundled (the bundled set isshell-integrationonly,bitty-plugin-host/src/bundled.rs). Net effect at this revision: help is removed from Core, and there is no supported install path for its replacement — the chord just types a backtick into the shell with no diagnostic. -
PASS — docs are honest about being unsynced. The body says "Related #2397 (not
Closes: the plugin side and the docs/ADR follow-ups are tracked separately)" and does not claim docs are updated. That is accurate:bitty-terminal-docs/architecture/core-boundaries.md:295-298,356,380,577andspecifications/input-pointer-rfc.md:339-355still describehelp.rsas the shipped surface, andconfiguration/lua-and-xdg.md:1382still liststoggle_helpas a Core action. No dependency edge changed: the diff touches 16 files, none of themCargo.toml/Cargo.lock(git diff --stat origin/main...HEAD). -
PASS — MSRV 1.85 safe.
grep -c '&& let 'over the patch → 0. No const-onlydead_coderead is introduced (the relocated helper is a plainfn, not aconst).
Required fixes
- Ship the catalog entry with (or before) this retirement. Regenerate
crates/bitty-plugin-host/src/official_catalog.rsfrom a bitty-plugins revision that containsregistry/official/help.toml(pinae1d8a9), sobitty plugin install bitty-terminal.helpresolves. As it stands the PR removes the last installable path to the feature for a stock user. - Add a migration note to the PR body (and the release notes). State the actual behavior for configs that still say
toggle_help/show_help:bitty config checkexits 2, and at startup the wholekeymapstable is dropped withwarning: ignoring 'keymaps' …— every other binding in it included. Point users at the replacement: drop the entry (the plugin suggestion rebindsalt+backtick,alt+?,alt+shift+?,alt+shift+/), or bindcommand:bitty-terminal.help:toggle_helpexplicitly. - Optional: consider a one-time startup diagnostic when a config names the retired action, so the drop is attributed to the migration rather than looking like a config mistake.
VERDICT: CHANGES-REQUESTED
… tolerant and pin the help plugin in the official catalog FIX 1 — retired `toggle_help` / `show_help` no longer invalidate the table. `ChromeAction::parse` fails closed, and a parse failure invalidates the whole `keymaps` table (startup salvage drops it with `warning: ignoring 'keymaps'`, `bitty config check` exits 2), so a config that kept the retired default lost every unrelated binding. Both spellings are now recorded as `RETIRED_ACTIONS` and handled per binding: - `validate_entry` tolerates a retired spelling (chord and context still validate), so plan validation, merge, `config check`, and reload pass. - `ChromeAction::parse` still rejects the spelling — now with a migration answer that names the `bitty-terminal.help` plugin instead of the closed-catalog hint — so no dispatchable variant comes back. - `resolve_keymaps` / `resolve_prefix_bindings` skip a retired entry, so it can neither dispatch nor shadow a shipped default. - `strip_retired_bindings` (called on the one shared load path used by startup, `config check`, doctor, and reload) drops only that binding and reports one diagnostic naming the action and the plugin; `config check` prints it too. FIX 2 — the replacement surface is installable again. The official catalog pin predated the help-plugin onboarding, so `bitty plugin install bitty-terminal.help` failed as an unknown id. `BITTY_PLUGINS_REV` moves to 2da1c87 (help entry pinned ae1d8a9) and `crates/bitty-plugin-host/src/official_catalog.rs` is regenerated with `just catalog-generate` (12 entries); `just catalog-check` passes. Tests: retired spellings keep every sibling binding live and never dispatch (bitty-config keymap + Lua-layer tests, diagnostic text asserted), `bitty config check` exits 0 on the retired spelling (bitty-terminal), and the help plugin resolves from the official catalog (bitty-plugin-host). No Cargo dependency edge changed.
Xuepoo
left a comment
There was a problem hiding this comment.
Independent re-review at head 4fc555bb (fix commit [CTX-1784] fix(config,plugin-host): …). Read-only on the lane worktree; every run below executed on a throwaway git clone --shared of 4fc555bb under ~/.hermes/cache/scratch/rr3105/ with its own CARGO_TARGET_DIR. No edits, commits, pushes, or merges in the lane.
Checks
-
PASS — FIX 1 closed: the retired binding is dropped alone, with a diagnostic that names the action and
bitty-terminal.help.
Loader path:validate_entrytolerates a retired spelling (keymap.rs:2237, chord still parsed) so the table never fails validation, andconfig_cli.rs:946strips it from the merged config on the one load path shared by startup,config check, doctor, and reload (strip_retired_bindings,keymap.rs:1658; tableRETIRED_ACTIONSkeymap.rs:1615; messageretired_binding_diagnostic,keymap.rs:1646).
Proven on the head build, config with alt+backtick →toggle_help,ctrl+alt+2→show_help, plus two valid siblings:-
bitty config check --config cfg/init.lua→ exit 0, stderr exactly two lines, each naming the retired action, the chord and the plugin:bitty: warning: ignoring retired keymap binding: binding 'alt+`' uses retired action 'toggle_help'; the help overlay moved to the 'bitty-terminal.help' plugin (run 'bitty plugin install bitty-terminal.help', then bind 'command:bitty-terminal.help:toggle_help' to keep the chord) bitty: warning: ignoring retired keymap binding: binding 'ctrl+alt+2' uses retired action 'show_help'; the help overlay moved to the 'bitty-terminal.help' plugin (…) -
bitty list keymaps --config cfg/init.lua→ctrl+alt+1 focus:1 userandctrl+alt+z toggle_zoom userstill live; alt+backtick andctrl+alt+2absent; 97 rows total (defaults intact). -
Startup path,
bitty --headless --config cfg/init.lua: the same two warnings, nowarning: ignoring 'keymaps', thenheadless smoke: ok — tick presented. The whole-table salvage is gone. -
Unit level:
cargo test -p bitty-config retired_→ 6 passed (retired_help_spellings_keep_every_other_binding_live,lua_retired_toggle_help_binding_keeps_the_rest_of_the_table,retired_prefix_binding_is_dropped_not_dispatched,retired_action_parse_error_names_the_migration, …);cargo test -p bitty-terminal --bin bitty retired_toggle_help_binding_keeps_the_rest_of_the_table→ ok (asserts exit 0, 1 surviving sibling, 2 migration lines, and noignoring 'keymaps'on the startup mode).
-
-
PASS — the retired spelling is not a silent capability.
It cannot parse:ChromeAction::parseanswers with the migration and never the closed-catalog hint (keymap.rs:1271-1278). It cannot resolve:resolve_keymapsskips it before chord/action resolution (keymap.rs:2185), andresolve_prefix_bindingsskips it (keymap.rs:2726); the runtime prefix paths (main.rs:1050,config_reload.rs:358) go through that function. It cannot shadow a default: bindingalt+t→toggle_helpleavesalt+t workspace_new global defaultinbitty list keymaps(the retired entry is dropped before resolution, so the shipped default wins).toggle_help:argis not treated as retired (keymap.rs:5146), so no argument form slips through. -
PASS — FIX 2 closed: the catalog entry ships and installs.
python3 scripts/generate-official-catalog.py --check(=just catalog-check) →official catalog: OK (12 entries, source 2da1c87571b6641b5361b46fe12f60c5e052c940).SOURCE_REVISION(official_catalog.rs:17) ==BITTY_PLUGINS_REV(validation-pins.env:32) ==2da1c875…, which is the tip of bitty-pluginsorigin/main(git log -1 origin/main→2da1c87), so generated file and pin file agree with no hand-edit drift.- Entry
bitty-terminal.helpis present withpin ae1d8a9a39862ce9a71ccd7238f5621975144a47(== registry gitlinkgit ls-tree 2da1c875 plugins/help==git ls-remote bitty-terminal/help HEAD),manifest_hash sha256:8cac6d1d…(recomputed:sha256sumofbitty-plugin.tomlat that pin =8cac6d1d761547c86861e9207b3ca659d44a27a6da9c42094e8b2f09e600debc, exact match),compat_bitty >=0.0.31(workspace is0.0.38). official_plugin_for("bitty-terminal.help")resolves:cargo test -p bitty-plugin-host help_plugin_resolves_from_the_official_catalog→ ok.bitty plugin list→bitty-terminal.help registry available.- End-to-end, sandboxed
HOME/XDG_*:bitty plugin install bitty-terminal.help --yes→ exit 0,official 'bitty-terminal.help' from https://github.com/bitty-terminal/help.git at ae1d8a9a3986 (manifest sha256:8cac6d1d7615 verified)→installed 'bitty-terminal.help' (version 0.0.1, registry source, 4 capabilities granted). The previously missing install path exists.
-
PASS — the fix commit changes nothing else.
compare c56fa847...4fc555bbtouches 7 files:bitty-config/{file,keymap,lib}.rs,bitty-plugin-host/{official,official_catalog}.rs,bitty-terminal/config_cli.rs,validation-pins.env. No#[allow(added, no&& letlet-chain added, no test deleted/renamed/#[ignore]d, noCargo.toml/Cargo.lock, no runtime/render/terminal-behavior file.file.rsandofficial.rschanges are tests only;keymap.rsdeletions are exactly the old parse arm (4 lines) and oneChromeAction::parseline invalidate_entry.
Scope note (non-blocking): regenerating the catalog also advances 11 unrelated plugin pins (activity,bar,composer,copy-mode,dashboard,devtools,file-manager,git-panel,history,palette,search). Each new pin equals the registry gitlink at2da1c875(checked againstgit ls-tree), and the generator renders the file as a whole, so hand-pinning onlyhelpwould be drift. Correct, just wider than the finding asked for. -
PASS — the retirement still holds at the new head.
git grep -n -E 'paint_help_panel|help_rows|help_panel_|HELP_PANEL_|ToggleHelp'over the head tree: no production reference — only the retirement fixtures/tests (keymap.rs:4998,config_cli.rs:4414,file.rs:5039,services.rs:13337) and comments. Remainingtoggle_helphits are the plugin command idbitty-terminal.help:toggle_helpand the newRETIRED_ACTIONStable. Mechanism intact:crates/bitty-lua/src/keymaps.rs(bitty.keymaps.list) andplugin_runtime/presentation_overlay.rsare untouched by the PR;bitty list keymapsserves 97 rows;keymaps_list_serves_the_complete_default_registry_in_table_order→ ok;retired_help_chord_reaches_the_shell_instead_of_paintingandretired_help_chord_is_owned_by_the_plugin_suggestion→ both ok. -
PASS — the PR body is honest. It carries a
## Migration — configs that still name toggle_help / show_helpsection whose every claim I reproduced (exit 0 instead of 2, only the retired binding dropped, one diagnostic naming the action + plugin, same line at startup, nothing dispatchable). It lists the docs follow-ups underResidual follow-upsinstead of claiming sync — accurate:bitty-terminal-docs/architecture/core-boundaries.md:295,298,356,380,577,specifications/input-pointer-rfc.md:321,339,348,355andconfiguration/lua-and-xdg.md:1382still describehelp.rs/toggle_help.Related #2397matches reality: the issue's acceptance criteria include "Docs no longer describehelp.rsas the shipped surface" and the manual actions-catalog update, neither of which is in this PR, soCloseswould be a lie and closing it now would not be defensible.
Non-blocking nits (no action required for this PR)
- With more than 8 retired bindings, the bounded diagnostic buffer appends
2 more configuration diagnostics suppressed (run 'bitty config check' for the full list)— printed byconfig check(MAX_STARTUP_DIAGNOSTICS = 8,config_cli.rs:88,187-191). Verified with a 10-binding config: exit 0, 8 lines + that hint. strip_retired_bindings's doc says "in config order"; the merged vector is chord-sorted, so the emitted order isf1, f10, f2, …. Cosmetic.ContrastRole::HelpRing/help_ring_sourcesurvive (still consumed by the contrast report); thechrome.help-ringrole label now names a surface Core no longer paints — already listed as a follow-up in the body.
Required fixes
None. Both blocking findings are closed and I found no regression in the fix commit.
VERDICT: APPROVE
Retire the Core-drawn help/which-key paint (ADR-0014)
Core no longer paints a help/which-key surface. The presentation lives in the
first-party extension
bitty-terminal.help(bitty-plugins/plugins/help,bitty-plugins#122, manifest id
bitty-terminal.help, grantsruntime.keymaps.read+ui.rich+ui.overlay+ui.present), which readsthe live registry through
bitty.keymaps.listand presents throughbitty.ui.present.show/hide. Core keeps the mechanism only: the keymap/commandregistry, overlay geometry/stacking, and routing.
Related #2397 (not
Closes: the plugin side and the docs/ADR follow-ups aretracked separately; the Core paint path named in the issue is fully removed).
Migration — configs that still name
toggle_help/show_helpThe Core action is gone, and so is its
show_helpalias. Both spellings arekept as retired action spellings so a config written against the shipped
defaults still loads:
Only the retired binding is dropped. Every other
keymapsentry — in thesame table and in every other layer — stays live. The whole-table startup
salvage path (
warning: ignoring 'keymaps' ...) no longer triggers on thisspelling, and
bitty config checkexits 0 instead of 2.One diagnostic per dropped binding, naming the retired action and the
replacement:
The same line is printed by
bitty config checkand at startup.Nothing dispatches a retired spelling.
ChromeAction::parsestillrejects it (answering with the migration instead of the closed-catalog hint),
and
resolve_keymaps/resolve_prefix_bindingsskip it, so it can neitherdispatch nor shadow a shipped default.
To restore the gesture:
bitty plugin install bitty-terminal.help(nowresolvable from the embedded official catalog, regenerated from bitty-plugins
2da1c875with the help entry pinned atae1d8a9a), which rebinds the fourhistorical chords by suggestion; or bind
command:bitty-terminal.help:toggle_helpexplicitly.Step 1 — parity audit (Core paint row -> plugin evidence)
Audited
crates/bitty-runtime/src/runtime/help.rs(pre-change) againstbitty-plugins/plugins/help/lua/help/init.luaandbitty-plugins/plugins/help/tests/(spec/help_spec.lua,manifest.test.ts)."Keyboard shortcuts"(HELP_PANEL_TITLE, help.rs:19, painted help.rs:256-262)M.PANEL_TITLEinit.lua:41, painted as scene child 1 init.lua:409; assertedhelp_spec.lua:65<chord> <action>per resolved binding (help_rows_from_keymaps, bitty-config/src/keymap.rs:2166), resolved-table order (sort at keymap.rs:2133)M.read_keymapspagesbitty.keymaps.list(init.lua:192-255); the page contract emits rows in resolved-table order (bitty-lua/src/keymaps.rs:19-24);M.format_binding_rowrenders<chord> <action>(init.lua:259-302, 294-296); assertedhelp_spec.lua:66-71help_spec.lua:80-95"Esc closes | repeat toggle closes"(HELP_PANEL_FOOTER, help.rs:22, painted help.rs:291-297)M.PANEL_FOOTERinit.lua:42, painted last init.lua:416; assertedhelp_spec.lua:72,124+N moreoverflow tail (help.rs:281)string.format("+%d more", remaining)init.lua:399-403; assertedhelp_spec.lua:123No keybindings configured/unavailable: <code>: <msg>rows init.lua:43-44, 343-367; assertedhelp_spec.lua:164-193ChromeTokens::resolve->surface(Raised) +border_mutedring +radius_px(help.rs:228-241); texthelp_panel_fg_in=palette.foreground(bitty-render/src/grid.rs:488)ChromeTokens::resolve(&self.config.theme)->surface_for(ChromeElevation::Overlay)+border_mutedring +radius_px(present.rs:6622-6630), pinned bypresentation_overlay_paints_one_shared_chrome_card(present.rs:10457-10499). Deltas: (a) elevationOverlay(surface_elevated) instead ofRaised(selection) — the documented "floating overlay" step; ring/radius tokens identical; (b) plugintonehints are ignored by the v1 node reader (bitty-lua/src/ui.rs:829-848 readsfg/bg/bold), so rows paint in the overlay's default theme text colour — the same uniform-foreground result the retired paint producedChromeAction::ToggleHelp+ dispatch (bitty-terminal/src/chrome_keys.rs:2448-2461)bitty-terminal.help:toggle_helpinit.lua:26-28, 570-585; manifest command listmanifest.test.ts:76-79; behaviorhelp_spec.lua:12-13, 59-78alt+\``,alt+?,alt+shift+?,alt+shift+/` with the Mod slot (keymap.rs:2021-2024)M.SUGGESTED_CHORDSinit.lua:34-39 ->bitty.keymaps.suggestinit.lua:587-595; exact set and order assertedhelp_spec.lua:14-26; README pinmanifest.test.ts:96-103; the host applies the configuredmod_keyand yields to user bindings (SuggestedBindingDirectory, bitty-lua/src/host.rs:2555-2558; app lookupTerminalApp::match_plugin_binding, chrome_keys.rs:2561-2583)Escdismiss without consuming the press (selection.rs:2947-2950)overlay.dismissedsubscription init.lua:597-601 +M.on_dismissedinit.lua:517-531; Core queues the observation for the presentation overlay onEsc/view close (bitty-runtime/src/plugin_runtime/presentation_overlay.rs:51-58, 219); assertedhelp_spec.lua:128-162HELP_MIN_INNER, help.rs:36/73)PRESENTATION_OVERLAY_MIN_COLSrefuses the frame (present.rs:6509-6532)HELP_MAX_ROWS = 256Verdict: every painted element (title, row derivation, ordering, footer,
overflow tail, empty state, card tokens, toggle action, the four chords,
Escdismissal) is reproduced by the plugin. Documented deltas are allsupersets or mechanism-owned token choices: richer row text (
(title)suffix when a title is known), explicit empty-state row where Core painted
nothing, and the one-step-higher
Overlaycard elevation. No painted elementis missing, so the removal proceeded.
Step 2 — symbols removed
crates/bitty-runtime/src/runtime/help.rs— deleted (418 lines):HELP_PANEL_TITLE,HELP_PANEL_FOOTER,HELP_MAX_ROWS,HELP_MIN_INNER,HelpPanelLayout,help_panel_layout,Runtime::help_visible,Runtime::help_rows,Runtime::set_help_rows,Runtime::toggle_help,Runtime::dismiss_help,Runtime::paint_help_panel.glyph_overlaps_rect(shared with the plugin overlay card occlusion) movedto
runtime/present.rs.bitty-runtime/src/runtime.rs—mod help,help_visible/help_rowsfields, both constructor initializers, and the two
Debugfields.bitty-runtime/src/lib.rs—pub use runtime::help::{HELP_MAX_ROWS, HELP_PANEL_FOOTER, HELP_PANEL_TITLE}.bitty-runtime/src/runtime/present.rs—paint_help_overlayand its call inthe overlay paint sequence.
bitty-runtime/src/runtime/selection.rs— theEschelp-dismiss block.bitty-config/src/keymap.rs—ChromeAction::ToggleHelp(variant,parsearm including the
show_helpalias,canonical,description,all_chrome_actionsrow,KNOWN_ACTIONS_HINTentry), the fourtoggle_helpdefault chords, andhelp_rows_from_keymaps.bitty-render/src/grid.rs—HELP_PANEL_BG,HELP_PANEL_BORDER,HELP_PANEL_FG,help_panel_bg_in,help_panel_border_in,help_panel_fg_in,HELP_PANEL_ACCENT_ANSI_INDEX(dead constant; its onlydoc reference in
scene.rsnow points atbitty_config::theme::help_ring_source). The contrast-report accent probe(
theme::help_ring_source,ContrastRole::HelpRing) is a theme diagnostic,not a paint token, and stays.
bitty-terminal/src/chrome_keys.rs— theA::ToggleHelpdispatch arm.No
#[allow(dead_code)]was added; orphaned code was deleted.Tests
Removed/rewritten (they asserted the retired paint):
tests/help_popup.rs(deleted),golden_help_overlay_shown_then_hidden,help_panel_follows_the_theme(and its now-unusedProbe::color_bounds),the help cases in
tests/esc_routing.rs,help_card_uses_the_overlay_rounded_layer,help_toggle_action_shows_live_registry_rows,help_popup_lists_added_chord_by_construction,help_toggle_gestures_drive_intercept_and_esc_dismisses,help_question_gesture_matches_physical_shift,help_super_flip_spelling_toggles_and_lists,toggle_help_action_parses_and_canonicalizes,help_chords_resolve_to_toggle_help_both_mods,help_rows_derive_from_live_registry.Added (mechanism preserved, paint gone):
bitty-runtimeplugin_runtime::services::tests::keymaps_list_serves_the_complete_default_registry_in_table_order— the registry read the plugin consumes still serves every shipped binding,
in resolved-table order, with canonical chord/action spellings, and none of
the retired help chords/actions.
bitty-runtimeruntime::present::tests::presentation_overlay_surface_follows_the_theme— the surface the plugin paints through resolves theme-derived card and ring
colours (replaces the removed help-panel recolor proof).
bitty-configkeymap::tests::toggle_help_action_and_its_default_chords_are_retired—
toggle_help/show_helpno longer parse, the catalog/hint carry no suchaction, and the four chords are unbound under both
altandsuper.bitty-terminalretired_help_chord_reaches_the_shell_instead_of_painting— through the real intercept
Mod+\`` andMod+?` are not consumed and thebytes reach the PTY (no Core paint path is reachable).
bitty-terminalretired_help_chord_is_owned_by_the_plugin_suggestion— with Core's default gone, the plugin suggestion dispatches the chord at
DispatchPriority::Pluginthrough the host-mediated command path.bitty-terminalworkspace_creation_chord_stays_in_the_live_registry— the [P1] Mod+number workspace switching broken (stuck on workspace 1); Mod+Shift+number does not move panels #1446 discoverability rows are still in the live table.
Gates actually run (all offline, no remote CI, no
act, nojust ci-local)cargo check -p bitty-config -p bitty-render --tests --offline— okcargo check -p bitty-runtime --tests --offline— okcargo check -p bitty-terminal --tests --offline— okcargo test -p bitty-runtime --offline— ok (227 suites, 0 failed)cargo test -p bitty-config -p bitty-render --offline— ok (0 failed)cargo test -p bitty-terminal --offline --bin bitty <retired_help_chord | workspace_creation_chord_stays_in_the_live_registry | mouse_action_is_captured_by_a_pending_close_confirmation | mouse_action_gate_matches_the_chord_modal_rules>— ok (the crate's unit tests live in thebittybin target;[lib] test = false)cargo fmt --check— cleanNo GUI/Hyprland test was run. No Cargo.toml dependency edge changed, so
Cargo.lockis untouched.Follow-up fix commit (review findings 1 + 2)
cargo test -p bitty-config --offline— ok (535 passed, 0 failed)cargo test -p bitty-plugin-host --offline— ok (0 failed)cargo test -p bitty-runtime --offline— ok (1552 passed, 0 failed)cargo check -p bitty-terminal --tests --offline— okcargo fmt --check— cleanjust catalog-check— ok (12 entries, source2da1c875…)cargo test -p bitty-terminal --offline retired_toggle_help_binding_keeps_the_rest_of_the_table— ok(runs the real
bitty config checkpath and the startup loader: exit 0,retired bindings dropped, sibling bindings live, migration diagnostic
asserted, no
ignoring 'keymaps'salvage)alt+`totoggle_help,ctrl+alt+2toshow_help, plus two validbindings →
bitty config check --configexits 0 and prints bothmigration diagnostics on stderr, and
bitty list keymapsshows the livesiblings (
focus:1,toggle_zoom) with the retired bindings absent.bitty plugin install bitty-terminal.helpresolves the catalog entry and proceeds to the pinned fetch of
https://github.com/bitty-terminal/help.git(the sandbox's dead proxy is theonly failure), instead of failing as an unknown plugin id.
Residual follow-ups
this PR):
bitty-terminal-docs/architecture/core-boundaries.md(thehelp.rssections),specifications/input-pointer-rfc.md, andconfiguration/lua-and-xdg.md(still liststoggle_helpas a Core action).ContrastRole::HelpRing/help_ring_sourcestay (still consumed by thecontrast report), though the
chrome.help-ringrole label now names asurface Core no longer paints.
the
bitty.keymaps.listregistry read.toggle_help/show_help, no argument form). Any future retired actionneeds the same treatment: a
RETIRED_ACTIONSrow plus a loader drop, never adispatchable variant.
Summary by CodeRabbit