Make /diff an interactive TUI explorer

Resolved 💬 5 comments Opened Apr 16, 2026 by Lloyd-Pottiger Closed May 31, 2026

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

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗