mirror of
https://github.com/openai/codex.git
synced 2026-11-11 06:31:37 +00:00
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:
1 parent
cb9178e8b3
commit
1333f4a689
32 files changed
+271
-263
No files matched your search
@@ -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));
|
||||
|
||||
|
||||
Reference in new issue
Block a user