Skip to content
Sign in
CodePull request reviewMenu

Pull request reviewPro

The full review of a pull request: summary and risk, every comment by file with its severity, the lines it points at and a red and green suggestion, and Fix all to apply them in one commit.

ProA review streams in file by file: summary, risk, comments by severity with red and green suggestions. Apply one, resolve or dismiss, or Fix all in one commit.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/pr-review

Usage

tsx
import { PrReview } from "@/components/ui/chatcn/pro/pr-review"

<PrReview title={pr.title} number={pr.number} comments={comments} onApply={apply} onFixAll={fixAll} fix={fix} />

The free PullRequestCard sums a pull request up in a chat; this is the surface you review it on. Comments sort most severe first inside each file. While phase is reviewing, comments stream in and a status line names the file being read; Fix all waits until the review is done.

Examples

States

ProFiltered to warnings with a failed Fix all, no issues found, a review that stopped with the fix and loading.

Props

PropTypeNotes
title, number, repo, branch, baseBranch, author, statsThe header
summary, highlights, riskReactNode, ReactNode[], { level, reason }What changed and how risky it is
commentsReviewComment[]severity (critical, warning, suggestion, nit), path, line, title, body, code, suggestion, status
phase, progress"reviewing" | "done" | "failed"Streaming review and files read
error, onRetryWhy the review stopped
filter, defaultFilter, onFilterChangeReviewSeverity | "all"
onApply, onResolve, onDismiss(id) => voidPer comment
onFixAll, fix(ids) => void, { phase, done, total, commit, error }Fix all open comments that have a suggestion
onFileSelect(path, line) => voidMakes the line reference a link
loadingboolean

Keyboard

KeyAction
J KNext and previous comment
TabApply suggestion, Resolve, Dismiss

Accessibility

  • Each comment is an article named by its title. Severity is a word with its own glyph; the hue only backs it up.
  • Suggestions read Removed and Added line by line. Failures are alerts with the fix.

Motion

Only the reviewing label shimmers. Applied comments fold to their title; that change is not animated, so the list never slides under the pointer.