Skip to content

[help] First-party help/which-key plugin over bitty.keymaps.list and the presentation overlay #122

Closed

Description

@Xuepoo

Priority: P2 | Area: ui | Labels: feat,P2,area:ui,area:plugin | Milestone: v0.1.0 | RFC: ADR-0014 / OQ-056 | Task: bitty CTX-1431

Upstream half of bitty-terminal/bitty#2397. Core currently paints the help/which-key panel itself (paint_help_panel, help_rows, help_panel_*, ChromeAction::ToggleHelp); the accepted role split puts that presentation in an extension and keeps only the mechanism in Core. The canonical design is bitty-terminal-docs specifications/help-overlay-ownership-design.md.

Core prerequisites are done

The blocker named in bitty#2397 ("no bounded read-only keymap/action registry API") no longer holds on bitty main:

  • bitty.keymaps.list() - canonical resolved rows, 256-row pages, truncated flag (bitty#2405).
  • bitty.ui.present.show / bitty.ui.present.hide and bitty.ui.overlay.show / bitty.ui.overlay.hide - presentation-only overlay session (bitty#2406, bitty#2849), gated by ui.present (with ui.rich + ui.overlay for mounting).
  • Plugin-suggested bindings are captured at activation and dispatched at DispatchPriority::Plugin (bitty#2407).

Scope

  • Publish the first-party help plugin as its own repository (candidate repository name help, per the prefix-free plugin naming rule) and package, plugin identity bitty-terminal.help, with no private API and no extra authority.
  • Grants exactly runtime.keymaps.read, ui.rich, ui.overlay, ui.present. No focus/capture, terminal, filesystem, process, network, clipboard, environment, platform, or debug grants.
  • Register command toggle_help; suggest the four historical chords (alt+backtick, alt+?, alt+shift+?, alt+shift+/); the suggestion layer applies the Mod slot and a user binding wins. A manual command:bitty-terminal.help:toggle_help binding is the interim fallback until the suggestion layer is live.
  • On every show, call bitty.keymaps.list (page while truncated), join command: rows with bitty.commands.list for titles, render bounded rows, clip, and show a bounded +N more tail. No row cache across shows.
  • Dismiss on Esc through the presentation overlay's overlay.dismissed observation without consuming the press; stay non-modal and follow the focused view.
  • Show a bounded unavailable state when the read is denied or has no source; never fabricate rows.
  • Parity tests: regeneration on every show, Esc without consumption, binding and chord aliases, bounded rows and clipping, non-modal dispatch, focus following, tiny views, unload teardown.
  • Document the plugin, its grants, and the manual binding fallback.

Dependencies

Acceptance criteria

  • Enabling the plugin reproduces the current help/which-key behaviour over the public API only.
  • Disabling the plugin leaves no help panel and no help chord bound by Core.
  • The plugin holds no capability beyond the four named grants (runtime.keymaps.read, ui.rich, ui.overlay, ui.present).
  • The plugin repository's gates and parity tests pass.

Out of scope

  • Removing the Core paint path and closing bitty#2397; that stays with the Core issue once this plugin covers the surface.

Activity

  1. added this to the v0.1.0 milestone on Nov 1, 2026
  2. added
    feat
    area:ui
    area:plugin
    P2
    on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2area:pluginarea:uifeat

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions