Skip to content

feat(tui): expose prompt action commands - #40971

Open
mustfsb wants to merge 1 commit into
anomalyco:v2from
mustfsb:prompt-action-commands
Open

feat(tui): expose prompt action commands#40971
mustfsb wants to merge 1 commit into
anomalyco:v2from
mustfsb:prompt-action-commands

Conversation

@mustfsb

@mustfsb mustfsb commented Aug 7, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #40953

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Exposes stable prompt action commands to TUI plugins for form and permission prompts:

  • form.option.previous
  • form.option.next
  • form.action
  • permission.option.previous
  • permission.option.next
  • permission.action

The existing prompt components still own selection, validation, submission, and permission behavior. The change promotes the existing keyboard handlers to named keymap commands, so plugins can discover and dispatch them without duplicating prompt state or synthesizing key events.

form.action follows the active form state, including option selection, text/custom input, external actions, and review submission. permission.action also covers the permission rejection prompt.

Existing keyboard bindings and user-visible behavior are unchanged.

How did you verify your code works?

From packages/tui:

  • bun test test/cli/tui/prompt-plugin-commands.test.tsx — 20 passed, 0 failed
  • bun typecheck — passed
  • bun test — 614 passed, 5 skipped, 0 failed
  • git diff --check — passed

The regression tests verify command discovery, dispatch behavior, state transitions, keyboard behavior, rejection handling, and cleanup after prompts are unmounted.

Screenshots / recordings

Not applicable — this does not change the visible TUI. It exposes existing prompt actions through the plugin-facing keymap command API.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

1 participant