Ilse Varga
The scanner at gate 2 drops every third read. A photo of the error is attached.
Organisms · Comment thread
The comments on one item, as in an issue tracker: each with an avatar, the author, a time, the text and its actions (Reply, Edit, Delete), replies one level deep under the comment they answer, and a box to add a comment at the end. An assistant's comments carry an AiLabel, so a thread shared by people and an agent always says who wrote what.
This page as Markdown, a plain-text copy for a coding agent (an AI tool that writes code).
const START: ThreadComment[] = [ { id: 'c1', author: { name: 'Ilse Varga' }, body: 'The scanner at gate 2 drops every third read. A photo of the error is attached.', time: '2026-11-25T09:40:00Z', timeLabel: '25 Nov, 09:40', canEdit: true, canDelete: true, replies: [ { id: 'c2', author: { name: 'Assistant', assistant: true }, body: 'The firmware on that scanner is two versions behind the others. I have drafted the update steps in the description.', time: '2026-11-25T09:52:00Z', timeLabel: '25 Nov, 09:52', }, ], }, { id: 'c3', author: { name: 'Tomas Reyes' }, body: 'I can do the update on Thursday morning.', time: '2026-11-25T11:10:00Z', timeLabel: '25 Nov, 11:10', },]function LiveThreadExample() { const [comments, setComments] = useState(START) const stamp = () => ({ time: new Date().toISOString(), timeLabel: 'Just now' }) return ( <CommentThread className="max-w-2xl" label="Comments on R-1043" comments={comments} composerHelp="Ctrl+Enter sends." onAdd={(body, parentId) => { const comment: ThreadComment = { id: `n${Date.now()}`, author: { name: 'Ilse Varga' }, body, canEdit: true, canDelete: true, ...stamp() } setComments(current => parentId ? current.map(c => (c.id === parentId ? { ...c, replies: [...(c.replies ?? []), comment] } : c)) : [...current, comment]) }} onEdit={(id, body) => setComments(current => current.map(c => (c.id === id ? { ...c, body, edited: true } : c)))} onDelete={id => setComments(current => current.filter(c => c.id !== id))} /> )}<LiveThreadExample /><CommentThread label="Comments on R-1044" comments={[]} />| Part | What it is |
|---|---|
| List | An ol named by label, oldest comment first. |
| Comment | An article named by its author: a small Avatar, the name, an AiLabel for an assistant, the time in a time element, and "Edited" after a change. |
| Body | The text, line breaks kept, or what renderBody draws. |
| Actions | Reply, Edit and Delete as quiet link buttons, each named with the author ("Reply to Ilse Varga"). Edit and Delete show only on comments that allow them. |
| Replies | An ol under the comment, behind a hairline rail. A reply to a reply joins the same list. |
| Comment box | A Textarea in a FormField with a Comment button. Ctrl+Enter sends it. Reply and Edit open the same box in place. |
| Empty state | A small EmptyState when there are no comments yet. |
| Keys | Result |
|---|---|
| Tab | Moves through each comment's Reply, Edit and Delete, then the comment box. |
| CtrlEnter | In a comment box, sends it (Cmd+Enter on a Mac). Enter alone starts a new line. |