Skip to content
Uxelith
Prov1.0.1AI & Agents

Diff Review

Review an AI agent's code changes: accept or reject each one, see exactly which words changed, comment on a line and ask the agent to revise, then apply only what you accepted. Unified or side by side.

Installs with Uxelith ProHow
Licence
Pro
Packages
2
Updated
12 Nov 2026
Live

Installation

Usage

example.tsx
"use client"

import { DiffReview } from "@/components/diff-review"

const before = `export function price(n: number) {
  return n * 1.2
}`
const after = `export function price(n: number, yearly = false) {
  return (yearly ? n * 10 : n) * 1.2
}`

export function ReviewChanges() {
  return (
    <DiffReview
      title="Add yearly pricing"
      author="Atlas"
      files={[{ path: "src/lib/price.ts", old: before, new: after, note: "Yearly plans cost ten months." }]}
      onRevise={(request) => console.log("send to your model", request)}
      onApply={(result) => console.log(result.files[0].content)}
    />
  )
}

Props

PropTypeDefaultDescription
filesDiffFile[]—Each has path, old (leave out for a new file), new ("" for a deleted one), an optional language and a note: the agent's explanation shown above its changes.
title / authorstring— / "Agent"A heading for the change set and who made it.
decisions / defaultDecisionsRecord<string, "accept" | "reject">{}Decisions by change id, kept by you or by the component; onDecisionsChange tells you about each one. Ids come from a change's content, so a revision keeps the decisions on changes it didn't touch.
comments / defaultCommentsDiffComment[][]Comments on lines (path, side, line, author, body, agent); onCommentsChange gets the new list. me is the name on new comments.
onRevise(request) => void—Shows "Ask … to revise" in the comment box, with the path, line and text to send to your model. Mark files as busy while it works.
onApply(result) => void—Called with each file's content holding only the accepted changes, plus what was accepted and rejected.
view / defaultView"unified" | "split""unified"One column or side by side; onViewChange tells you when it changes. Narrow screens stay unified.
contextnumber3Unchanged lines kept around each change; the rest fold away.
labelstring"Review changes"Accessible name.

Accessibility

  • Each change is a labelled group with Accept and Reject as toggle buttons; J and K move between changes, A accepts, R rejects and C opens a comment on the change.
  • Removed and added lines say "removed" and "added" to screen readers, not only in colour.
  • Every decision, comment and request is announced through a polite live region, and the progress bar reports accepted, rejected and left.
  • The comment box is labelled with its line; Escape closes it and Ctrl or Cmd Enter sends it.
  • Under prefers-reduced-motion threads and the applied card appear without moving.

Changelog

  1. v1.0.1Latest

    A rejected change now strikes through its added lines, as intended (the old selector never matched and broke Tailwind's dev CSS).

  2. v1.0.0

    First release.

More in AI & Agents

All 9 in AI & Agents
  • AI & AgentsPro

    Agent Run Monitor

    A live view of AI agents working together: each agent's steps on one timeline, cost against a budget, tokens, every step's input and output, failures, and an approval card when a step needs a person.

  • AI & AgentsPro

    Approval Card

    The moment an AI agent asks before acting: what it wants to do, why, and exactly what will happen. Approve is held for a beat so it's never an accident; Deny is one press. Then it folds into a one-line record.

  • AI & AgentsPro

    Artifact Canvas

    The workspace beside an AI chat: what the model writes opens next to the conversation, streams in line by line, keeps every version and shows what changed down to the word. Preview, read, ask about code, download.