Skip to content

Fix Pi approval UI duplication and remove public debug slash commands#416

Merged
mmprotest merged 1 commit into
mmprotest/implement-pi-integration-as-external-adapterfrom
mmprotest/fix-approval-duplication-and-remove-test-commands
Jun 29, 2026
Merged

Fix Pi approval UI duplication and remove public debug slash commands#416
mmprotest merged 1 commit into
mmprotest/implement-pi-integration-as-external-adapterfrom
mmprotest/fix-approval-duplication-and-remove-test-commands

Conversation

@mmprotest

Copy link
Copy Markdown
Owner

Motivation

  • Remove duplicated approval text shown in both the widget and confirm dialog and make the confirmation dialog the single visible approval UX.
  • Make approval dialog bodies concise and readable for common cases (Read/Bash/Write/Patch) without repeating titles or rendering [object Object].
  • Hide public debug/test slash commands so only the intended /villani command is exposed while keeping internal helpers intact.

Description

  • Change approval rendering so the approval widget is cleared before opening the confirm dialog and only a short approval status is set during confirmation, with the widget cleared again after confirmation (changes in integrations/pi-villani/src/index.ts).
  • Simplify approvalMessage so the confirm body contains only operation-specific details (Command: / File: / Operation:) and ends with Approve this Villani action?, avoiding title repetition and [object Object] output (changes in integrations/pi-villani/src/index.ts).
  • Update passive render handling so approval_required clears any widget and sets a brief approval status, and approval_resolved sets short accepted/denied continuation copy (changes in integrations/pi-villani/src/render.ts).
  • Remove public registration of debug/test slash commands (/villani-abort, /villani-confirm-test, /villani-ping, /villani-doctor, /villani-bridge-ping, /villani-proxy-test) so only /villani is registered (changes in integrations/pi-villani/src/index.ts).
  • Update tests and README to reflect the new behavior and public command list (changes in integrations/pi-villani/src/*.test.ts and integrations/pi-villani/README.md).
  • Preserve internal helper functions and abort internals so core runner, model proxy behavior, bridge semantics, and shell/tool execution are unaffected (no changes outside Pi UI/command registration).

Testing

  • Ran the package test suite with cd integrations/pi-villani && npm test, and all integration/unit tests passed (91 tests passed, 0 failed).
  • Existing automated tests were updated to assert only /villani is registered publicly and to validate the approval lifecycle: widget cleared before confirm, concise status text, non-repetitive titles/bodies for Read/Bash/Write/Patch, no Pending approval or Allow this operation?, no [object Object], and that accepted/denied both clear the widget.

Codex Task

@mmprotest mmprotest merged commit 3efef13 into mmprotest/implement-pi-integration-as-external-adapter Jun 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant