From cec14d27b5aa1a79e9de2e21a6281d308ae1fac3 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Wed, 25 Nov 2026 02:16:54 +0000 Subject: [PATCH] Show the quota plan in `/status` (#63877) ## Why The ChatGPT plan shown in `/status` can differ from the plan reported alongside the rate limits. Refreshing the limits could leave the card showing the old plan. ## What changed Use the cached quota plan for new status cards when available. If a rate-limit refresh changes the plan label, update the existing card in place, including when `/status` runs before a thread starts. ## Testing Cover a rate-limit response that changes the label from Plus to Pro 200 in terminal scrollback, copied status output, and subsequent `/status` cards. GitOrigin-RevId: c8def774ac2b344a2bb14b5eb834dec1d07d0099 --- codex-rs/tui/src/app/event_dispatch.rs | 10 ++- codex-rs/tui/src/app/history_ui.rs | 11 ++- codex-rs/tui/src/app/tests/thread_usage.rs | 61 +++++++++++++ codex-rs/tui/src/chatwidget/settings.rs | 2 +- .../tui/src/chatwidget/status_controls.rs | 11 ++- .../chatwidget/tests/status_command_tests.rs | 28 +++++- codex-rs/tui/src/status/card.rs | 88 ++++++++++++------- codex-rs/tui/src/status/tests.rs | 59 +++++++------ 8 files changed, 194 insertions(+), 76 deletions(-) diff --git a/codex-rs/tui/src/app/event_dispatch.rs b/codex-rs/tui/src/app/event_dispatch.rs index 7ac5fc0219..fc5f75f06b 100644 --- a/codex-rs/tui/src/app/event_dispatch.rs +++ b/codex-rs/tui/src/app/event_dispatch.rs @@ -2388,8 +2388,9 @@ impl App { tui.frame_requester().schedule_frame(); } RateLimitRefreshOrigin::StatusCommand { request_id } => { - self.chat_widget - .finish_status_rate_limit_refresh(request_id, snapshots); + if self.chat_widget.finish_status_rate_limit_refresh(request_id, snapshots) { + self.refresh_status_history(tui)?; + } } RateLimitRefreshOrigin::UsageMenu { request_id } => { self.chat_widget.finish_usage_menu_rate_limit_refresh( @@ -2439,8 +2440,9 @@ impl App { ); } RateLimitRefreshOrigin::StatusCommand { request_id } => { - self.chat_widget - .finish_status_rate_limit_refresh(request_id, Vec::new()); + if self.chat_widget.finish_status_rate_limit_refresh(request_id, Vec::new()) { + self.refresh_status_history(tui)?; + } } RateLimitRefreshOrigin::UsageMenu { request_id } => { self.chat_widget.finish_usage_menu_rate_limit_refresh( diff --git a/codex-rs/tui/src/app/history_ui.rs b/codex-rs/tui/src/app/history_ui.rs index def6eee7d5..d44cc8c26e 100644 --- a/codex-rs/tui/src/app/history_ui.rs +++ b/codex-rs/tui/src/app/history_ui.rs @@ -16,7 +16,7 @@ pub(super) struct RenderedHistoryTail { } pub(super) struct ThreadUsageStatusHistory { - thread_id: ThreadId, + thread_id: Option, pub(super) cell: Weak, pub(super) lines: Vec, } @@ -105,10 +105,9 @@ impl App { && lines.first().is_some_and(|line| { line.line.spans.len() == 1 && line.line.spans[0].content.as_ref() == "/status" }) - && let Some(thread_id) = self.chat_widget.thread_id() { self.last_thread_usage_status_cell = Some(ThreadUsageStatusHistory { - thread_id, + thread_id: self.chat_widget.thread_id(), cell: Arc::downgrade(cell), lines: lines.clone(), }); @@ -156,6 +155,10 @@ impl App { return Ok(()); } + self.refresh_status_history(tui) + } + + pub(super) fn refresh_status_history(&mut self, tui: &mut tui::Tui) -> Result<()> { if !tui.is_owned_screen() && (self.overlay.is_some() || self.initial_history_replay_buffer.is_some()) { @@ -170,7 +173,7 @@ impl App { self.pending_thread_usage_history_refresh = false; return Ok(()); }; - if self.chat_widget.thread_id() != Some(status_history.thread_id) { + if self.chat_widget.thread_id() != status_history.thread_id { self.last_thread_usage_status_cell = None; self.pending_thread_usage_history_refresh = false; return Ok(()); diff --git a/codex-rs/tui/src/app/tests/thread_usage.rs b/codex-rs/tui/src/app/tests/thread_usage.rs index fd57943c74..b0582b7795 100644 --- a/codex-rs/tui/src/app/tests/thread_usage.rs +++ b/codex-rs/tui/src/app/tests/thread_usage.rs @@ -121,6 +121,67 @@ async fn account_updated_with_backend_only_auth_enables_thread_usage() -> Result Ok(()) } +#[tokio::test] +async fn quota_reply_corrects_the_first_status_card_in_scrollback() -> Result<()> { + let (mut app, mut events, _) = make_test_app_with_channels().await; + app.chat_widget.update_account_state( + Some(crate::status::StatusAccountDisplay::ChatGpt { + email: Some("user@example.com".into()), + plan: Some("Plus".into()), + workspace: None, + }), + Some(PlanType::Plus), + /*has_chatgpt_account*/ true, + /*has_codex_backend_auth*/ true, + ); + while events.try_recv().is_ok() {} + let mut tui = crate::tui::test_support::make_test_tui()?; + tui.terminal.set_viewport_area(Rect::new( + /*x*/ 0, /*y*/ 21, /*width*/ 80, /*height*/ 3, + )); + let mut server = + crate::start_embedded_app_server_for_picker(app.chat_widget.config_ref()).await?; + let origin = RateLimitRefreshOrigin::StatusCommand { request_id: 1 }; + app.chat_widget + .add_status_output(/*refreshing_rate_limits*/ true, Some(1)); + app.handle_event(&mut tui, &mut server, events.try_recv()?) + .await?; + assert!(pending_history_text(&tui).contains("user@example.com (Plus)")); + tui.draw(/*height*/ 3, |_| {})?; + + let (request_id, hard_stop_generation) = app + .rate_limit_refresh_state + .start(origin, &mut app.rate_limit_hard_stop_generation) + .unwrap(); + let quota = serde_json::from_value(serde_json::json!({"planType": "pro"}))?; + app.handle_event( + &mut tui, + &mut server, + AppEvent::RateLimitsLoaded { + origin, + request_id, + hard_stop_generation, + result: Ok(super::rate_limits::account_rate_limits_response(quota)), + }, + ) + .await?; + + assert!( + tui.pending_history_lines_for_test().is_empty(), + "expected in-place replacement" + ); + let tail = app.last_rendered_history_tail.as_ref().unwrap(); + let account = tail + .lines + .iter() + .map(|line| line.line.to_string()) + .find(|line| line.contains("Account:")) + .unwrap(); + insta::assert_snapshot!(account.split_once("Account:").unwrap().1.trim(), @"user@example.com (Pro 200)"); + server.shutdown().await?; + Ok(()) +} + #[tokio::test] async fn completed_thread_usage_updates_status_without_scrollback_reflow() -> Result<()> { let (mut app, mut app_server, mut tui, thread_id, request_id) = diff --git a/codex-rs/tui/src/chatwidget/settings.rs b/codex-rs/tui/src/chatwidget/settings.rs index 734aec8627..b818a6c9b4 100644 --- a/codex-rs/tui/src/chatwidget/settings.rs +++ b/codex-rs/tui/src/chatwidget/settings.rs @@ -280,7 +280,7 @@ impl ChatWidget { let had_refreshing_status_outputs = !self.refreshing_status_outputs.is_empty(); let now = Local::now(); for (_, handle) in self.refreshing_status_outputs.drain(..) { - handle.finish_rate_limit_refresh(&[], now); + handle.finish_rate_limit_refresh(&[], /*quota_plan*/ None, now); } if had_refreshing_status_outputs { self.request_redraw(); diff --git a/codex-rs/tui/src/chatwidget/status_controls.rs b/codex-rs/tui/src/chatwidget/status_controls.rs index e95b63c238..399ae2c491 100644 --- a/codex-rs/tui/src/chatwidget/status_controls.rs +++ b/codex-rs/tui/src/chatwidget/status_controls.rs @@ -266,7 +266,7 @@ impl ChatWidget { self.thread_name.clone(), self.forked_from, rate_limit_snapshots.as_slice(), - self.plan_type, + self.quota_plan, Local::now(), self.status_model_display_name(), collaboration_mode, @@ -306,17 +306,18 @@ impl ChatWidget { }); } + /// Returns whether terminal history needs to show a corrected account label. pub(crate) fn finish_status_rate_limit_refresh( &mut self, request_id: u64, snapshots: Vec, - ) { + ) -> bool { let Some(index) = self .refreshing_status_outputs .iter() .position(|(pending_request_id, _)| *pending_request_id == request_id) else { - return; + return false; }; for snapshot in snapshots { self.on_rate_limit_snapshot(Some(snapshot)); @@ -328,8 +329,10 @@ impl ChatWidget { .values() .cloned() .collect(); - handle.finish_rate_limit_refresh(&rate_limit_snapshots, Local::now()); + let plan_changed = + handle.finish_rate_limit_refresh(&rate_limit_snapshots, self.quota_plan, Local::now()); self.request_redraw(); + plan_changed } pub(super) fn open_status_line_setup(&mut self) { diff --git a/codex-rs/tui/src/chatwidget/tests/status_command_tests.rs b/codex-rs/tui/src/chatwidget/tests/status_command_tests.rs index 12ccac09e8..b26fa050f4 100644 --- a/codex-rs/tui/src/chatwidget/tests/status_command_tests.rs +++ b/codex-rs/tui/src/chatwidget/tests/status_command_tests.rs @@ -35,11 +35,18 @@ async fn status_command_renders_immediately_and_refreshes_rate_limits_for_chatgp async fn status_command_refresh_updates_cached_limits_for_future_status_outputs() { let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await; set_chatgpt_auth(&mut chat); + chat.status_account_display = Some(crate::status::StatusAccountDisplay::ChatGpt { + email: Some("user@example.com".into()), + plan: Some("Plus".into()), + workspace: None, + }); chat.dispatch_command(SlashCommand::Status); match rx.try_recv() { - Ok(AppEvent::InsertHistoryCell(_)) => {} + Ok(AppEvent::InsertHistoryCell(cell)) => { + assert!(lines_to_single_string(&cell.display_lines(/*width*/ 80)).contains("(Plus)")); + } other => panic!("expected status output before refresh request, got {other:?}"), } let first_request_id = match rx.try_recv() { @@ -49,7 +56,9 @@ async fn status_command_refresh_updates_cached_limits_for_future_status_outputs( other => panic!("expected rate-limit refresh request, got {other:?}"), }; - chat.finish_status_rate_limit_refresh(first_request_id, vec![snapshot(/*percent*/ 92.0)]); + let mut limits = snapshot(/*percent*/ 92.0); + limits.plan_type = Some(PlanType::Pro); + chat.finish_status_rate_limit_refresh(first_request_id, vec![limits]); drain_insert_history(&mut rx); chat.dispatch_command(SlashCommand::Copy); @@ -57,7 +66,7 @@ async fn status_command_refresh_updates_cached_limits_for_future_status_outputs( assert_matches!( rx.try_recv(), Ok(AppEvent::CopySelection { text, label, .. }) - if label == "Whole status" && text.contains("8% left") + if label == "Whole status" && text.contains("8% left") && text.contains("user@example.com (Pro 200)") ); assert_matches!(rx.try_recv(), Ok(AppEvent::SettingsSelectionClosed)); @@ -68,10 +77,23 @@ async fn status_command_refresh_updates_cached_limits_for_future_status_outputs( } other => panic!("expected refreshed status output, got {other:?}"), }; + insta::assert_snapshot!( + refreshed.lines().find_map(|line| line.trim().strip_prefix("Account:")).unwrap().trim(), + @"user@example.com (Pro 200)" + ); assert!( refreshed.contains("8% left"), "expected a future /status output to use refreshed cached limits, got: {refreshed}" ); + let AppEvent::RefreshRateLimits { + origin: RateLimitRefreshOrigin::StatusCommand { request_id }, + } = rx.try_recv().unwrap() + else { + panic!("expected a second status refresh"); + }; + let mut limits = snapshot(/*percent*/ 93.0); + limits.plan_type = Some(PlanType::Pro); + assert!(!chat.finish_status_rate_limit_refresh(request_id, vec![limits])); } #[tokio::test] diff --git a/codex-rs/tui/src/status/card.rs b/codex-rs/tui/src/status/card.rs index 706eeb89ae..5f8df155bd 100644 --- a/codex-rs/tui/src/status/card.rs +++ b/codex-rs/tui/src/status/card.rs @@ -71,10 +71,28 @@ pub(crate) struct StatusTokenUsageData { #[derive(Debug)] struct StatusRateLimitState { + account: Option, rate_limits: StatusRateLimitData, refreshing_rate_limits: bool, } +impl StatusRateLimitState { + /// Returns whether the account label changed in the rendered card. + fn update_quota_plan(&mut self, quota_plan: Option) -> bool { + let (Some(StatusAccountDisplay::ChatGpt { plan, .. }), Some(quota_plan)) = + (&mut self.account, quota_plan) + else { + return false; + }; + let label = super::plan_type_display_name(quota_plan); + if plan.as_ref() == Some(&label) { + return false; + } + *plan = Some(label); + true + } +} + #[derive(Debug, Clone)] pub(crate) struct StatusHistoryHandle { card: Arc, @@ -99,8 +117,9 @@ impl StatusHistoryHandle { pub(crate) fn finish_rate_limit_refresh( &self, rate_limits: &[RateLimitSnapshotDisplay], + quota_plan: Option, now: DateTime, - ) { + ) -> bool { let rate_limits = if rate_limits.len() <= 1 { compose_rate_limit_data(rate_limits.first(), now) } else { @@ -114,6 +133,7 @@ impl StatusHistoryHandle { .expect("status history rate-limit state poisoned"); state.rate_limits = rate_limits; state.refreshing_rate_limits = false; + state.update_quota_plan(quota_plan) } pub(crate) fn set_thread_usage( @@ -136,7 +156,6 @@ struct StatusHistoryCell { model_provider: Option, remote_connection: Option, show_chatgpt_usage_link: bool, - account: Option, thread_name: Option, session_id: Option, forked_from: Option, @@ -156,7 +175,7 @@ pub(crate) fn new_status_output( thread_name: Option, forked_from: Option, rate_limits: Option<&RateLimitSnapshotDisplay>, - _plan_type: Option, + quota_plan: Option, now: DateTime, model_name: &str, collaboration_mode: Option<&str>, @@ -172,7 +191,7 @@ pub(crate) fn new_status_output( thread_name, forked_from, snapshots, - _plan_type, + quota_plan, now, model_name, collaboration_mode, @@ -192,7 +211,7 @@ pub(crate) fn new_status_output_with_rate_limits( thread_name: Option, forked_from: Option, rate_limits: &[RateLimitSnapshotDisplay], - _plan_type: Option, + quota_plan: Option, now: DateTime, model_name: &str, collaboration_mode: Option<&str>, @@ -211,7 +230,7 @@ pub(crate) fn new_status_output_with_rate_limits( thread_name, forked_from, rate_limits, - _plan_type, + quota_plan, now, model_name, collaboration_mode, @@ -235,7 +254,7 @@ pub(crate) fn new_status_output_with_rate_limits_handle( thread_name: Option, forked_from: Option, rate_limits: &[RateLimitSnapshotDisplay], - _plan_type: Option, + quota_plan: Option, now: DateTime, model_name: &str, collaboration_mode: Option<&str>, @@ -256,7 +275,7 @@ pub(crate) fn new_status_output_with_rate_limits_handle( thread_name, forked_from, rate_limits, - _plan_type, + quota_plan, now, model_name, collaboration_mode, @@ -288,7 +307,7 @@ impl StatusHistoryCell { thread_name: Option, forked_from: Option, rate_limits: &[RateLimitSnapshotDisplay], - _plan_type: Option, + quota_plan: Option, now: DateTime, model_name: &str, collaboration_mode: Option<&str>, @@ -398,10 +417,12 @@ impl StatusHistoryCell { } else { compose_rate_limit_data_many(rate_limits, now) }; - let rate_limit_state = Arc::new(RwLock::new(StatusRateLimitState { + let mut rate_limit_state = StatusRateLimitState { + account, rate_limits, refreshing_rate_limits, - })); + }; + rate_limit_state.update_quota_plan(quota_plan); let agents_summary = Arc::new(RwLock::new(agents_summary)); let thread_usage = StatusThreadUsage::default(); @@ -414,13 +435,12 @@ impl StatusHistoryCell { model_provider, remote_connection: remote_connection.cloned(), show_chatgpt_usage_link, - account, thread_name, session_id, forked_from, token_usage, agents_summary, - rate_limit_state, + rate_limit_state: Arc::new(RwLock::new(rate_limit_state)), thread_usage, } } @@ -760,19 +780,27 @@ impl StatusHistoryCell { } let mut lines = Vec::new(); - let account_value = self.account.as_ref().map(|account| match account { - StatusAccountDisplay::ChatGpt { email, plan, .. } => match (email, plan) { - (Some(email), Some(plan)) => format!("{email} ({plan})"), - (Some(email), None) => email.clone(), - (None, Some(plan)) => plan.clone(), - (None, None) => "ChatGPT".to_string(), - }, - StatusAccountDisplay::ApiKey => { - "API key configured (run codex login to use ChatGPT)".to_string() - } - }); + #[expect(clippy::expect_used)] + let rate_limit_state = self + .rate_limit_state + .read() + .expect("status history rate-limit state poisoned"); + let account_value = rate_limit_state + .account + .as_ref() + .map(|account| match account { + StatusAccountDisplay::ChatGpt { email, plan, .. } => match (email, plan) { + (Some(email), Some(plan)) => format!("{email} ({plan})"), + (Some(email), None) => email.clone(), + (None, Some(plan)) => plan.clone(), + (None, None) => "ChatGPT".to_string(), + }, + StatusAccountDisplay::ApiKey => { + "API key configured (run codex login to use ChatGPT)".to_string() + } + }); - let workspace = match &self.account { + let workspace = match &rate_limit_state.account { Some(StatusAccountDisplay::ChatGpt { workspace, .. }) => workspace.as_deref(), _ => None, }; @@ -784,11 +812,6 @@ impl StatusHistoryCell { let mut seen: BTreeSet = labels.iter().cloned().collect(); let thread_name = self.thread_name.as_deref().filter(|name| !name.is_empty()); #[expect(clippy::expect_used)] - let rate_limit_state = self - .rate_limit_state - .read() - .expect("status history rate-limit state poisoned"); - #[expect(clippy::expect_used)] let agents_summary = self .agents_summary .read() @@ -886,7 +909,10 @@ impl StatusHistoryCell { lines.push(Line::from(Vec::>::new())); // Hide token usage only for ChatGPT subscribers - if !matches!(self.account, Some(StatusAccountDisplay::ChatGpt { .. })) { + if !matches!( + rate_limit_state.account, + Some(StatusAccountDisplay::ChatGpt { .. }) + ) { lines.push(formatter.line("Token usage", self.token_usage_spans())); } diff --git a/codex-rs/tui/src/status/tests.rs b/codex-rs/tui/src/status/tests.rs index b803b99f96..7f80ec7f7a 100644 --- a/codex-rs/tui/src/status/tests.rs +++ b/codex-rs/tui/src/status/tests.rs @@ -249,7 +249,7 @@ fn permissions_text_for_width(config: &Config, width: u16) -> Option { /*thread_name*/ None, /*forked_from*/ None, /*rate_limits*/ None, - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -335,7 +335,7 @@ async fn status_snapshot_includes_reasoning_details() { /*thread_name*/ None, /*forked_from*/ None, Some(&rate_display), - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -444,7 +444,7 @@ async fn status_snapshot_shows_chatgpt_plan_without_email() { /*thread_name*/ None, /*forked_from*/ None, /*rate_limits*/ None, - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -754,7 +754,7 @@ async fn status_snapshot_shows_active_user_defined_profile() { /*thread_name*/ None, /*forked_from*/ None, /*rate_limits*/ None, - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -806,7 +806,7 @@ async fn status_uses_server_provider_id_and_auth_requirement() { /*thread_name*/ None, /*forked_from*/ None, /*rate_limits*/ &[], - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -837,7 +837,7 @@ async fn status_uses_server_provider_id_and_auth_requirement() { /*thread_name*/ None, /*forked_from*/ None, /*rate_limits*/ &[], - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -910,7 +910,7 @@ async fn status_snapshot_shows_auto_review_permissions() { /*thread_name*/ None, /*forked_from*/ None, /*rate_limits*/ None, - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -1011,7 +1011,7 @@ async fn status_snapshot_includes_forked_from() { /*thread_name*/ None, Some(forked_from), /*rate_limits*/ None, - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -1078,7 +1078,7 @@ async fn status_snapshot_includes_monthly_limit() { /*thread_name*/ None, /*forked_from*/ None, Some(&rate_display), - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -1145,7 +1145,7 @@ async fn status_snapshot_includes_enterprise_monthly_credit_limit() { /*thread_name*/ None, /*forked_from*/ None, Some(&rate_display), - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -1228,7 +1228,7 @@ async fn status_snapshot_uses_generic_limit_labels_for_unsupported_windows() { /*thread_name*/ None, /*forked_from*/ None, Some(&rate_display), - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -1282,7 +1282,7 @@ async fn status_snapshot_shows_unlimited_credits() { /*thread_name*/ None, /*forked_from*/ None, Some(&rate_display), - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -1335,7 +1335,7 @@ async fn status_snapshot_shows_positive_credits() { /*thread_name*/ None, /*forked_from*/ None, Some(&rate_display), - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -1395,7 +1395,7 @@ async fn status_snapshot_shows_available_credits_without_display_balance() { /*thread_name*/ None, /*forked_from*/ None, Some(&rate_display), - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -1449,7 +1449,7 @@ async fn status_snapshot_respects_unlimited_without_has_credits_flag() { /*thread_name*/ None, /*forked_from*/ None, Some(&rate_display), - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -1497,7 +1497,7 @@ async fn status_card_token_usage_excludes_cached_tokens() { /*thread_name*/ None, /*forked_from*/ None, /*rate_limits*/ None, - None, + /*quota_plan*/ None, now, &model_slug, /*collaboration_mode*/ None, @@ -1532,7 +1532,7 @@ async fn status_wraps_long_paths_and_session_ids_without_losing_text() { Some("A thread with a long descriptive name".to_string()), /*forked_from*/ None, /*rate_limits*/ &[], - /*_plan_type*/ None, + /*quota_plan*/ None, Local::now(), "gpt-5.5", /*collaboration_mode*/ None, @@ -1618,7 +1618,7 @@ async fn status_snapshot_wraps_in_narrow_terminal() { /*thread_name*/ None, /*forked_from*/ None, Some(&rate_display), - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -1660,7 +1660,7 @@ async fn status_snapshot_wraps_halfwidth_kana_in_narrow_terminal() { Some("ガパガパガパガパ thread".to_string()), /*forked_from*/ None, /*rate_limits*/ None, - /*plan_type*/ None, + /*quota_plan*/ None, now, "ガパガパガパガパ-model", Some("ガパ collaboration mode"), @@ -1708,7 +1708,7 @@ async fn status_snapshot_shows_missing_limits_message() { /*thread_name*/ None, /*forked_from*/ None, /*rate_limits*/ None, - None, + /*quota_plan*/ None, now, &model_slug, /*collaboration_mode*/ None, @@ -1799,7 +1799,7 @@ async fn status_snapshot_uses_default_reasoning_when_config_empty() { /*thread_name*/ None, /*forked_from*/ None, &[], - None, + /*quota_plan*/ None, now, &model_slug, /*collaboration_mode*/ None, @@ -1870,7 +1870,7 @@ async fn status_snapshot_shows_refreshing_limits_notice() { /*thread_name*/ None, /*forked_from*/ None, std::slice::from_ref(&rate_display), - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -1912,7 +1912,7 @@ async fn transcript_overlay_remeasures_status_after_rate_limit_refresh() { /*thread_name*/ None, /*forked_from*/ None, /*rate_limits*/ &[], - None, + /*quota_plan*/ None, now, &model_slug, /*collaboration_mode*/ None, @@ -1949,6 +1949,7 @@ async fn transcript_overlay_remeasures_status_after_rate_limit_refresh() { credits: None, individual_limit: None, }], + /*quota_plan*/ None, now, ); overlay.insert_cell(Arc::new(PlainHistoryCell::new(vec!["next message".into()]))); @@ -2036,7 +2037,7 @@ async fn status_snapshot_includes_credits_and_limits() { /*thread_name*/ None, /*forked_from*/ None, Some(&rate_display), - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -2098,7 +2099,7 @@ async fn status_snapshot_shows_unavailable_limits_message() { /*thread_name*/ None, /*forked_from*/ None, Some(&rate_display), - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -2159,7 +2160,7 @@ async fn status_snapshot_treats_refreshing_empty_limits_as_unavailable() { /*thread_name*/ None, /*forked_from*/ None, std::slice::from_ref(&rate_display), - None, + /*quota_plan*/ None, captured_at, &model_slug, /*collaboration_mode*/ None, @@ -2231,7 +2232,7 @@ async fn status_snapshot_shows_stale_limits_message() { /*thread_name*/ None, /*forked_from*/ None, Some(&rate_display), - None, + /*quota_plan*/ None, now, &model_slug, /*collaboration_mode*/ None, @@ -2306,7 +2307,7 @@ async fn status_snapshot_cached_limits_hide_credits_without_flag() { /*thread_name*/ None, /*forked_from*/ None, Some(&rate_display), - None, + /*quota_plan*/ None, now, &model_slug, /*collaboration_mode*/ None, @@ -2366,7 +2367,7 @@ async fn status_context_window_uses_last_usage() { /*thread_name*/ None, /*forked_from*/ None, /*rate_limits*/ None, - None, + /*quota_plan*/ None, now, &model_slug, /*collaboration_mode*/ None,