Skip to content
Guides

Code review

Review a change end-to-end with the agent and the review panel.


This guide walks a change from "I think I'm done" to "ready to push" using Mel's built-in code review panel, inline comments, and the agent — all without leaving the terminal.

1. Open the review panel

You have three entry points, all equivalent:

  • Click the ± N zone on the git chip above the prompt ("View changes").
  • Click Code review in the titlebar.
  • Press ctrl+shift+= anywhere.

The panel opens as a right-hand split, so your terminal stays visible on the left. The header shows your branch, the file count, and the total +added −deleted lines. By default you're looking at uncommitted changes; use the searchable diff-base dropdown to compare against any branch instead (for example main, to review the whole branch before a PR).

2. Read the diffs

Each changed file is a collapsible card with its own +N −M counts. Inside, you get a unified diff with red/green rows, line numbers, and syntax highlighting. The collapsible CHANGED FILES (N) index at the top jumps you straight to any file's card.

If your repo has a language server available (rust-analyzer, typescript-language-server, pyright, or clangd), enable it from the footer banner — then hovering an identifier shows its real signature and docs, and ctrl+click jumps to the definition. See Language support.

Per-file controls: opens the file in the built-in editor, and ↩ Discard restores that file (uncommitted mode only). ↩ Discard all in the header restores tracked files — it never bulk-deletes untracked ones.

3. Comment, then send to the agent

Hover any diff line and click the 💬 icon to write an inline comment — "this unwrap can panic on empty input", "extract this into a helper". Each comment leaves a gutter marker, and a footer appears: N comments · Send to Agent.

Clicking Send to Agent serializes your comments — file, line, excerpt, and your note — into the active pane's input, ready to run as one prompt. The agent then addresses each comment and proposes fixes as approvable diff cards. See Diffs & inline comments.

4. Get a deeper first pass from the agent

For a full review rather than spot comments, press ctrl+enter to start a conversation and paste something like:

Review both the uncommitted and committed changes on this branch. Read the
surrounding code before judging any diff. Check for logic bugs, unhandled
edge cases, security issues, and places that break this project's existing
conventions. Summarize findings grouped by severity, each with the file,
the line, and a concrete suggested fix.

The agent reads beyond the diff — it greps, opens related files, and reasons about how the change ripples through the repo — so it catches contract changes and convention drift that line-level linters miss.

5. Verify and close the loop

Every fix the agent applies round-trips an approval card and lands as a ± diff card in the transcript. When it's done, reopen the review panel (ctrl+shift+=): the diff reloads, so you can confirm exactly what changed before you commit. From there, one more prompt ("stage, commit, push, open a PR with the GitHub CLI") finishes the job — see Do things with Mel for that prompt in full.