Skip to content
GitHub (opens in a new tab)
AgentsBlock

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.

import { ChangeReview } from "agentic-ds-kit";

export function ReviewPage({ change, me }) {
  return (
    <main className="layout-content">
      <ChangeReview
        title="Apply the rate limiter to acme/api?"   // the block title is the question
        agent="Backend agent"
        files={change.files}          // { id, path, kind?, lines, hunkHeader?, reviewed?, verdict? }[]
        summary={change.summary}      // ChangeSummary items
        comments={change.comments}    // { id, fileId, line?, author, createdAt, body, parentId? }[]
        currentUserId={me.id}
        onReviewedChange={(fileId, reviewed) => mark(fileId, reviewed)}
        onAccept={(fileId) => accept(fileId)}
        onReject={(fileId) => reject(fileId)}
        onAcceptAll={() => acceptRest(change.id)}
        onComment={(fileId, body, { line, parentId }) => comment(fileId, body, line, parentId)}
      />
    </main>
  );
}

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

NameTypeRequiredDefaultNotes
filesarrayYes—{ id, path, kind?: "added" | "modified" | "deleted", lines (InlineDiff lines), hunkHeader?, additions?, deletions?, reviewed?, verdict?: "pending" | "accepted" | "rejected" }[]. Counts default to the lines.
summaryarrayNo—ChangeSummary items: { id, label, before, after, delta, direction, sentiment? }[].
summaryTitlestringNoWhat this change does—
summaryPeriodstringNo—e.g. "main → agent/rate-limit".
commentsarrayNo—{ id, fileId, line?, author, createdAt, body, edited?, parentId? }[]. A line comment reads "Line 18 · …" in the thread.
currentUserIdstringNo—Your comments get Edit and Delete.
selectedFileIdstringNo—Controlled selected file.
defaultSelectedFileIdstringNo—Uncontrolled starting file; default the first.
onSelectFilefunctionNo—(fileId) => void. From the list, the previous / next buttons or J / K.
onReviewedChangefunctionNo—(fileId, reviewed) => void. The Reviewed checkbox or R.
onAcceptfunctionNo—(fileId) => void. Accept file (outline, pressed when accepted).
onRejectfunctionNo—(fileId) => void. Reject file (outline neutral, pressed when rejected).
onAcceptAllfunctionNo—() => 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.
onCommentfunctionNo—(fileId, body, { line?, parentId? }) => void. Without it the comments area is hidden.
onEditCommentfunctionNo—(commentId, body) => void
onDeleteCommentfunctionNo—(commentId) => void, after CommentThread's AlertDialog.
agentstringNo—Who made the change. Lead line.
titlestringNoChange reviewBlock heading, best as the question, e.g. "Apply the $220.00 credit to INV-1842?".

Built from

  • 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.