Skip to content

Fix duplicate /review messages in app-server TUI#15839

Merged
etraut-openai merged 2 commits intomainfrom
etraut/fix-duplicate-review-messages
Mar 26, 2026
Merged

Fix duplicate /review messages in app-server TUI#15839
etraut-openai merged 2 commits intomainfrom
etraut/fix-duplicate-review-messages

Conversation

@etraut-openai
Copy link
Collaborator

@etraut-openai etraut-openai commented Mar 26, 2026

Symptoms

When /review ran through tui_app_server, the TUI could show duplicate review content:

  • the >> Code review started: ... << banner appeared twice
  • the final review body could also appear twice

Problem

tui_app_server was treating review lifecycle items as renderable content on more than one delivery path.

Specifically:

  • EnteredReviewMode was rendered both when the item started and again when it completed
  • ExitedReviewMode rendered the review text itself, even though the same review text was also delivered later as the assistant message item

That meant the same logical review event was committed into history multiple times.

Solution

Make review lifecycle items control state transitions only once, and keep the final review body sourced from the assistant message item:

  • render the review-start banner from the live ItemStarted path, while still allowing replay to restore it once
  • treat ExitedReviewMode as a mode-exit/finish-banner event instead of rendering the review body from it
  • preserve the existing assistant-message rendering path as the single source of final review text

@etraut-openai
Copy link
Collaborator Author

@codex review

Copy link
Contributor

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

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: 6cf65fbfe0

ℹ️ 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".

@etraut-openai etraut-openai merged commit 0d44bd7 into main Mar 26, 2026
56 of 62 checks passed
@etraut-openai etraut-openai deleted the etraut/fix-duplicate-review-messages branch March 26, 2026 16:55
@github-actions github-actions bot locked and limited conversation to collaborators Mar 26, 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.

1 participant