diff --git a/codex-rs/tui/src/history_cell/messages.rs b/codex-rs/tui/src/history_cell/messages.rs index f8fe26e7ad..6f9ea937bc 100644 --- a/codex-rs/tui/src/history_cell/messages.rs +++ b/codex-rs/tui/src/history_cell/messages.rs @@ -553,7 +553,11 @@ pub(crate) fn new_reasoning_summary_block( cwd: &Path, ) -> Box { let (header, content) = split_reasoning_summary_parts(&reasoning_parts); - let transcript_only = header.is_empty(); + let title_only = content + .strip_prefix("**") + .and_then(|content| content.strip_suffix("**")) + .is_some_and(|content| !content.is_empty() && !content.contains("**")); + let transcript_only = header.is_empty() && !title_only; Box::new(ReasoningSummaryCell::new( header, content, diff --git a/codex-rs/tui/src/history_cell/tests.rs b/codex-rs/tui/src/history_cell/tests.rs index 2402a6a595..9010894d69 100644 --- a/codex-rs/tui/src/history_cell/tests.rs +++ b/codex-rs/tui/src/history_cell/tests.rs @@ -2496,6 +2496,26 @@ fn reasoning_summary_block_falls_back_when_summary_is_missing() { assert_eq!(rendered, vec!["• High level reasoning without closing"]); } +#[test] +fn reasoning_summary_block_displays_title_only_summary() { + let cell = new_reasoning_summary_block( + vec!["**Confirming backend JSONL source**".to_string()], + &test_cwd(), + ); + + let rendered_display = render_lines(&cell.display_lines(/*width*/ 80)); + insta::assert_snapshot!( + rendered_display.join("\n"), + @"• Confirming backend JSONL source" + ); + + let rendered_transcript = render_transcript(cell.as_ref()); + assert_eq!( + rendered_transcript, + vec!["• Confirming backend JSONL source"] + ); +} + #[test] fn reasoning_summary_block_splits_header_and_summary_when_present() { let cell = new_reasoning_summary_block(