Diff Viewer
Split and unified diff views with hunk and file navigation, live refresh, focus mode, and conflict marker highlighting.
The diff viewer shows a file's uncommitted changes. Click a file in the Changes panel and it opens in the Diff pane of the right panel, so you can review an agent's edits without leaving the panel. Open in a tab moves it to a full diff tab in the main area.
The Diff Pane
A one-row header sits above the diff:
- The file path — the folder is dimmed and truncates from the left (
…/chat/ChatChannel.tsx), so the file name always stays visible; hover for the full path - The file's
+adds −dels(a zero count is hidden) - Previous change / Next change (
▲/▼) - Previous file / Next file (
◀/▶) around ann/mposition
The pane bar above it carries Split view / Unified view, Soft wrap (unified view only — on by default, so long lines wrap instead of scrolling sideways), and Open in a tab.
Esc returns to the Changes list with the file you came from focused, so you can review with the keyboard alone: Enter on a file, read, Esc, ↓, Enter.
Keyboard
With the diff focused:
| Key | Action |
|---|---|
j or ] | Next change |
k or [ | Previous change |
Shift+J | Next file |
Shift+K | Previous file |
Esc | Back to Changes (Diff pane only) |
Caps Lock doesn't change what the keys do. The same j / k / ] / [ / Shift+J / Shift+K keys work in a full diff tab.
Live refresh
An open diff re-reads the file every few seconds, so it keeps up while an agent is still editing — even when an edit leaves the +/- counts unchanged. Your scroll position is kept, and a brief Updated note marks each refresh. When you switch files, the previous diff stays on screen under a thin progress bar until the next one loads.
If a read fails, the pane says "Couldn't read the diff — …" with Retry, rather than claiming the file has no changes. The error clears when you move to another file.
View Modes
- Unified view — Traditional single-column diff with
+/-prefixes and line numbers on both sides - Split view — Side-by-side comparison with synchronized scrolling. Deletions on the left, additions on the right.
New diffs open in the layout set under Settings → Git → Diffs → Diff layout. Switching layout in a diff also makes it the remembered default — the same setting the pull request Code tab uses.
The Diff Tab
A full diff tab in the main area has its own toolbar: the file path with an Edit file button, Split view / Unified view, previous / next change, previous / next file with an X/Y position (e.g., 3/7), Focus mode, and Close diff. It persists while you switch between files.
Focus Mode
Toggle focus mode to review one section at a time. When enabled, section buttons appear — Staged, Unstaged, All — and file navigation steps only through the files in the selected section.
Hunk Navigation
Previous / next change jump between change hunks (the @@ markers in a diff), with smooth scrolling between them.
Conflict Marker Highlighting
When viewing files with merge conflicts, the diff viewer highlights conflict markers with distinct styling:
| Marker | Style | Label |
|---|---|---|
<<<<<<< HEAD | Blue background + left border | OURS |
======= | Gray background + left border | — |
>>>>>>> branch | Purple background + left border | THEIRS |
This works in both unified and split views.