mirror of
https://github.com/openai/codex.git
synced 2026-11-05 16:29:31 +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
@@ -398,7 +398,7 @@ impl App {
|
||||
serde_json::json!(auto_review_preset.approvals_reviewer.to_string()),
|
||||
));
|
||||
if previous_approvals_reviewer != auto_review_preset.approvals_reviewer {
|
||||
permissions_history_label = Some("Auto-review");
|
||||
permissions_history_label = Some("Approve for me");
|
||||
}
|
||||
} else if !effective_enabled {
|
||||
feature_edits.push(crate::config_update::clear_config_value(
|
||||
@@ -406,7 +406,7 @@ impl App {
|
||||
));
|
||||
feature_config.approvals_reviewer = ApprovalsReviewer::User;
|
||||
if previous_approvals_reviewer != ApprovalsReviewer::User {
|
||||
permissions_history_label = Some("Default");
|
||||
permissions_history_label = Some("Ask for approval");
|
||||
}
|
||||
}
|
||||
approvals_reviewer_override = Some(feature_config.approvals_reviewer);
|
||||
@@ -419,7 +419,7 @@ impl App {
|
||||
if !self.try_set_approval_policy_on_config(
|
||||
&mut feature_config,
|
||||
auto_review_preset.approval_policy,
|
||||
"Failed to enable Auto-review",
|
||||
"Failed to enable Approve for me",
|
||||
"failed to set auto-review approval policy on staged config",
|
||||
) {
|
||||
continue;
|
||||
@@ -428,7 +428,7 @@ impl App {
|
||||
.try_set_builtin_active_permission_profile_on_config(
|
||||
&mut feature_config,
|
||||
auto_review_preset.active_permission_profile.clone(),
|
||||
"Failed to enable Auto-review",
|
||||
"Failed to enable Approve for me",
|
||||
"failed to set auto-review permission profile on staged config",
|
||||
)
|
||||
else {
|
||||
@@ -546,7 +546,7 @@ impl App {
|
||||
"failed to set auto-review permission profile on chat config"
|
||||
);
|
||||
self.chat_widget
|
||||
.add_error_message(format!("Failed to enable Auto-review: {err}"));
|
||||
.add_error_message(format!("Failed to enable Approve for me: {err}"));
|
||||
}
|
||||
if permission_profile_override.is_some() {
|
||||
self.runtime_permission_profile_override =
|
||||
@@ -818,7 +818,7 @@ impl App {
|
||||
"failed to sync effective approval policy after an overridden write"
|
||||
);
|
||||
self.chat_widget.add_error_message(format!(
|
||||
"Failed to refresh overridden Auto-review settings: {err}"
|
||||
"Failed to refresh overridden Approve for me settings: {err}"
|
||||
));
|
||||
} else {
|
||||
self.chat_widget.set_approval_policy(policy);
|
||||
@@ -846,7 +846,7 @@ impl App {
|
||||
let Some(permission_profile) = self.try_set_builtin_active_permission_profile_on_config(
|
||||
&mut config,
|
||||
auto_review_preset.active_permission_profile.clone(),
|
||||
"Failed to refresh overridden Auto-review settings",
|
||||
"Failed to refresh overridden Approve for me settings",
|
||||
"failed to sync overridden Auto-review permission profile",
|
||||
) else {
|
||||
return;
|
||||
@@ -864,7 +864,7 @@ impl App {
|
||||
"failed to sync overridden Auto-review permission profile on chat config"
|
||||
);
|
||||
self.chat_widget.add_error_message(format!(
|
||||
"Failed to refresh overridden Auto-review settings: {err}"
|
||||
"Failed to refresh overridden Approve for me settings: {err}"
|
||||
));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1820,7 +1820,7 @@ async fn update_feature_flags_enabling_guardian_selects_auto_review() -> Result<
|
||||
.map(|line| line.to_string())
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n");
|
||||
assert!(rendered.contains("Permissions updated to Auto-review"));
|
||||
assert!(rendered.contains("Permissions updated to Approve for me"));
|
||||
|
||||
let config = std::fs::read_to_string(codex_home.path().join("config.toml"))?;
|
||||
assert!(config.contains("guardian_approval = true"));
|
||||
@@ -1915,7 +1915,7 @@ async fn update_feature_flags_disabling_guardian_clears_review_policy_and_restor
|
||||
.map(|line| line.to_string())
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n");
|
||||
assert!(rendered.contains("Permissions updated to Default"));
|
||||
assert!(rendered.contains("Permissions updated to Ask for approval"));
|
||||
|
||||
let config = std::fs::read_to_string(codex_home.path().join("config.toml"))?;
|
||||
assert!(!config.contains("guardian_approval = true"));
|
||||
|
||||
Reference in new issue
Block a user