DEV Community

Nour Mohamed Amine
Nour Mohamed Amine

Posted on

pi-reviewer Part 2: A Local Review UI That Puts You in Control

In Part 1 I talked about why AI code review falls flat without project context, and how pi-reviewer fixes that by feeding your conventions to the agent before it reads a single line of diff.

This part is about what happens after the review runs.

The problem with "just post a comment"

Most AI review tools finish the job by dumping everything into a GitHub PR comment. You end up with a wall of findings, some useful, some not, and no real way to act on them beyond reading through and manually deciding what to do with each one.

pi-reviewer works differently. After the agent finishes, a browser UI opens where you go through every finding and decide what to do with it before anything gets sent anywhere.

The --ui flag

/review --ui
/review --ssh --ui
Enter fullscreen mode Exit fullscreen mode

Once the review is done, a local server starts and your browser opens automatically. No extra setup, no cloud, nothing to configure. The server shuts down as soon as you take an action or close the tab.

What you are looking at

Sidebar is a GitHub-style file tree on the left. Files are grouped by folder, you can collapse and expand folders, and each one shows a comment count badge that adds up from its children. Click a file and the diff jumps to it with a blue border so you always know where you are. Click anywhere else and it deselects.

Syntax highlighting colorizes the diff by language. TypeScript, Python, Go, Rust, Java and more are all supported, using the same token colors as GitHub. The red and green diff backgrounds stay intact, the syntax colors just sit on top.

Split and unified toggle lets you switch between side-by-side and single-column views whenever you want. It applies to all files at once.

Going through the findings

Every comment needs a decision before you can do anything. You have three options:

  • Accept - include this finding when sending back to the agent
  • Reject - skip it, do not send it
  • 💬 Discuss - accept it and add your own note that gets sent alongside it

The header shows how many you have decided so far. Save, Send, and Save & Send stay greyed out until everything has a decision. No accidental sends.

As you go through them the cards update visually. Accepted ones get a green tint, rejected ones fade. There is a jump button that skips straight to the next undecided comment so you do not have to scroll around.

What you can do at the end

Once every comment has a decision:

  • Save writes the full review and your decisions to pi-review.md, no agent call
  • Send injects the accepted and discussed findings into the agent as a follow-up turn
  • Save & Send does both

Send and Save & Send only activate if you accepted or discussed at least one finding. There is no point starting an agent turn with nothing to say.

SSH mode

Working on a remote machine? Just add --ssh:

/review --ssh --ui
Enter fullscreen mode Exit fullscreen mode

The agent fetches the diff over SSH, runs the review remotely, and sends the result back. The UI opens locally with the full diff and findings. No second SSH trip needed.

Theme

The dark and light toggle remembers your choice across reviews using ~/.pi/pi-reviewer/config.json. Since the local server picks a random port every time, browser storage would reset on every review, so the preference lives server-side instead.

Try it

pi install https://github.com/zeflq/pi-reviewer
Enter fullscreen mode Exit fullscreen mode

Then inside the pi TUI:

/review --ui
Enter fullscreen mode Exit fullscreen mode

Drop an AGENTS.md or CLAUDE.md at your project root to give the agent context about your conventions. Add a REVIEW.md if you want to be specific about what to flag and what to skip.

The full roadmap is in TODO.md.

pi-reviewer is open source at github.com/zeflq/pi-reviewer

Top comments (0)