Change review
Review an agent's change file by file, then accept or reject each file, or the rest at once.
What a block is
A block is a kit component for a whole area of a screen, built only from other kit components and tokens. You import it like any component; nothing is copied into your app. Put it inside your page’s <main>: it brings no header or nav of its own.
When to use
- an agent finished a change and a person reviews it before it lands
- accept some files and reject others
- leave comments on a file or a line for the agent or a teammate
When not to use
- one proposed edit in a chat — InlineDiff
- approve a plan before anything changes — PlanReview
- one command or edit that needs an OK — ApprovalCard
- what happened during the run — RunDetail
Usage
What the change does leads; the changed files with their +/− counts sit beside the selected file's diff and its comments. Mark files reviewed, accept or reject each one, or accept the rest in one go. J and K move between files, R marks one reviewed, and ⌘/Ctrl+Enter accepts the rest.
Layout
- header, ChangeSummary full width, then the file list beside the selected file in layout-split--secondary, then a footer with the keys line and Accept all
- the block is its own inline-size container; below --grid-breakpoint-md (64rem) of block width the list sits over the file
Props
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| files | array | Yes | — | { id, path, kind?: "added" | "modified" | "deleted", lines (InlineDiff lines), hunkHeader?, additions?, deletions?, reviewed?, verdict?: "pending" | "accepted" | "rejected" }[]. Counts default to the lines. |
| summary | array | No | — | ChangeSummary items: { id, label, before, after, delta, direction, sentiment? }[]. |
| summaryTitle | string | No | What this change does | — |
| summaryPeriod | string | No | — | e.g. "main → agent/rate-limit". |
| comments | array | No | — | { id, fileId, line?, author, createdAt, body, edited?, parentId? }[]. A line comment reads "Line 18 · …" in the thread. |
| currentUserId | string | No | — | Your comments get Edit and Delete. |
| selectedFileId | string | No | — | Controlled selected file. |
| defaultSelectedFileId | string | No | — | Uncontrolled starting file; default the first. |
| onSelectFile | function | No | — | (fileId) => void. From the list, the previous / next buttons or J / K. |
| onReviewedChange | function | No | — | (fileId, reviewed) => void. The Reviewed checkbox or R. |
| onAccept | function | No | — | (fileId) => void. Accept file (outline, pressed when accepted). |
| onReject | function | No | — | (fileId) => void. Reject file (outline neutral, pressed when rejected). |
| onAcceptAll | function | No | — | () => void. Accept all N files: every file without a verdict. The one solid primary, in the footer; ⌘/Ctrl+Enter outside text fields. Disabled when none are left. |
| onComment | function | No | — | (fileId, body, { line?, parentId? }) => void. Without it the comments area is hidden. |
| onEditComment | function | No | — | (commentId, body) => void |
| onDeleteComment | function | No | — | (commentId) => void, after CommentThread's AlertDialog. |
| agent | string | No | — | Who made the change. Lead line. |
| title | string | No | Change review | Block heading, best as the question, e.g. "Apply the $220.00 credit to INV-1842?". |
Built from
Related
- Component
InlineDiff
Proposed text or code edits you accept or reject in place: unified, split or inline phrase diff, always with + / − marks and counts ("+2 −2", read as "2 added, 2 removed"), then one line.
- Block
Plan review
The go / no-go before an agent runs: edit its steps, see what will change, then approve, send back or reject.
- Component
ApprovalCard
The agent asks before it acts: risk, what will happen in words, an exact preview of the command or diff, and Approve (⌘/Ctrl+Enter) / Deny (Escape) with an optional auto-deny countdown.
- Block
Run detail
One agent run on one screen: clock, cost, pending approval and every step, all following the step you pick.