codex - 💡(How to fix) Fix CLI: make /diff an interactive TUI explorer [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#18149Fetched 2026-04-17 08:32:05
View on GitHub
Comments
1
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×3commented ×1unlabeled ×1

Root Cause

What feature would you like to see?

/diff in the TUI currently renders a static git diff-style pager. That works for very small patches, but it becomes hard to review real multi-file changes because there is no file list, no fast file-to-file switching, and no dedicated preview pane.

Fix Action

Fix / Workaround

What feature would you like to see?

/diff in the TUI currently renders a static git diff-style pager. That works for very small patches, but it becomes hard to review real multi-file changes because there is no file list, no fast file-to-file switching, and no dedicated preview pane.

RAW_BUFFERClick to expand / collapse

What variant of Codex are you using?

CLI

What feature would you like to see?

/diff in the TUI currently renders a static git diff-style pager. That works for very small patches, but it becomes hard to review real multi-file changes because there is no file list, no fast file-to-file switching, and no dedicated preview pane.

I would like /diff to open an interactive TUI diff explorer instead of a raw pager.

A good baseline experience would be:

  • a left pane with the changed file list
  • per-file +/- counts in that list
  • a right pane showing the selected file's diff preview
  • keyboard navigation between the file list and the preview pane
  • support for modified, renamed, and untracked files
  • responsive scrolling for large diffs

This would keep review inside Codex CLI instead of forcing users to switch to VS Code, GitLens, or another terminal UI just to inspect changes comfortably.

Additional information

This request is specifically about the CLI/TUI /diff command, not the App or IDE extension diff UIs.

I also built a working prototype locally on a fork. Since external PRs are not currently accepted, I am opening this as an issue instead.

Prototype branch and compare link:

The prototype does the following:

  • parses git diff output into structured per-file changes
  • opens /diff in a two-pane explorer with file switching and preview scrolling
  • includes rename and untracked-file handling
  • caches preview rendering to avoid lag on large diffs
  • keeps the new UI isolated in a dedicated diff_explorer module

Validation run locally:

  • cargo fmt -p codex-tui
  • CODEX_SKIP_VENDORED_BWRAP=1 cargo test -p codex-tui diff_explorer_overlay -- --nocapture
  • CODEX_SKIP_VENDORED_BWRAP=1 cargo test -p codex-tui parse_tracked_git_diff_splits_modified_and_renamed_files -- --nocapture

extent analysis

TL;DR

The proposed fix involves replacing the static git diff-style pager in the Codex TUI /diff command with an interactive TUI diff explorer, as demonstrated in the provided prototype.

Guidance

  • Review the prototype branch Lloyd-Pottiger:tui-diff-explorer and compare link to understand the proposed changes and their implementation.
  • Verify the functionality of the prototype by running the provided validation commands, such as cargo fmt -p codex-tui and cargo test -p codex-tui diff_explorer_overlay -- --nocapture.
  • Consider integrating the diff_explorer module into the main Codex TUI codebase, ensuring proper isolation and caching of preview rendering to avoid performance issues.
  • Test the interactive TUI diff explorer with various scenarios, including modified, renamed, and untracked files, to ensure it meets the required functionality and user experience.

Example

No code snippet is provided as the issue already includes a working prototype and specific commit references.

Notes

The proposed solution is specific to the Codex CLI/TUI /diff command and does not affect the App or IDE extension diff UIs. The prototype has been validated locally, but further testing and review may be necessary before integrating it into the main codebase.

Recommendation

Apply the workaround by integrating the diff_explorer module from the prototype branch into the main Codex TUI codebase, as it provides the desired interactive TUI diff explorer functionality and has been locally validated.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING