Skip to content
Terminal > Code

Code review panel

A side-by-side diff of your uncommitted or branch changes, file by file.


The code review panel shows you a clean, syntax-highlighted diff of your working tree without leaving the terminal. It renders as a right-hand split — the terminal stays live on the left — so you can review while builds and tests keep running.

Opening the panel

  • Press ctrl+shift+= (cmd on macOS).
  • Click the ± N zone of the git chip above the prompt (its tooltip reads "View changes").
  • Click ± Review changes under an agent turn that edited files.
  • Or run Open Code Review from the command palette.

The panel needs a git repository. If the active pane's directory is not inside one — which is what happens when Mel is started from a desktop launcher, since that puts every pane in your home directory — Mel tells you so and names the directory, rather than doing nothing. cd into your project and try again.

Mel resolves the repo root from the active pane's working directory (git rev-parse --show-toplevel) and loads the diff on a background thread, so opening never blocks the UI.

Choosing what to diff

The header includes a searchable diff-base dropdown with two modes:

  • Uncommitted changes (the default) — git diff HEAD, plus your untracked files rendered as all-added cards. Binary or oversized untracked files (over 150 KB) are skipped.
  • A branch base — pick any branch (the current one is excluded) to see git diff base...HEAD, i.e. everything on your branch since it diverged.

The header also shows the branch name, the file count, and the total +A -D across all files.

File cards

Each changed file is a collapsible card:

  • Click the header to collapse or expand it.
  • Per-file +N -M counts sit in the header.
  • The body is an over/under unified diff: a single line-number gutter (old numbers for deletions), red and green row backgrounds with tinted gutters, separators between hunks, and full syntax highlighting.
  • ↩ Discard (uncommitted mode only) runs git restore -- <path> for tracked files; for an untracked file it deletes that file.
  • opens the file in the built-in editor.

A collapsible CHANGED FILES (N) index at the top lists every file with its +A -M counts — click a row to jump straight to that card. Hovering a diff line also reveals a 💬 button for inline comments you can send to the agent.

Discard all

↩ Discard all in the header runs git restore . — it reverts tracked changes only and never bulk-deletes untracked files. Per-file discard is available on each card if you want to be surgical.

Maximize, resize, close

  • toggles the panel between the right split and full-window.
  • Drag the divider between the terminal and the panel to resize it (roughly 25–85% of the window).
  • closes the panel. If there are no changes you'll see an empty state with a reload action.

Limits

To stay fast on large diffs, the panel caps at 40 files and 400 lines per file. Files with no textual hunks (binaries, mode-only changes) are dropped. For anything beyond the caps, git diff in the terminal is one keystroke away.