mirror of
https://github.com/openai/codex.git
synced 2026-11-19 23:05:23 +00:00
Revert "Option to Notify Workspace Owner When Usage Limit is Reached" (#17391)
Reverts openai/codex#16969 #sev3-2026-04-10-accountscheckversion-500s-for-openai-workspace-7300
This commit is contained in:
1 parent
a3be74143a
commit
930e5adb7e
82 files changed
+60
-3233
No files matched your search
@@ -538,9 +538,6 @@ impl ThreadEventStore {
|
||||
ThreadBufferedEvent::Request(_)
|
||||
| ThreadBufferedEvent::Notification(ServerNotification::HookStarted(_))
|
||||
| ThreadBufferedEvent::Notification(ServerNotification::HookCompleted(_))
|
||||
| ThreadBufferedEvent::Notification(
|
||||
ServerNotification::AddCreditsNudgeEmailCompleted(_),
|
||||
)
|
||||
| ThreadBufferedEvent::FeedbackSubmission(_)
|
||||
)
|
||||
}
|
||||
@@ -1100,8 +1097,6 @@ impl App {
|
||||
feedback: self.feedback.clone(),
|
||||
is_first_run: false,
|
||||
status_account_display: self.chat_widget.status_account_display().cloned(),
|
||||
initial_workspace_role: self.chat_widget.current_workspace_role(),
|
||||
initial_is_workspace_owner: self.chat_widget.current_is_workspace_owner(),
|
||||
initial_plan_type: self.chat_widget.current_plan_type(),
|
||||
model: Some(self.chat_widget.current_model().to_string()),
|
||||
startup_tooltip_override: None,
|
||||
@@ -2432,10 +2427,6 @@ impl App {
|
||||
.await?;
|
||||
Ok(true)
|
||||
}
|
||||
AppCommandView::SendAddCreditsNudgeEmail => {
|
||||
app_server.thread_add_credits_nudge_email(thread_id).await?;
|
||||
Ok(true)
|
||||
}
|
||||
AppCommandView::ReloadUserConfig => {
|
||||
app_server.reload_user_config().await?;
|
||||
Ok(true)
|
||||
@@ -3663,8 +3654,6 @@ impl App {
|
||||
let has_chatgpt_account = bootstrap.has_chatgpt_account;
|
||||
let requires_openai_auth = bootstrap.requires_openai_auth;
|
||||
let status_account_display = bootstrap.status_account_display.clone();
|
||||
let initial_workspace_role = bootstrap.workspace_role;
|
||||
let initial_is_workspace_owner = bootstrap.is_workspace_owner;
|
||||
let initial_plan_type = bootstrap.plan_type;
|
||||
let session_telemetry = SessionTelemetry::new(
|
||||
ThreadId::new(),
|
||||
@@ -3714,8 +3703,6 @@ impl App {
|
||||
feedback: feedback.clone(),
|
||||
is_first_run,
|
||||
status_account_display: status_account_display.clone(),
|
||||
initial_workspace_role,
|
||||
initial_is_workspace_owner,
|
||||
initial_plan_type,
|
||||
model: Some(model.clone()),
|
||||
startup_tooltip_override,
|
||||
@@ -3750,8 +3737,6 @@ impl App {
|
||||
feedback: feedback.clone(),
|
||||
is_first_run,
|
||||
status_account_display: status_account_display.clone(),
|
||||
initial_workspace_role,
|
||||
initial_is_workspace_owner,
|
||||
initial_plan_type,
|
||||
model: config.model.clone(),
|
||||
startup_tooltip_override: None,
|
||||
@@ -3791,8 +3776,6 @@ impl App {
|
||||
feedback: feedback.clone(),
|
||||
is_first_run,
|
||||
status_account_display: status_account_display.clone(),
|
||||
initial_workspace_role,
|
||||
initial_is_workspace_owner,
|
||||
initial_plan_type,
|
||||
model: config.model.clone(),
|
||||
startup_tooltip_override: None,
|
||||
@@ -4577,23 +4560,6 @@ impl App {
|
||||
}
|
||||
}
|
||||
},
|
||||
AppEvent::NotifyWorkspaceOwner => {
|
||||
if self.active_thread_id.is_some() {
|
||||
self.chat_widget.start_notify_workspace_owner();
|
||||
if let Err(err) = self
|
||||
.submit_active_thread_op(app_server, Op::SendAddCreditsNudgeEmail.into())
|
||||
.await
|
||||
{
|
||||
self.chat_widget
|
||||
.finish_notify_workspace_owner(Err(err.to_string()));
|
||||
return Err(err);
|
||||
}
|
||||
} else {
|
||||
self.chat_widget.finish_notify_workspace_owner(Err(
|
||||
"no active thread is available".to_string(),
|
||||
));
|
||||
}
|
||||
}
|
||||
AppEvent::ConnectorsLoaded { result, is_final } => {
|
||||
self.chat_widget.on_connectors_loaded(result, is_final);
|
||||
}
|
||||
@@ -6374,8 +6340,6 @@ mod tests {
|
||||
use crate::multi_agents::AgentPickerThreadEntry;
|
||||
use assert_matches::assert_matches;
|
||||
|
||||
use codex_app_server_protocol::AddCreditsNudgeEmailNotification;
|
||||
use codex_app_server_protocol::AddCreditsNudgeEmailResult;
|
||||
use codex_app_server_protocol::AdditionalFileSystemPermissions;
|
||||
use codex_app_server_protocol::AdditionalNetworkPermissions;
|
||||
use codex_app_server_protocol::AdditionalPermissionProfile;
|
||||
@@ -6763,8 +6727,6 @@ mod tests {
|
||||
feedback: codex_feedback::CodexFeedback::new(),
|
||||
is_first_run: false,
|
||||
status_account_display: None,
|
||||
initial_workspace_role: None,
|
||||
initial_is_workspace_owner: None,
|
||||
initial_plan_type: None,
|
||||
model: Some(model),
|
||||
startup_tooltip_override: None,
|
||||
@@ -9668,29 +9630,6 @@ guardian_approval = true
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn thread_event_store_rebase_preserves_add_credits_nudge_email_completion() {
|
||||
let thread_id = ThreadId::new();
|
||||
let mut store = ThreadEventStore::new(/*capacity*/ 8);
|
||||
let notification =
|
||||
ServerNotification::AddCreditsNudgeEmailCompleted(AddCreditsNudgeEmailNotification {
|
||||
thread_id: thread_id.to_string(),
|
||||
result: AddCreditsNudgeEmailResult::Sent,
|
||||
});
|
||||
store.push_notification(notification.clone());
|
||||
|
||||
store.rebase_buffer_after_session_refresh();
|
||||
|
||||
let snapshot = store.snapshot();
|
||||
let [ThreadBufferedEvent::Notification(actual)] = snapshot.events.as_slice() else {
|
||||
panic!("expected add-credits nudge email completion notification");
|
||||
};
|
||||
assert_eq!(
|
||||
serde_json::to_value(actual).expect("notification should serialize"),
|
||||
serde_json::to_value(notification).expect("notification should serialize"),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn build_feedback_upload_params_includes_thread_id_and_rollout_path() {
|
||||
let thread_id = ThreadId::new();
|
||||
@@ -10752,8 +10691,6 @@ guardian_approval = true
|
||||
feedback: app.feedback.clone(),
|
||||
is_first_run: false,
|
||||
status_account_display: app.chat_widget.status_account_display().cloned(),
|
||||
initial_workspace_role: app.chat_widget.current_workspace_role(),
|
||||
initial_is_workspace_owner: app.chat_widget.current_is_workspace_owner(),
|
||||
initial_plan_type: app.chat_widget.current_plan_type(),
|
||||
model: Some(app.chat_widget.current_model().to_string()),
|
||||
startup_tooltip_override: None,
|
||||
|
||||
Reference in new issue
Block a user