Code Review
When an agent finishes a card, you don't have to trust the result blind. Koda's built-in review opens the full diff of everything that agent changed, lets you leave line-anchored comments, and gives you a verdict — Approve or Request changes — plus a way to send fixes straight back to the same agent session. It's the loop that turns "the agent wrote something" into "the agent shipped something you reviewed."
Overview
Every card on the Kanban board carries a ⊙ Review button. Click it and Koda opens a full-window review surface — it portals over the whole app, so the diff isn't squeezed into the side panel. Three columns:
- Changed files — every file that differs from the baseline, with an add / modify / delete status marker and a count of comments on each.
- The diff — a side-by-side Monaco diff of the selected file: the baseline on the left, your current working tree on the right.
- Comments & actions — your line-anchored comments, a composer, a "direct changes" box, and the Approve / Request-changes verdict.
Cards remember their last verdict: the ⊙ button turns into ✓ for an approved card and ↺ for one where you requested changes, so the board tells you review state at a glance.
The review baseline
A diff is only meaningful against the right starting point. Koda captures that point automatically: on a card's first Run, before the agent edits anything, it pins a snapshot of the working tree as a git ref under refs/koda/base/<cardId>. Review then diffs your current working tree against that snapshot.
- You see the agent's whole contribution — every change since it started, not just what's left uncommitted at this instant.
- The baseline is sticky across the loop. Request changes, let the agent fix things, and re-review — the diff stays cumulative against the original snapshot, so nothing the agent did slips by unreviewed.
HEAD and labels the baseline as "HEAD (no run captured)" so you know what you're comparing against.Reviewing the diff
Pick a file from the left list to load it into the diff view. Koda reads the baseline side from the pinned snapshot and the modified side from disk, so the diff is always your live working tree.
- Deleted files show the baseline content on the left and an empty right side; added files the reverse — the natural diff in each case.
- Very large files are not force-fed to the editor. When a blob exceeds the inline cap, Koda shows a placeholder instead of stalling the diff.
- Nothing changed? If the working tree matches the baseline, the list says so — and you can still approve the card.
Line comments
Click a line in the diff to anchor the composer to it, type your note, and add it. Each comment records the file, the line, and the text of that line at comment time.
- Jump back — every comment links to its location; clicking it re-opens that file and scrolls the diff to the line.
- Drift detection — because Koda stored the line's text when you commented, it can tell when that line later changes. If the agent edits around your comment, it's flagged "moved?" so a stale comment never silently points at the wrong code.
- Delete — remove a comment with the ✕ on it.
Comments save as you go, so you can close the overlay and pick the review back up later.
Verdicts
Two buttons close the loop, and each one also moves the card for you:
| Verdict | What it means | Card moves to |
|---|---|---|
| ✓ Approve | The work is good. You're done with this card. | Done |
| ↺ Request changes | Something needs fixing before it ships. | In Progress |
The verdict is stored on the card (for the board badge) and in the full review file alongside your comments.
Direct changes — resume the session
Reviewing usually surfaces small fixes. Instead of switching to the agent's pane and re-explaining context, the review surface has a Direct changes box: type an instruction and Koda sends it straight back to the same agent session that built the card — the conversation continues with all its context intact.
The request-changes loop
Put together, review is a tight cycle you can run entirely from one window:
- Agent finishes a card → it lands in Review.
- You open ⊙ Review, read the cumulative diff, and leave line comments.
- Either Approve (→ Done) or send a Direct change and Request changes (→ In Progress).
- The agent applies the fix; the card returns to Review with the baseline unchanged, so the diff still shows everything from the start.
- Re-review and approve.
Where reviews are stored
The full review — verdict and every comment — is written to <workspace>/.koda/reviews/<cardId>.json, inside the gitignored .koda/ directory. The card itself only keeps a denormalized copy of the last verdict for its badge; the comments live in that file. Because it's plain JSON on your machine, a review survives restarts and never leaves your device.