Skip to content

Code Review (git diff)

The Code Review surface displays an agent session’s git changes. Press g on a session to open it, or run ainb diff-review [path] to review any repository directly without a session.

It provides a hierarchical file sidebar, collapsible per-file diff blocks in a continuous scroll, Dracula syntax highlighting, word-level intra-line emphasis (changed substrings highlighted within row tints), line-number change bars, expandable context, and hunk navigation.

ainb Code Review surface: file sidebar, per-file diff blocks, syntax highlighting, green/red row tints, word-level emphasis, and a line-number gutter

Keyboard controls

KeyAction
gOpen Code Review for selected session
↑ / ↓Move selection across file tree (auto-scrolls diff body to file)
j / kScroll diff body
n / NJump to next / previous hunk (with Hunk x/y counter)
Space / EnterToggle folder, or collapse/expand file diff block
e / EExpand / collapse all folders
zReveal more context lines at nearest gap
[ / ]Jump to previous / next file
TabCycle Review → Commits → Markdown
Esc / qReturn to previous view
MouseScroll diff wheel; click tree rows to select files or toggle folders

Word-level emphasis

When a line changes, the whole row receives a muted green (added) or red (removed) tint, and the exact substring that changed receives a brighter highlight.

Word-level intra-line emphasis and expand-context

Collapsible context blocks

Each file diff block can be collapsed to its header (Space or Enter). Hidden context lines can be revealed with z.

Collapsing a file diff block to its header and back

Hunk navigation

Press n and N to jump between hunks across all modified files. The header displays a live Hunk x/y position indicator.

Jumping between hunks with n and N

Standalone ainb diff-review

Run the Code Review surface directly from your shell:

Terminal window
ainb diff-review # review uncommitted changes in current directory
ainb diff-review ./path # review another directory or worktree

Next steps