From 830d3869c94bb941dcbf6455565e3900a504e014 Mon Sep 17 00:00:00 2001 From: starr-openai Date: Fri, 29 May 2026 06:37:00 -0700 Subject: [PATCH] Pin terminal title project root tests --- codex-rs/tui/src/chatwidget/tests/terminal_title.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/codex-rs/tui/src/chatwidget/tests/terminal_title.rs b/codex-rs/tui/src/chatwidget/tests/terminal_title.rs index 98d5266da2..6e01a2cb59 100644 --- a/codex-rs/tui/src/chatwidget/tests/terminal_title.rs +++ b/codex-rs/tui/src/chatwidget/tests/terminal_title.rs @@ -3,9 +3,17 @@ use super::*; use pretty_assertions::assert_eq; +fn cache_missing_project_root(chat: &mut ChatWidget) { + chat.status_line_project_root_name_cache = Some(CachedProjectRootName { + cwd: chat.config.cwd.to_path_buf(), + root_name: None, + }); +} + #[tokio::test] async fn terminal_title_shows_action_required_while_exec_approval_is_pending() { let (mut chat, _rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await; + cache_missing_project_root(&mut chat); chat.bottom_pane.set_task_running(/*running*/ true); chat.refresh_terminal_title(); @@ -75,6 +83,7 @@ async fn terminal_title_action_required_respects_spinner_setting() { #[tokio::test] async fn terminal_title_action_required_blinks_when_animations_are_enabled() { let (mut chat, _rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await; + cache_missing_project_root(&mut chat); chat.bottom_pane.set_task_running(/*running*/ true); chat.terminal_title_animation_origin = Instant::now() - std::time::Duration::from_millis(1500); chat.refresh_terminal_title(); @@ -106,6 +115,7 @@ async fn terminal_title_action_required_blinks_when_animations_are_enabled() { #[tokio::test] async fn terminal_title_activity_indicators_do_not_animate_when_animations_are_disabled() { let (mut chat, _rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await; + cache_missing_project_root(&mut chat); chat.config.animations = false; chat.bottom_pane.set_task_running(/*running*/ true); chat.terminal_title_animation_origin = Instant::now() - std::time::Duration::from_millis(1500);