ReviewComment
A teammate's note threaded into the code it is about, with the assistant reachable from inside it.
Install it:
npx shadcn add @ambientui/review-commentLive
Change requested
mingjie1h agoChange requested
Should the draft live in the runtime store, or stay local and only persist on blur? Asking because the composer is the only consumer today.
Resolved, read-only
nanYesterdayResolved
Rounded the total after fee calculation so pricing and display use the same value.
Behavior
- ·ANCHORED, NOT ADJACENT: the note renders under the line it questions. A review comment in a side panel makes the reader hold a line number in their head and scroll; threaded, the question and the code are one object.
- ·That anchoring is what makes the reply seam honest — "resolve this" has an unambiguous referent, so replying attaches the line as context and hands the work to the ambient panel rather than answering about a whole file.
- ·The reply row is the Composer's `inline` variant, not a lookalike input: one instrument everywhere a question is written.
- ·Status is STATED, not implied by color alone — a red tint is not a word, and "Change requested" is the difference between an opinion and a blocker.
- ·Wears the ambient glass: a thread the assistant can act on belongs to the layer's material, not the host surface's chrome.
- ·Replying HANDS THE THREAD OVER: the host closes the comment (it is the assistant's business now) and puts the line it pointed at into the working state, so the handover is visible in the code and not only in the panel that just opened. The component reports the reply; what closing and highlighting mean is the host's decision.
- ·Omit onReply and it is a read-only record, with no reply affordance offered.
When to use
- ·Human review notes inside a diff or an editor, where the assistant may be asked to resolve them.
- ·Anywhere a comment's meaning depends on exactly which line it points at.
When not to
- ·For the assistant's own output — that is the response kit; this component is for a person's words.
- ·As a general comment feed detached from code; without an anchor it is just a message list.