Skip to content

feat(tui): #275 unified Action Registry — one table feeds palette, slash, leader-chord#464

Merged
windoliver merged 22 commits into
mainfrom
feat/tui-275-action-registry
May 30, 2026
Merged

feat(tui): #275 unified Action Registry — one table feeds palette, slash, leader-chord#464
windoliver merged 22 commits into
mainfrom
feat/tui-275-action-registry

Conversation

@windoliver
Copy link
Copy Markdown
Owner

Summary

Closes #275. Makes a single persistent ActionRegistry the one input to the TUI command palette, slash surfaces, and keyboard leader-chord resolver — every user-invocable action registers in one place. Built via spec → plan → subagent-driven TDD (design + plan in docs/superpowers/).

Backbone

  • New Action registry (src/tui/actions/registry.ts): static descriptors + dynamic sources ((ctx) => Action[]); register/registerDynamic/setBindings/list/byId/search. Built once; live state flows via ctx at call time.
  • Built-ins split into static actions + dynamic per-entity sources (builtin-actions.ts, dynamic-sources.ts, register-builtins.ts).
  • Keybind → Action bridge (keymap/keymap-action-map.ts): keymap dispatches through registry.byId(...).run(ctx); the 50-case executeKeymapAction switch is retired. Remapping a key updates both dispatch and the palette cheatsheet (keymap stays the binding source of truth).
  • Palette renders keybind column + suggested-first + greyed disabled rows with a reason footer.
  • Leader chords get a 2s modal window + candidate-continuation overlay.

Slash (both surfaces)

  • / opens the palette pre-filtered to slash-bearing actions.
  • : opens a vim-style command-line (slash-input.tsx, InputMode.SlashCommand) parsing :cmd argsrun(ctx, args).

MCP prompts — Grove MCP server exposes prompts from the repo prompts/ dir (prompts: {} capability, wired into serve.ts/serve-http.ts); TuiPromptProvider.listMcpPrompts; a prompt.* source surfaces them in a Prompts group; invoking delivers the template to the selected agent via the messaging/IPC path (never tmux).

SkillslistAvailableSkills (bundled skills/ + topology); TuiSkillProvider; a skill.request.* source in a Skills group, scoped to the selected agent slot's role; invoking asks the agent to acquire the skill via messaging/IPC.

Non-goal: inline docks (#193) — the agent-interaction actions are registered so docks can consume them later, but dock UI is unchanged.

Test Plan

  • bun run typecheck — 0 errors
  • bun test src/ — 7234 pass / 0 fail
  • bun run build — succeeds
  • Unit coverage for registry, dynamic sources, keybind bridge + dispatch parity (every retired TuiActionId runs the same effect), leader-chord, slash index + both surfaces, MCP prompt loader/provider/source, skill enumeration/provider/scoped source
  • Manual TUI smoke: palette keybind/suggested/reason; remap reflects in palette; space leader overlay + 2s timeout; / filtered palette + :cmd; Prompts group delivers to agent; Skills group scoped to role

windoliver added 22 commits May 29, 2026 13:20
…ace fetch, server promptsDir, : enabled-gate
@windoliver windoliver merged commit 675797c into main May 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(tui): unified Action Registry — one table feeds palette, slash, and leader-chord resolver

1 participant