Review queue
ProGrade real agent answers one at a time, from the keyboard: P pass, F fail, J/K next and previous. The judge's verdict is shown beside the item but never pre-fills the grade, so people grade the answer, not the judge.
Preview
Install
With the Candor CLI
First time? Get started sets up the registry and theme. Or with shadcn directly: npx shadcn@latest add @candor/review-queue
Brings in: agent-avatar, button, locale, ops, utils · npm: lucide-react@^1.67.0
Usage
"use client"
import * as React from "react"
import { ReviewQueue } from "@/components/review-queue"
import type { ReviewItem } from "@/lib/ops"
export default function Example() {
const [items, setItems] = React.useState<ReviewItem[]>([
{ id: "r1", agent: { id: "arch", name: "Architect agent", role: "planner" }, ask: "Can we drop legacy_tier from customers now?", answer: "Yes, it has had no writes in the last 90 days, so it’s safe to drop.", judge: { verdict: "pass", reason: "Answers the question directly." } },
{ id: "r2", agent: { id: "dev", name: "Dev agent", role: "coder" }, ask: "Why did the backfill stop?", answer: "Batch 12 hit a row lock four times, so the run stopped itself. The rows updated before it keep their region.", judge: { verdict: "pass", reason: "Explains the stop and its effect." } },
{ id: "r3", agent: { id: "qa", name: "QA agent", role: "tester" }, ask: "Is the new_checkout flag on in Staging?", answer: "It’s on for 50% of Staging traffic, per flags/new_checkout.yaml." },
])
return <ReviewQueue className="max-w-xl" items={items} onGrade={(id, grade, note) => setItems((xs) => xs.map((x) => (x.id === id ? { ...x, grade, note } : x)))} />
}<ReviewQueue>
| Prop | Type | Default | Description |
|---|---|---|---|
| itemsrequired | ReviewItem[] | — | Answers to grade; it opens on the first one without a grade. |
| onGraderequired | (id: string, grade: "pass" | "fail", note?: string) => void | — | Called with the item's id, the grade, and the reviewer's note if they wrote one. |
| className | string | undefined | — | Extra classes for the outer element. |
Strings
The fixed words, in English by default. Change any of them under reviewQueue in <LocaleProvider strings={{ … }}>; the table is exported as reviewQueueStrings.
| Key | English |
|---|---|
| reviewQueue | Review queue |
| review | Review |
| progress | {position} of {total} · {done} graded |
| youPass | You: pass |
| youFail | You: fail |
| asked | Asked |
| answered | Answered |
| judgeSaid | Judge said {verdict}: {reason} |
| verdictPass | pass |
| verdictFail | fail |
| notePlaceholder | Note (optional): why |
| note | Note |
| hintPass | pass |
| hintFail | fail |
| hintNav | next/previous |
| fail | Fail |
| pass | Pass |