tui: retire /approvals and rename /autoreview to /approve (#21034)

## Why

The TUI currently exposes overlapping command names for the same
permissions flow: `/permissions` and the older `/approvals` alias. It
also uses `/autoreview` for the manual retry flow, even though the
action users take there is approving one denied auto-review request.

This change makes the command surface consistent with the hard rebrand:
- `/permissions` is the only command for permission settings.
- `/approve` is the command for approving a recent auto-review denial.

## What changed

- Removed the legacy `/approvals` slash command and its dispatch path.
- Kept `/permissions` as the single permissions command shown and
accepted by the TUI.
- Renamed the auto-review denial command from `/autoreview` to
`/approve`.
- Updated nearby comments so they refer to `/permissions` rather than
the retired `/approvals` name.

## Verification

- Updated the slash-command unit test to assert that `AutoReview` now
renders and parses as `approve`.
This commit is contained in:
Won Park
2026-05-04 10:50:34 -07:00
committed by GitHub
Unverified
parent 94800ecbbf
commit 5c1ec8f4fd
6 changed files with 12 additions and 20 deletions
+4 -7
View File
@@ -15,7 +15,6 @@ pub enum SlashCommand {
Model,
Fast,
Ide,
Approvals,
Permissions,
Keymap,
Vim,
@@ -24,7 +23,7 @@ pub enum SlashCommand {
#[strum(serialize = "sandbox-add-read-dir")]
SandboxReadRoot,
Experimental,
#[strum(to_string = "autoreview")]
#[strum(to_string = "approve")]
AutoReview,
Memories,
Skills,
@@ -117,7 +116,6 @@ impl SlashCommand {
SlashCommand::Collab => "change collaboration mode (experimental)",
SlashCommand::Agent | SlashCommand::MultiAgents => "switch the active agent thread",
SlashCommand::Side => "start a side conversation in an ephemeral fork",
SlashCommand::Approvals => "choose what Codex is allowed to do",
SlashCommand::Permissions => "choose what Codex is allowed to do",
SlashCommand::Keymap => "remap TUI shortcuts",
SlashCommand::Vim => "toggle Vim mode for the composer",
@@ -184,7 +182,6 @@ impl SlashCommand {
| SlashCommand::Model
| SlashCommand::Fast
| SlashCommand::Personality
| SlashCommand::Approvals
| SlashCommand::Permissions
| SlashCommand::Keymap
| SlashCommand::Vim
@@ -274,10 +271,10 @@ mod tests {
}
#[test]
fn auto_review_command_is_autoreview() {
assert_eq!(SlashCommand::AutoReview.command(), "autoreview");
fn auto_review_command_is_approve() {
assert_eq!(SlashCommand::AutoReview.command(), "approve");
assert_eq!(
SlashCommand::from_str("autoreview"),
SlashCommand::from_str("approve"),
Ok(SlashCommand::AutoReview)
);
}