Align TUI permissions labels with app (#25017)

## Summary

The desktop app now presents the on-request permissions mode as `Ask for
approval` and the manual-review-backed mode as `Approve for me`. The TUI
still exposed older/internal labels like `Default` and `Auto-review`,
which made the same underlying settings look different across clients.

This updates the TUI UX copy to match the app without changing the
underlying default behavior. Fresh threads continue to use the existing
on-request approval mode, now displayed as `Ask for approval`.

The label changes cover `/permissions`, explicit profile permissions
menus, status surfaces, config persistence history/error text, and the
corresponding TUI snapshots.

### Before
<img width="1181" height="119" alt="Screenshot 2026-05-28 at 10 19
47 PM"
src="https://github.com/user-attachments/assets/0664846b-b6dd-4931-b4dd-d0af0d42058e"
/>
<img width="523" height="19" alt="Screenshot 2026-05-28 at 10 21 29 PM"
src="https://github.com/user-attachments/assets/7899c33e-b35d-4684-8389-97e357803423"
/>

### After
<img width="1216" height="117" alt="Screenshot 2026-05-28 at 10 19
32 PM"
src="https://github.com/user-attachments/assets/015aab43-ac97-411f-8031-75cdd887251b"
/>
<img width="567" height="18" alt="Screenshot 2026-05-28 at 10 20 24 PM"
src="https://github.com/user-attachments/assets/28b6422c-b823-4298-b221-c83d46d09d66"
/>
This commit is contained in:
Eric Traut authored and GitHub committed 2026-05-29 11:06:40 -07:00
1 parent cb9178e8b3
commit 1333f4a689
32 files changed
+271 -263

No files matched your search

@@ -56,7 +56,9 @@ impl ChatWidget {
continue;
}
let base_name = if preset.id == "auto" && windows_degraded_sandbox_enabled {
"Default (non-admin sandbox)".to_string()
format!("{ASK_FOR_APPROVAL_LABEL} (non-admin sandbox)")
} else if preset.id == "auto" {
ASK_FOR_APPROVAL_LABEL.to_string()
} else {
preset.label.to_string()
};
@@ -100,7 +102,7 @@ impl ChatWidget {
if guardian_approval_enabled {
items.push(SelectionItem {
name: "Auto-review".to_string(),
name: APPROVE_FOR_ME_LABEL.to_string(),
description: Some(AUTO_REVIEW_DESCRIPTION.to_string()),
is_current: current_review_policy == ApprovalsReviewer::AutoReview
&& Self::preset_matches_current(
@@ -111,7 +113,7 @@ impl ChatWidget {
),
actions: self.permission_mode_actions(
&preset,
"Auto-review".to_string(),
APPROVE_FOR_ME_LABEL.to_string(),
ApprovalsReviewer::AutoReview,
/*profile_selection*/ None,
/*return_to_permissions*/ !include_read_only,
@@ -94,10 +94,10 @@ impl ChatWidget {
approval_policy: AskForApproval,
approvals_reviewer: ApprovalsReviewer,
) -> SelectionItem {
let label = if approvals_reviewer == ApprovalsReviewer::AutoReview {
"Auto-review"
} else {
preset.label
let label = match (preset.id, approvals_reviewer) {
("auto", ApprovalsReviewer::AutoReview) => APPROVE_FOR_ME_LABEL,
("auto", ApprovalsReviewer::User) => ASK_FOR_APPROVAL_LABEL,
_ => preset.label,
};
let active_profile_id = self
.config
@@ -4,11 +4,11 @@ expression: popup
---
Update Model Permissions
› 1. Default Codex can read and edit files in the current workspace, and
run commands. Approval is required to access the internet or
edit other files.
2. Full Access Codex can edit files outside this workspace and access the
internet without asking for approval. Exercise caution when
using.
› 1. Ask for approval Codex can read and edit files in the current workspace,
and run commands. Approval is required to access the
internet or edit other files.
2. Full Access Codex can edit files outside this workspace and access
the internet without asking for approval. Exercise
caution when using.
Press enter to confirm or esc to go back
@@ -7,7 +7,7 @@ expression: popup
› 1. Read Only (current) Codex can read files in the current workspace.
Approval is required to edit files or access the
internet.
2. Default Codex can read and edit files in the current
2. Ask for approval Codex can read and edit files in the current
workspace, and run commands. Approval is required to
access the internet or edit other files.
3. Full Access Codex can edit files outside this workspace and
@@ -5,17 +5,17 @@ expression: popup
---
Update Model Permissions
› 1. Read Only (current) Codex can read files in the current
workspace. Approval is required to edit
files or access the internet.
2. Default (non-admin sandbox) Codex can read and edit files in the
current workspace, and run commands.
Approval is required to access the
internet or edit other files.
3. Full Access Codex can edit files outside this
workspace and access the internet without
asking for approval. Exercise caution
when using.
› 1. Read Only (current) Codex can read files in the current
workspace. Approval is required to
edit files or access the internet.
2. Ask for approval (non-admin sandbox) Codex can read and edit files in the
current workspace, and run commands.
Approval is required to access the
internet or edit other files.
3. Full Access Codex can edit files outside this
workspace and access the internet
without asking for approval. Exercise
caution when using.
The non-admin sandbox protects your files and prevents network access under
most circumstances. However, it carries greater risk if prompt injected. To
@@ -1,5 +1,5 @@
---
source: tui/src/chatwidget/tests.rs
source: tui/src/chatwidget/tests/permissions.rs
expression: "lines_to_single_string(&cells[0])"
---
• Permissions updated to Default
• Permissions updated to Ask for approval
@@ -2,4 +2,4 @@
source: tui/src/chatwidget/tests.rs
expression: "lines_to_single_string(&cells[0])"
---
• Permissions updated to Default (non-admin sandbox)
• Permissions updated to Ask for approval (non-admin sandbox)
@@ -4,17 +4,17 @@ expression: "render_bottom_popup(&chat, 80)"
---
Update Model Permissions
› 1. Default (current) Codex can read and edit files in the current
workspace, and run commands. Approval is required to
access the internet or edit other files.
2. Auto-review Same workspace-write permissions as Default, but
eligible `on-request` approvals are routed through the
auto-reviewer subagent.
3. Full Access Codex can edit files outside this workspace and access
the internet without asking for approval. Exercise
caution when using.
4. Read Only Codex can read files in the current workspace.
Approval is required to edit files or access the
internet.
› 1. Ask for approval (current) Codex can read and edit files in the current
workspace, and run commands. Approval is
required to access the internet or edit other
files.
2. Approve for me Only ask for actions detected as potentially
unsafe.
3. Full Access Codex can edit files outside this workspace
and access the internet without asking for
approval. Exercise caution when using.
4. Read Only Codex can read files in the current
workspace. Approval is required to edit files
or access the internet.
Press enter to confirm or esc to go back
@@ -4,12 +4,11 @@ expression: "render_bottom_popup(&chat, 80)"
---
Update Model Permissions
1. Default Codex can read and edit files in the current
1. Ask for approval Codex can read and edit files in the current
workspace, and run commands. Approval is required
to access the internet or edit other files.
2. Auto-review Same workspace-write permissions as Default, but
eligible `on-request` approvals are routed through
the auto-reviewer subagent.
2. Approve for me Only ask for actions detected as potentially
unsafe.
3. Full Access Codex can edit files outside this workspace and
access the internet without asking for approval.
Exercise caution when using.
@@ -2,5 +2,5 @@
source: tui/src/chatwidget/tests/status_surface_previews.rs
expression: snapshot
---
status line: my-project · feat/awesome-feature · thread title · Read Only · on-request
status line: my-project · feat/awesome-feature · thread title · Read Only · Ask for approval
terminal title: thread title | feat/awesome-feature | Tasks 0/0
@@ -1016,13 +1016,14 @@ fn permissions_display(config: &Config) -> String {
fn approval_mode_display(config: &Config) -> String {
let approval_policy = AskForApproval::from(config.permissions.approval_policy.value());
if approval_policy == AskForApproval::OnRequest
&& config.approvals_reviewer == ApprovalsReviewer::AutoReview
{
"auto-review".to_string()
} else {
config.permissions.approval_policy.value().to_string()
if approval_policy == AskForApproval::OnRequest {
return match config.approvals_reviewer {
ApprovalsReviewer::AutoReview => "Approve for me".to_string(),
ApprovalsReviewer::User => "Ask for approval".to_string(),
};
}
config.permissions.approval_policy.value().to_string()
}
fn parse_items_with_invalids<T>(ids: impl IntoIterator<Item = String>) -> (Vec<T>, Vec<String>)
@@ -143,7 +143,7 @@ async fn profile_permissions_selection_emits_named_profile_event_only() {
approval_policy: Some(AskForApproval::OnRequest),
approvals_reviewer: Some(ApprovalsReviewer::User),
display_label,
}) if profile_id == ":workspace" && display_label == "Default"
}) if profile_id == ":workspace" && display_label == "Ask for approval"
));
}
@@ -208,7 +208,7 @@ async fn profile_permissions_selection_emits_auto_review_mode_event() {
approval_policy: Some(AskForApproval::OnRequest),
approvals_reviewer: Some(ApprovalsReviewer::AutoReview),
display_label,
}) if profile_id == ":workspace" && display_label == "Auto-review"
}) if profile_id == ":workspace" && display_label == "Approve for me"
));
}
@@ -256,7 +256,7 @@ async fn approvals_selection_popup_snapshot_windows_degraded_sandbox() {
let popup = render_bottom_popup(&chat, /*width*/ 80);
assert!(
popup.contains("Default (non-admin sandbox)"),
popup.contains("Ask for approval (non-admin sandbox)"),
"expected degraded sandbox label in approvals popup: {popup}"
);
assert!(
@@ -285,7 +285,7 @@ async fn preset_matching_accepts_workspace_write_with_extra_roots() {
cwd.as_path(),
&preset
),
"WorkspaceWrite with extra roots should still match the Default preset"
"WorkspaceWrite with extra roots should still match the Ask for approval preset"
);
assert!(
!ChatWidget::preset_matches_current(
@@ -629,7 +629,7 @@ async fn permissions_selection_history_snapshot_full_access_to_default() {
chat.open_permissions_popup();
let popup = render_bottom_popup(&chat, /*width*/ 120);
chat.handle_key_event(KeyEvent::from(KeyCode::Up));
if popup.contains("Auto-review") {
if popup.contains("Approve for me") {
chat.handle_key_event(KeyEvent::from(KeyCode::Up));
}
chat.handle_key_event(KeyEvent::from(KeyCode::Enter));
@@ -699,8 +699,8 @@ async fn permissions_selection_hides_auto_review_when_feature_disabled() {
let popup = render_bottom_popup(&chat, /*width*/ 120);
assert!(
!popup.contains("Auto-review"),
"expected Auto-review to stay hidden until the feature is enabled: {popup}"
!popup.contains("Approve for me"),
"expected Approve for me to stay hidden until the feature is enabled: {popup}"
);
}
@@ -730,8 +730,8 @@ async fn permissions_selection_hides_auto_review_when_feature_disabled_even_if_a
let popup = render_bottom_popup(&chat, /*width*/ 120);
assert!(
!popup.contains("Auto-review"),
"expected Auto-review to stay hidden when the feature is disabled: {popup}"
!popup.contains("Approve for me"),
"expected Approve for me to stay hidden when the feature is disabled: {popup}"
);
}
@@ -776,8 +776,8 @@ async fn permissions_selection_marks_auto_review_current_after_session_configure
let popup = render_bottom_popup(&chat, /*width*/ 120);
assert!(
popup.contains("Auto-review (current)"),
"expected Auto-review to be current after SessionConfigured sync: {popup}"
popup.contains("Approve for me (current)"),
"expected Approve for me to be current after SessionConfigured sync: {popup}"
);
}
@@ -826,8 +826,8 @@ async fn permissions_selection_marks_auto_review_current_with_custom_workspace_w
let popup = render_bottom_popup(&chat, /*width*/ 120);
assert!(
popup.contains("Auto-review (current)"),
"expected Auto-review to be current even with custom workspace-write details: {popup}"
popup.contains("Approve for me (current)"),
"expected Approve for me to be current even with custom workspace-write details: {popup}"
);
}
@@ -861,7 +861,7 @@ async fn permissions_selection_can_disable_auto_review() {
event,
AppEvent::UpdateApprovalsReviewer(ApprovalsReviewer::User)
)),
"expected selecting Default from Auto-review to switch back to manual approval review: {events:?}"
"expected selecting Ask for approval from Approve for me to switch back to manual approval review: {events:?}"
);
assert!(
!events
@@ -906,8 +906,8 @@ async fn permissions_selection_sends_approvals_reviewer_in_override_turn_context
assert!(
popup
.lines()
.any(|line| line.contains("Auto-review") && line.contains('›')),
"expected one Down from Default to select Auto-review: {popup}"
.any(|line| line.contains("Approve for me") && line.contains('›')),
"expected one Down from Ask for approval to select Approve for me: {popup}"
);
chat.handle_key_event(KeyEvent::from(KeyCode::Enter));