Skip to content

Commit 3104961

Browse files
JoeJoe
authored andcommitted
Remove unused persistent approvals reviewer event
1 parent d08bb60 commit 3104961

3 files changed

Lines changed: 0 additions & 39 deletions

File tree

‎codex-rs/tui/src/app.rs‎

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5447,36 +5447,6 @@ impl App {
54475447
AppEvent::UpdateApprovalsReviewerForSession(policy) => {
54485448
self.set_approvals_reviewer_in_app_and_widget(policy);
54495449
}
5450-
AppEvent::UpdateApprovalsReviewer(policy) => {
5451-
self.config.approvals_reviewer = policy;
5452-
self.chat_widget.set_approvals_reviewer(policy);
5453-
let profile = self.active_profile.as_deref();
5454-
let segments = if let Some(profile) = profile {
5455-
vec![
5456-
"profiles".to_string(),
5457-
profile.to_string(),
5458-
"approvals_reviewer".to_string(),
5459-
]
5460-
} else {
5461-
vec!["approvals_reviewer".to_string()]
5462-
};
5463-
if let Err(err) = ConfigEditsBuilder::new(&self.config.codex_home)
5464-
.with_profile(profile)
5465-
.with_edits([ConfigEdit::SetPath {
5466-
segments,
5467-
value: policy.to_string().into(),
5468-
}])
5469-
.apply()
5470-
.await
5471-
{
5472-
tracing::error!(
5473-
error = %err,
5474-
"failed to persist approvals reviewer update"
5475-
);
5476-
self.chat_widget
5477-
.add_error_message(format!("Failed to save approvals reviewer: {err}"));
5478-
}
5479-
}
54805450
AppEvent::UpdateFeatureFlags { updates } => {
54815451
self.update_feature_flags(updates).await;
54825452
}

‎codex-rs/tui/src/app_event.rs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,6 @@ pub(crate) enum AppEvent {
462462
/// Update the current approvals reviewer in the running app and widget for this session only.
463463
UpdateApprovalsReviewerForSession(ApprovalsReviewer),
464464

465-
/// Update the current approvals reviewer and persist it to config.toml.
466-
UpdateApprovalsReviewer(ApprovalsReviewer),
467-
468465
/// Update feature flags and persist them to the top-level config.
469466
UpdateFeatureFlags {
470467
updates: Vec<(Feature, bool)>,

‎codex-rs/tui/src/chatwidget/tests/permissions.rs‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -701,12 +701,6 @@ async fn permissions_full_access_history_cell_emitted_only_after_confirmation()
701701
)),
702702
"expected full access confirmation to update the reviewer for this session: {events_after_confirmation:?}"
703703
);
704-
assert!(
705-
!events_after_confirmation
706-
.iter()
707-
.any(|event| matches!(event, AppEvent::UpdateApprovalsReviewer(_))),
708-
"session-only full access confirmation must not persist approvals_reviewer: {events_after_confirmation:?}"
709-
);
710704
let cells_after_confirmation = events_after_confirmation
711705
.into_iter()
712706
.filter_map(|event| match event {

0 commit comments

Comments
 (0)