Review queue
Check what an agent read from a document before it posts.
What a screen is
A screen is a whole page exported from the kit, built only from kit components and tokens. Import it once, pass your data and callbacks, and render it as the page: it brings its own nav and <main>, and its loading and empty states are built in. A pattern is the copy-in version you own and change; a block is one area that sits inside your <main>.
When to use
- a person reviews what an agent extracted from invoices, receipts or forms before it is posted
- a queue with deadlines, where some items need a fix before they can go
- you want the whole page done, with loading and empty states, and only need to pass data and callbacks
When not to use
- one agent's plan before it runs — PlanReview
- file-by-file code changes — ChangeReview
- one approval inside another page — ApprovalCard
- only the page with highlights inside your own layout — DocumentPreview
Usage
Check what an agent read from a document before it posts: the queue with priority and time left, the page with every extracted value highlighted, and the open item's fields with their confidence, the issue and its suggested fix, and Approve & post. Import it once, pass the items, the team and your callbacks; the shortcuts, the people picker, loading skeletons and the empty state come with it.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
items | array | — | { id, title, workflow, reason, priority: "high" | "medium" | "low", timeLeft, due: "overdue" | "soon" | "ok", assignedToMe?, runId, receivedAt, document: { fileName, pageCount?, src?, alt?, page?: ReactNode }, fields: { id, label, value, confidence, region?: { x, y, w, h, page? } }[], issue?: { title, body?, fieldId?, fix?: { label, fieldId, value }, link?: { label, href } }, context?: { id, kind: "history" | "ai", text }[] }[] Waiting items, most urgent first. due overdue or soon (under an hour) counts as Urgent and makes the time-left Badge danger; assignedToMe counts in Mine. confidence is 0 to 100: every field's hint names it in words ("96% confidence"); under 70 is Low confidence (a warning Badge with an icon and the word, a longer hint, a dashed highlight) until the field is edited. region is in percent of the page. document.src is an image of the page; without it, document.page is the page drawn as React in percent (the sample items pass a printed invoice), and with neither the screen draws each value at its region. In the document the field with the open issue is the warning (issue tone), other unedited low-confidence fields a softer warning tint, the rest neutral, and the active field gets the strong outline. An issue blocks Approve & post until its fix is applied or its field is edited. Approved and rejected items leave the queue on screen and the next one opens. Sample items when omitted. |
selectedId | string | — | Controlled open item. Uncontrolled (the first item of the filter) when left out. |
onSelect | function | — | (id) => void. A queue row was opened, J / K moved to it, or the next item opened after a decision. |
onApprove | function | — | (id, { comment }) => void. Approve & post (the page's one solid primary), or A. Named "Approve & post <title>". Disabled while an issue is open, with "Resolve 1 issue to approve" beside it. |
onReject | function | — | (id, { comment }) => void. Reject (outline danger), or R, after a kit AlertDialog. |
onReassign | function | — | (id, personId) => void. personId is "auto" for Auto-assign. Reassign opens a kit Popover with a Command: Auto-assign, then the team with Avatar presence, open count and availability. |
onApproveBulk | function | — | (ids) => void. Approve N high-confidence (outline neutral in the header) after a kit AlertDialog that lists them. High-confidence: no issue and every field at 90 or more. |
onFieldChange | function | — | (itemId, fieldId, value) => void. A field edit, or the issue's suggested fix. |
people | array | — | { id, name, src?, initials?, open: number, availability: "online" | "away" | "offline" }[] Reassign's team. Sample team when omitted. |
medianHandleTime | string | — | In the summary line after pending and urgent, like "1m 42s". Left out of the line when omitted (the sample line has it). |
workspace | object | — | { name: string, icon?: KitIcon } App nav brand (and the Drawer title below --grid-breakpoint-md). Same shape as SettingsPreferencesScreen. Example workspace when omitted. |
user | object | — | { name: string, email?: string, src?: string } Account menu at the foot of the app nav (kit DropdownMenu: the avatar on the rail, the account card in the Drawer, both with src as the photo and an online presence mark; the menu holds View profile, Account settings, Documentation, Switch account with a sample second account, Add account and Sign out, all samples that only close the menu except Account settings, which goes to a Settings row when the screen has one). Same shape as SettingsPreferencesScreen. Example person when omitted. |
onNavigate | function | — | (destination) => void. destination is "overview" | "agents" | "runs" | "review" | "workflows" | "tools" (app nav rows). |
loading | boolean | false | Nav and PageHeader title stay; Skeletons in all three columns (one Loading review queue label); main is aria-busy. No bulk approve. |
empty | boolean | false | Kit Empty (no-data) "Queue is clear" in place of the three columns. Also shown when items is [] or every item is done. |
className | string | — | On the root layout-shell. |
States
- page: default, loading, empty, blocked
- item: ready (Approve & post on), blocked (an issue Alert with a fix; Approve & post off with the reason beside it), resolved (a success Alert says what changed)
- field: confident (70 and up: the hint says "96% confidence"), low (under 70: a warning Low confidence Badge on the label line, the hint says "61% · Low confidence. Check this against the document.", a dashed highlight), edited (Field shows Edited), active (linked to its highlight)
- layout: three columns (wide), queue and item, document as a Fields / Document toggle (below --grid-breakpoint-lg), one column, queue then item with a Queue back button (below --grid-breakpoint-sm)
Accessibility
- Renders its own <main> named Review queue; the app SideNav is an aside named App. Don't wrap the screen in another main
- PageHeader title is the page h1; the queue, document and item are sections with h2s
- The queue is a kit ListView listbox: Up / Down / Home / End move, Enter or Space opens the row; the priority word and the time left are in each row's name
- J / K open the next and previous item, A approves, R rejects, while focus is in the screen and not in a text field or a dialog; the buttons carry aria-keyshortcuts. Shortcuts opens a kit Modal listing them with Kbd. On touch screens ((hover: none) and (pointer: coarse)) and below --grid-breakpoint-sm the Shortcuts button is hidden; the keys still work with a keyboard
- Every field names its confidence in text ("61% · Low confidence"), never colour alone; low ones also get a hint
- Each highlight is a button named "Show <field> in fields, <confidence>"; it moves focus to the field. Focusing a field marks its highlight active (aria-pressed)
- Approve & post and Reject are named by what they act on ("Approve & post Globex · INV-7731"); when blocked, Approve is disabled and described by "Resolve 1 issue to approve"
- Reassign is a kit Popover with a kit Command: type to filter, arrows to move, Enter to pick, Esc closes it back to the trigger. Availability is a word in each row, not only the Avatar mark
- Reject and bulk approve confirm in a kit AlertDialog
- Decisions are announced in a polite status line ("Approved and posted …")
- Below --grid-breakpoint-md the nav opens from an IconButton named Menu into a kit Drawer
- loading sets aria-busy on main and the Skeletons say Loading review queue once
- No motion of its own
Responsive
- Wide: SideNav on the canvas, the page on the inset panel; queue, document and item on 3, 5 and 4 of the 12 grid columns, each scrolling on its own
- The item header (title, badges, workflow, run id, received, and the Fields / Document toggle) stays pinned at the top of the item; the issue Alert, fields and comment scroll under it. Reject, Reassign and Approve & post share one footer row, with "Resolve 1 issue to approve" just above Approve; below --grid-breakpoint-sm the footer buttons drop their icons to fit
- Below --grid-breakpoint-lg: queue and item (5 and 7 columns); the document becomes a Fields / Document SegmentedControl in the item, and a highlight switches back to Fields and focuses its field
- Below --grid-breakpoint-md: the nav moves into a left kit Drawer
- Below --grid-breakpoint-sm: one column at a time; rows drill into the item, and a ghost Queue button goes back
- Dark mode follows the root theme; semantic tokens only
Do not
- Do not copy the screen's parts into a local cousin; change it through its props or compose DocumentPreview, ListView and Field yourself
- Do not wrap it in an app shell or another main
- Do not add a second solid primary Button; Approve & post is the only one, and bulk approve is outline
- Do not show confidence or priority by colour alone
- Do not let Approve & post through while an issue is open
- Do not use raw hex
Built from
Related
- Block
Plan review
The go / no-go before an agent runs: edit its steps, see what will change, then approve, send back or reject.
- Block
Change review
Review an agent's change file by file, then accept or reject each file, or the rest at once.
- 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.
- Component
DocumentPreview
One page of a document with the values an agent read from it highlighted: a toolbar (file name, page of pages, zoom, download) over a scrollable page, and a button per highlighted value.