@@ -2086,7 +2086,6 @@ async fn make_chatwidget_manual(
20862086 terminal_title_invalid_items_warned : Arc :: new ( AtomicBool :: new ( false ) ) ,
20872087 last_terminal_title : None ,
20882088 terminal_title_setup_original_items : None ,
2089- terminal_title_animation_origin : Instant :: now ( ) ,
20902089 status_line_project_root_name_cache : None ,
20912090 status_line_branch : None ,
20922091 status_line_branch_cwd : None ,
@@ -6682,14 +6681,13 @@ async fn undo_completed_clears_terminal_title_undo_state() {
66826681 let ( mut chat, _rx, _op_rx) = make_chatwidget_manual ( None ) . await ;
66836682 chat. config . animations = true ;
66846683 chat. config . tui_terminal_title = Some ( vec ! [ "spinner" . to_string( ) , "status" . to_string( ) ] ) ;
6685- chat. terminal_title_animation_origin = Instant :: now ( ) + Duration :: from_secs ( 1 ) ;
66866684
66876685 chat. handle_codex_event ( Event {
66886686 id : "turn-undo" . to_string ( ) ,
66896687 msg : EventMsg :: UndoStarted ( UndoStartedEvent { message : None } ) ,
66906688 } ) ;
66916689
6692- assert_eq ! ( chat. last_terminal_title, Some ( "⠋ Undoing" . to_string( ) ) ) ;
6690+ assert_eq ! ( chat. last_terminal_title, Some ( "Undoing" . to_string( ) ) ) ;
66936691
66946692 chat. handle_codex_event ( Event {
66956693 id : "turn-undo" . to_string ( ) ,
@@ -6711,14 +6709,13 @@ async fn undo_started_refreshes_default_spinner_project_title() {
67116709 . last_terminal_title
67126710 . clone ( )
67136711 . expect ( "default title should include a project name" ) ;
6714- chat. terminal_title_animation_origin = Instant :: now ( ) + Duration :: from_secs ( 1 ) ;
67156712
67166713 chat. handle_codex_event ( Event {
67176714 id : "turn-undo" . to_string ( ) ,
67186715 msg : EventMsg :: UndoStarted ( UndoStartedEvent { message : None } ) ,
67196716 } ) ;
67206717
6721- assert_eq ! ( chat. last_terminal_title, Some ( format! ( "⠋ { project}" ) ) ) ;
6718+ assert_eq ! ( chat. last_terminal_title, Some ( project) ) ;
67226719}
67236720
67246721/// The commit picker shows only commit subjects (no timestamps).
@@ -11619,7 +11616,7 @@ async fn terminal_title_can_render_app_name_item() {
1161911616}
1162011617
1162111618#[ tokio:: test]
11622- async fn default_terminal_title_refreshes_when_spinner_state_changes ( ) {
11619+ async fn default_terminal_title_refreshes_when_task_state_changes ( ) {
1162311620 let ( mut chat, _rx, _op_rx) = make_chatwidget_manual ( None ) . await ;
1162411621 chat. config . animations = true ;
1162511622
@@ -11658,34 +11655,22 @@ async fn default_terminal_title_refreshes_when_spinner_state_changes() {
1165811655 chat. last_terminal_title = Some ( project. clone ( ) ) ;
1165911656 chat. bottom_pane . set_task_running ( true ) ;
1166011657 chat. terminal_title_status_kind = TerminalTitleStatusKind :: Thinking ;
11661- chat. terminal_title_animation_origin = Instant :: now ( ) + Duration :: from_secs ( 1 ) ;
11662-
1166311658 chat. refresh_terminal_title ( ) ;
1166411659
11665- assert_eq ! ( chat. last_terminal_title, Some ( format! ( "⠋ { project}" ) ) ) ;
11660+ assert_eq ! ( chat. last_terminal_title, Some ( project) ) ;
1166611661}
1166711662
1166811663#[ tokio:: test]
11669- async fn terminal_title_spinner_item_renders_when_animations_enabled ( ) {
11664+ async fn terminal_title_spinner_item_renders_nothing ( ) {
1167011665 let ( mut chat, _rx, _op_rx) = make_chatwidget_manual ( None ) . await ;
1167111666 chat. bottom_pane . set_task_running ( true ) ;
1167211667 chat. terminal_title_status_kind = TerminalTitleStatusKind :: Working ;
11673- chat. terminal_title_animation_origin = Instant :: now ( ) ;
1167411668
11675- assert_eq ! (
11676- chat. terminal_title_spinner_text_at( chat. terminal_title_animation_origin) ,
11677- Some ( "⠋" . to_string( ) )
11678- ) ;
11679- assert_eq ! (
11680- chat. terminal_title_spinner_text_at(
11681- chat. terminal_title_animation_origin + TERMINAL_TITLE_SPINNER_INTERVAL ,
11682- ) ,
11683- Some ( "⠙" . to_string( ) )
11684- ) ;
11669+ assert_eq ! ( chat. terminal_title_spinner_text_at( Instant :: now( ) ) , None ) ;
1168511670}
1168611671
1168711672#[ tokio:: test]
11688- async fn terminal_title_uses_spaces_around_spinner_item ( ) {
11673+ async fn terminal_title_omits_spinner_item_spacing_when_spinner_is_disabled ( ) {
1168911674 let ( mut chat, _rx, _op_rx) = make_chatwidget_manual ( None ) . await ;
1169011675 chat. config . animations = true ;
1169111676 chat. config . tui_terminal_title = Some ( vec ! [
@@ -11697,49 +11682,45 @@ async fn terminal_title_uses_spaces_around_spinner_item() {
1169711682 chat. thread_name = Some ( "Investigate flaky test" . to_string ( ) ) ;
1169811683 chat. bottom_pane . set_task_running ( true ) ;
1169911684 chat. terminal_title_status_kind = TerminalTitleStatusKind :: Working ;
11700- chat. terminal_title_animation_origin = Instant :: now ( ) + Duration :: from_secs ( 1 ) ;
1170111685
1170211686 chat. refresh_terminal_title ( ) ;
1170311687
1170411688 let title = chat
1170511689 . last_terminal_title
1170611690 . clone ( )
1170711691 . expect ( "expected terminal title" ) ;
11708- assert ! ( title. contains( " ⠋ Working | " ) ) ;
11709- assert ! ( !title. contains( "| ⠋" ) ) ;
11710- assert ! ( !title. contains( "⠋ |" ) ) ;
11692+ assert ! ( title. contains( " Working | Investigate flaky test" ) ) ;
11693+ assert ! ( !title. contains( "⠋" ) ) ;
1171111694}
1171211695
1171311696#[ tokio:: test]
11714- async fn terminal_title_shows_spinner_and_undoing_without_task_running ( ) {
11697+ async fn terminal_title_shows_undoing_without_spinner_when_task_is_not_running ( ) {
1171511698 let ( mut chat, _rx, _op_rx) = make_chatwidget_manual ( None ) . await ;
1171611699 chat. config . animations = true ;
1171711700 chat. config . tui_terminal_title = Some ( vec ! [ "spinner" . to_string( ) , "status" . to_string( ) ] ) ;
1171811701 chat. terminal_title_status_kind = TerminalTitleStatusKind :: Undoing ;
11719- chat. terminal_title_animation_origin = Instant :: now ( ) + Duration :: from_secs ( 1 ) ;
1172011702
1172111703 assert ! ( !chat. bottom_pane. is_task_running( ) ) ;
1172211704
1172311705 chat. refresh_terminal_title ( ) ;
1172411706
11725- assert_eq ! ( chat. last_terminal_title, Some ( "⠋ Undoing" . to_string( ) ) ) ;
11707+ assert_eq ! ( chat. last_terminal_title, Some ( "Undoing" . to_string( ) ) ) ;
1172611708}
1172711709
1172811710#[ tokio:: test]
11729- async fn terminal_title_reschedules_spinner_when_title_text_is_unchanged ( ) {
11711+ async fn terminal_title_does_not_reschedule_spinner_when_title_text_is_unchanged ( ) {
1173011712 let ( mut chat, _rx, _op_rx) = make_chatwidget_manual ( None ) . await ;
1173111713 let ( frame_requester, mut frame_schedule_rx) = FrameRequester :: test_observable ( ) ;
1173211714 chat. frame_requester = frame_requester;
1173311715 chat. config . animations = true ;
1173411716 chat. config . tui_terminal_title = Some ( vec ! [ "spinner" . to_string( ) ] ) ;
1173511717 chat. bottom_pane . set_task_running ( true ) ;
1173611718 chat. terminal_title_status_kind = TerminalTitleStatusKind :: Working ;
11737- chat. terminal_title_animation_origin = Instant :: now ( ) + Duration :: from_secs ( 1 ) ;
11738- chat. last_terminal_title = Some ( "⠋" . to_string ( ) ) ;
11719+ chat. last_terminal_title = Some ( String :: new ( ) ) ;
1173911720
1174011721 chat. refresh_terminal_title ( ) ;
1174111722
11742- assert ! ( frame_schedule_rx. try_recv( ) . is_ok ( ) ) ;
11723+ assert ! ( frame_schedule_rx. try_recv( ) . is_err ( ) ) ;
1174311724}
1174411725
1174511726#[ tokio:: test]
0 commit comments