Discuss components
The four named components of discuss.contract: DiscussBubble, DiscussThreadRow, DiscussSection and DiscussComposer, and how they nest.

These are the named, reusable components defined in discuss.contract, the file that draws comments. They cover one comment, one thread as a row, the discussion under a document, and the reply field under a thread. The screen components of the same file (DiscussThreadScreen, DiscussAllScreen, DiscussComposeScreen) are documented with the Read tab screens, because discussion lives in the Read tab.

The components

Component

What it is

Used by

DiscussBubble

One comment: avatar, name, time, and the text in a rounded grey bubble

DiscussThreadRow, Thread

DiscussThreadRow

A thread's root comment as a tappable row with its reply count

DiscussSection, All comments

DiscussSection

The "Discussion" block under a document: count, three threads, "See all", "Add a comment"

DocDiscussionSlot, and through it the document screen

DiscussComposer

The reply field pinned under a thread, or a prompt to create an identity

Thread

How they nest

flowchart TD DocScreen --> DocDiscussionSlot DocDiscussionSlot --> DiscussSection DiscussSection --> DiscussThreadRow DiscussAllScreen --> DiscussThreadRow DiscussThreadRow --> DiscussBubble DiscussThreadScreen --> DiscussBubble DiscussThreadScreen --> DiscussComposer DiscussBubble --> Avatar

The Compose comment sheet uses none of them: it is a full-page text area, written directly in its screen component. Avatar is a shared component.

The path through a discussion

A person meets these components in a fixed order, each a step deeper:

    Under a document, DiscussSection shows a glance: three threads at most.

    A DiscussThreadRow (there or in All comments) opens a thread.

    In the thread, every comment is a DiscussBubble, the root one larger.

    DiscussComposer at the bottom lets them answer.

What they have in common

    A comment is a bubble with a person on it. 28 point avatar, name in semibold, time in grey, then the text on -exact-secondary-background with an 18 point radius. Every comment looks like this in every place. See Names, not identifiers.

    Everyone is on the left. There is no right-aligned "mine" bubble. DESIGN.md calls for a "chat-thread look, but all left-aligned with avatar + name + relative time, since it's a group". The Agents chat, a one-to-one conversation, is the place that uses right-aligned accent bubbles; see Chat messages and the streaming reply.

    Brand marks what navigates or acts. "N replies", "See all N threads" and "Reply" are brand text; "Add a comment" and Send are brand fills. Everything else is label or secondary colour. See Color and tokens and Buttons and actions.

    Times are relative for a week. "now", "24 min. ago", "1 hr. ago", "2 days ago", then "Feb 26, 2025". They follow the app's minute clock, so a visible thread ages without reloading. See Voice and wording.

    They are painted content. DESIGN.md's first principle lists "comment bubbles" among the few things the app paints itself. The surfaces are platform colour roles, so light and dark need no extra tokens. See Leave it unsaid and Light and dark.

    Reading needs no identity; writing explains what is missing. Every component renders for a person with no identity. Only the composer changes. See Honest state.

Differences from DESIGN.md

DESIGN.md's component table lists one shared CommentBubble(author, avatar, time, md) in ui.contract, for "Thread and discussion rows". The built app has DiscussBubble(c, now, utc, big, testId) in discuss.contract, plus three components DESIGN.md does not name. DESIGN.md gives 18 as the bubble radius, which matches; the composer's 20 point radius and the 999 pill are not in its list of radii.

How it is built

Discuss: screens and components covers the same file from the code side, Discuss: threading logic covers how comments become ordered, indented rows, and Discuss: posting a comment covers what Send does. Source: discuss.contract L49-L184. The composer pattern shared with the Agents tab is on Composers. The whole toolkit is indexed at Component toolkit.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Comments