Resources
signoff-ui vs assistant-ui, AI Elements and @pierre/diffs
How signoff-ui is different from assistant-ui, AI Elements, @pierre/diffs and other diff viewers, what each does better, and how to use them together.
signoff-ui does one part of an agent product: the step where a person reviews what the agent changed and decides what it may do. assistant-ui and AI Elements cover the whole chat, and you may well want one of them for it; @pierre/diffs renders diffs. They compose: render the thread with either chat kit, and these components for the review and the approvals (Inside your chat UI shows how).
What they do better
- assistant-ui is a chat runtime plus composable primitives, with adapters for the AI SDK, LangGraph, AG-UI and others, on React 18 or 19. Its Elements collection (since August 2026) is far wider than this kit, with agent pieces close to it: an approval card, a reviewable diff, a trace waterfall, a tool timeline, a cost meter, agent status and more. It ships several releases a month.
- AI Elements is Vercel's shadcn registry for AI SDK apps, with the widest coverage of the message surface: conversation, message, prompt input, reasoning, sources, a per-call
Toolcard, aConfirmationfor tool approvals, aContextusage indicator and more. If you want the whole chat in shadcn style, start there. It targets React 19 and Tailwind v4, and its components are written against AI SDK 6 (ai@^6.0.105). - @pierre/diffs renders diffs with Shiki's highlighting, comment annotations, virtualization and a helper to accept or reject a hunk. It also edits the new file in place and resolves merge conflicts (
UnresolvedFilekeeps the current side, the incoming one or both), and leaves the review to you. ItsMultiFileDiff(1.5.2) is 139 kB gzipped before it loads a Shiki theme or grammar;DiffReviewis 44.3 kB up front, plus a 6.7 kB worker it starts for large files.
Where signoff-ui differs
| Topic | signoff-ui | assistant-ui Elements | AI Elements |
|---|---|---|---|
| Diff review | The old and new text of several files, or a patch, with the hunks computed and word-level highlights. Hunks or whole files accepted or rejected, comments on lines, files marked viewed. Returns each file with only the accepted hunks applied, the rejected hunks and the comments, ready to send back as a tool result, or as a unified patch. | One file's hunks, already split; keep or discard per hunk, and apply returns nothing. | None. |
| Approvals | What will run, a risk level when you give one, deny with a reason, a second press for critical, and automatic decisions from toolApproval shown as such. Once, for the session or always, by tool and argument pattern, with rules that also run as AI SDK 7's toolApproval, sent with each request (getRules) and checked in the route (parseApprovalRules); arguments editable before approving; approve all pending; an audit trail. A key for each choice, scoped to focus. | Allow once, allow always or deny. | A Confirmation compound component on the tool part's approval state, with approve and deny buttons you wire to the chat. No remembered choices or rules. |
| Data in | A UIMessage from useChat as it is, an AG-UI agent through useAgUiAgent, an ACP prompt turn through signoff-ui/acp, or assistant-ui's tool calls through signoff-ui/assistant-ui. No runtime to adopt. | Props (agent status also has a runtime-bound variant). With the assistant-ui runtime, its docs show how to map approvals, message timing and step usage into them. | AI SDK message parts, passed to each component as props. |
| Tool timeline | Every state, with durations measured on the client that leave out time spent waiting for an approval. Sub-agents nest under the call that started them. | A summary of what was done, without durations or states. | A Tool card per call, with its state, input and output, without timing. |
| Cost | Prices tokens from your rates and shows the prompt-cache hit rate. | Displays cost strings you format. | A Context indicator: context window usage, and a total cost looked up from the model id. |
| Styling | Tailwind v4, v3 or none: the npm package ships a precompiled stylesheet scoped to its own elements. | Tailwind v4. | Tailwind v4, in a shadcn/ui app. |
| React | 18 or 19. | 18 or 19. | 19. |
Also true of this kit
- It reads AI SDK messages as they are. Hand
AgentMessageaUIMessagefromuseChatand tool parts become one timeline with inline approvals, sources become citations, and usage metadata feeds the meter, with no per-component data mapping. - Timings are measured, not supplied.
useRunTimingreports time to first token and active time per turn, across review and approval round trips. - Accessibility is audited. Focus-scoped shortcuts, live-region announcements and contrast are covered by axe in jsdom and in Chrome; see Accessibility.
- It is smaller in scope. There is no thread, composer or runtime here, and fewer components. What is missing is listed in Performance and limits.
Diff viewers
Coding-agent apps often draw diffs with one of these libraries. They render diffs well, and some revert or accept a change in place, but none keeps a review: which hunks were accepted or rejected, the comments on lines, and each file with only the accepted hunks applied, sent back to the agent. signoff-ui keeps that review, drawn by DiffReview or by the renderer you already use: Bring your own diff renderer does it with @pierre/diffs.
| Library | What it draws | Accept and reject | Comments | What you get back |
|---|---|---|---|---|
| @pierre/diffs | Two versions of a file or a patch, split or unified, highlighted by Shiki, with virtualization. The new file can be edited in place (edit). | diffAcceptRejectHunk returns the diff with a hunk resolved; the buttons are yours. | Annotations on any line, which you render. | The diff you resolved, or the edited file (onEditComplete). What was accepted, rejected and said is yours to keep. |
| @codemirror/merge | Two documents in CodeMirror, side by side (MergeView) or in one editor (unifiedMergeView). | Side by side, a revert control per chunk; unified, accept and reject buttons per chunk (mergeControls, acceptChunk, rejectChunk). | None. | The edited document. |
| react-diff-view | A unified diff, read with parseDiff, split or unified. | None. | Widgets under a change, which you render. | What you render. |
| diff2html | A unified diff as HTML, line by line or side by side. | None. | None. | HTML. |
| Monaco | Two texts in VS Code's diff editor, side by side or inline. | Icons in the margin that revert a change (renderMarginRevertIcon). | None. | The edited text. |
| signoff-ui | Several files from their contents or a patch, unified or split, in DiffReview, or in your renderer with useDiffReview. | Per hunk or per file, from the keyboard too. | On lines, hunks or whole files. | Each file with only the accepted hunks applied, the rejected hunks and the comments, as a tool result or a patch. |
Use a diff viewer alone when a person only reads the diff, or edits the file in place and you take the text. Add signoff-ui when the agent needs to know what was kept, what wasn't and why.