Skip to content

fix(tui): hide empty reasoning summaries#31652

Merged
fcoury-oai merged 5 commits into
mainfrom
codex/fix-empty-reasoning-summaries
Jul 9, 2026
Merged

fix(tui): hide empty reasoning summaries#31652
fcoury-oai merged 5 commits into
mainfrom
codex/fix-empty-reasoning-summaries

Conversation

@fcoury-oai

Copy link
Copy Markdown
Contributor

Why

Reasoning summaries can contain an empty HTML comment placeholder, <!-- -->, when a generated summary part has no prose. The TUI treated that placeholder as visible summary content, so it leaked into both the completed conversation history and persisted transcript. Multi-part empty summaries could also leave later generated status headings visible as orphaned transcript content.

What

  • Strip the empty reasoning-summary placeholder at the shared ReasoningSummaryCell boundary.
  • Suppress the cell when removing placeholders leaves only generated bold status headings.
  • Cover the multi-part placeholder-only shape with a rendering regression test for both normal history and transcript output.

How to Test

  1. Start Codex TUI with reasoning summaries visible, for example with hide_agent_reasoning = false and model_reasoning_summary = "detailed".
  2. Run a turn that receives an empty generated reasoning-summary part.
  3. Confirm that the in-progress status heading may appear while the turn is running, but the completed history and transcript contain neither literal <!-- --> tokens nor orphaned reasoning headings.
  4. Confirm that a reasoning summary with actual prose still renders normally.

The model output is nondeterministic, so the targeted regression covers the exact multi-part placeholder shape from the report:

  • just test -p codex-tui reasoning_summary_block_hides_empty_html_comment_parts

Comment thread codex-rs/tui/src/history_cell/messages.rs Outdated
@fcoury-oai fcoury-oai force-pushed the codex/fix-empty-reasoning-summaries branch from a21d9f7 to 007830e Compare July 8, 2026 22:57
@fcoury-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3019d11d55

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/tui/src/history_cell/messages.rs Outdated
Comment thread codex-rs/tui/src/history_cell/messages.rs Outdated
Comment thread codex-rs/tui/src/history_cell/messages.rs Outdated
@fcoury-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7879a4370f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/tui/src/chatwidget/streaming.rs
Comment thread codex-rs/tui/src/history_cell/messages.rs Outdated
@fcoury-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 1d82efac5e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fcoury-oai fcoury-oai closed this Jul 9, 2026
@pakrym-oai pakrym-oai reopened this Jul 9, 2026
@fcoury-oai fcoury-oai enabled auto-merge (squash) July 9, 2026 16:26
@fcoury-oai fcoury-oai merged commit f46b53b into main Jul 9, 2026
98 of 101 checks passed
@fcoury-oai fcoury-oai deleted the codex/fix-empty-reasoning-summaries branch July 9, 2026 16:27
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants