Skip to content

Render code comment directives in TUI replay#26554

Merged
etraut-openai merged 2 commits into
mainfrom
etraut/fix-code-comment-cli-fallback
Jun 5, 2026
Merged

Render code comment directives in TUI replay#26554
etraut-openai merged 2 commits into
mainfrom
etraut/fix-code-comment-cli-fallback

Conversation

@etraut-openai

@etraut-openai etraut-openai commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Resumed Codex App or VS Code review sessions can contain ::code-comment directives that the TUI previously displayed verbatim because only rich clients interpret them.

This change rewrites valid line-start directives into readable Markdown during assistant-message parsing, using the session working directory for relative file paths. The fallback is applied consistently to live messages, replayed transcripts, and resume previews while preserving malformed directives and existing ::git-* parsing.

Before

The TUI exposed the raw client directive:

::code-comment{title="Fix body= parsing" body="Keep role=\"tab\", ::git-stage{cwd=/tmp}, file=, and \n literal." file="/repo/src/app.ts" start=10 end=12 priority="P2"}

After

The same directive is rendered as readable review feedback:

- [P2] Fix body= parsing — src/app.ts:10-12
  Keep role="tab", ::git-stage{cwd=/tmp}, file=, and \n literal.

Fixes #25658

@etraut-openai etraut-openai marked this pull request as ready for review June 5, 2026 07:05

@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: ac1b6e8188

ℹ️ 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/git_action_directives.rs Outdated
Comment thread codex-rs/tui/src/git_action_directives.rs Outdated
Comment thread codex-rs/tui/src/git_action_directives.rs
@etraut-openai etraut-openai changed the title [codex] Render code comment directives in TUI replay Render code comment directives in TUI replay Jun 5, 2026

@fcoury-oai fcoury-oai 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.

I was able to find a session locally that had the directive and confirmed the change between stable codex and this branch. Worked as expected.

Code looks good as well, approved 👍

@etraut-openai etraut-openai merged commit e5af672 into main Jun 5, 2026
31 checks passed
@etraut-openai etraut-openai deleted the etraut/fix-code-comment-cli-fallback branch June 5, 2026 15:34
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 5, 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.

CLI resume shows raw ::code-comment review directives instead of readable fallback

2 participants