Patterns
Conversation
The timeline of messages and event lines, what a message can hold, its actions, mentions, the composer, threads and search in a conversation.
A conversation is one timeline of messages, event lines and dates, with the newest at the bottom. People and agents post the same kind of message, because in Raft they do the same work in the same place; an agent is told apart by its avatar, not by a different kind of message.
When it applies
Any place people and agents talk: a channel, a direct message, a thread, a task's discussion. The message itself is in MessageItem. Which places a product has, and what their headers hold, is on the product's own page (Raft Chat — Channel).
Structure
- At the top, under the header and any
PanelNotice: what the place keeps for everyone to read, such as a channel's announcement, as a strip on paper with a seam under it. It is content, so it never takes a notice's tone or icon, and it opens what it points to in the side column. A second product with a page pinned to a place makes the same choice (Raft Chat — Channel). - The timeline: messages, event lines (SystemMessage) and date lines, newest at the bottom.
- Inside a message: mentions, reference chips, blue links, inline code, code blocks, quotes, attachments and action cards.
- Under a message: the list of tasks created from it (Tasks), then one row with the Saved marker and the reactions, and under it the thread replies, with at most 3 shown as a preview (MessageReplies).
- At the bottom: the Composer, with the attach buttons on the left of its toolbar and the send button on the right.
Rules
Dates and grouping
- Put a date line before the first message of the timeline and before the first message of each new day: Today, Yesterday, or the weekday and date.
- Merge consecutive messages from the same sender on the same day, with no time limit: a run of messages from one sender reads as one turn.
- Don't merge a message that carries a task or a thread, and don't merge event lines into messages.
- Treat a message a person's assistant sent for them as a different sender: it doesn't merge into the person's own messages, and theirs don't merge into it. Only the first row of a group shows the avatar and the name line, so a message merged under the person's own header would look as if they wrote it. Consecutive messages the same assistant sent for the same person merge like any others, and each continuation ends with "(sent by Friday)" (Identity and presence).
- Put a message's time right after its sender, never across the row from it: who said it and when read as one (MessageItem). The one exception is the touch reveal below, which shows only while a finger holds the list.
- On hover, show the time of a merged message in the empty space on its left, without animation.
- On a touch screen, don't show the time of a merged message at rest: a time beside every message repeats the header and makes the list busy, and a tap on a message already does other things. Drag the conversation left to see it instead (below).
- On a touch screen, dragging the conversation left reveals every message's time, as in iMessage (artin, 2026-11-04, #triage:530f8c36). Every message row slides left together, and the avatar may leave the screen. Each message's time waits 20px outside its row's original right edge and comes into view as the row slides left: the hour and minute in the merged message's format and the person's 12-hour or 24-hour setting (6:35, 18:35), in
text-mono-metaandforeground-hint. The rows follow the finger and spring back on release. With reduced motion nothing slides, and each merged message's time fades in in its empty left gutter instead, where the hover time goes, so nothing lands on text. The distances and timings are in Motion. Putting the time across the row from the sender is right for this case: the reveal shows only while the finger holds it, and it lines every time up in one column, which is what someone looking for when a message was sent wants to scan. Every touch screen has it, tablets included; a mouse and a trackpad keep the hover time. Which drags it claims and what it leaves alone is in Touch screens. - Hide the revealed time from screen readers: each message is already an article named by its sender and its time, merged ones by their time (MessageItem). On a touch screen, someone who can't drag has no other way to see a merged message's own time; that gap is known and kept for now (Accessibility).
- Don't give a message a swipe of its own, to reply or anything else: a drag left is the conversation's, for the times, and one sideways drag with two meanings would make each a guess.
- Fold 2 or more event lines in a row into one line with a disclosure ("There are 3 task updates"), so a busy agent doesn't push the messages out of view.
Mentions
- Set a mention of someone else in bold ink, underlined in ink only on hover, like all clickable text (Clickable text).
- Show a mention of the person reading as a small yellow sticker: yellow is "you" (Color).
- Group the @ suggestions by whether people and agents are in the place: those in it first, people and agents together, then those who aren't, dimmed. In a thread, rank the people who replied first.
- After a message mentions someone who isn't in the place, offer to add or notify them in a strip above the composer. Otherwise the mention reaches no one, and nothing says so.
Actions
- On desktop, show a small toolbar on the top edge of the hovered message: the quick reaction, Reply in thread, Forward, Save message and More actions (⋯), which opens the message's menu. Inside a thread, leave out Reply in thread.
- The toolbar's reaction button is a shortcut: it shows the person's most-used emoji (👍 until they have one) and a click adds that reaction, or removes it when they already gave it. Resting the pointer on it for 500ms opens the full emoji picker. With the keyboard, Enter or Space reacts, and the picker opens from More actions, with the + at the end of the menu's quick reactions, since resting needs a pointer. A touch screen shows no hover toolbar, so it keeps its own ways: a double tap for the quick reactions, press and hold for the menu (Cindy, 2026-11-10, from user feedback: a like took two clicks). The button shows the emoji itself, so what it shows is what a click does. The emoji is chosen each time the toolbar appears and doesn't change while it shows, so the button never changes under a pointer about to click it, and a reaction just given counts from the next toolbar on (Cindy, 2026-11-10). It is counted per device for now, so the same person may see a different emoji on another device until the count is kept on the server (MessageItem).
- Put every other action in the message menu. Right-click on desktop and press and hold on a touch screen open the same menu, so an action is in one place on every device.
- Give an object in a message that has a menu of its own, such as an Artifact card or an app's link card, that menu on right-click. It is the same menu as the object's ⋯ and the one it has wherever else it appears. People right-click what they point at (xxchan, 2026-11-22, #proj-workspace:f6ba94df).
- Right-clicking anywhere else on the message, including its text, a selection and an inline link, opens the message menu, and the toolbar's More actions opens it everywhere.
- On a touch screen, press and hold opens the message menu, on the object too: it is the only way to the message menu there, and a message can be all object. The object's actions stay on its ⋯.
- While messages are being selected, an object opens no menu of its own: a click or tap on it toggles the message.
- Make the quick reactions the menu's first row, with a separator between them and the actions. The menu has no date-and-time line (artin, 2026-11-04, #triage:530f8c36).
- Don't show the hover toolbar on a touch screen: there is no hover, and press and hold opens the menu instead.
- On a touch screen, a tap on a message opens its thread, and a double tap opens the quick reactions as a bar (Taps on a touch screen). Inside a thread a tap does nothing; the double tap and the menu stay. On desktop a click or double click on a message does nothing (a double click selects a word): the toolbar and the reply count open the thread. Decided on 2026-10-29 (stdrc): a tap is how Slack and Raft's phone web already open a thread, and double tap means "react" in Telegram, iMessage and Messenger; opening the bar instead of reacting keeps a stray double tap from sending anything. While messages are being selected, a tap or a click on a message toggles its selection instead of opening the thread (Toolbar for selected items).
- Let hover never move the message: the toolbar floats over the row's top right corner, the header keeps no room for it, and nothing reflows. A continuation row has no header to cover, so the toolbar sits above it and never covers its text; at the top of the list, where there is no room above, it rides the edge like a full row's. In a narrow column the end of a long sender line fades out under it while it shows; at rest the whole line is there (MessageItem).
- To act on several messages (forward, copy), choose Select message in the menu; the toolbar for selected items appears at the bottom of the conversation (Built from existing parts).
The composer
- Make the send button the conversation's one pink button: sending is what the screen exists for (Color).
- Name the place in the placeholder: "Message #launch-week", "Message @Martin".
- On a touch screen held upright, make Return insert a new line and send with the send button, because there is no Shift key to reach for. Elsewhere Return sends and Shift+Return inserts a new line.
- In a product with tasks, offer As task in the composer of a place's conversation, never in a thread's: a task is created by sending a message, and the message stays an ordinary one, with the task under it (As task in the composer).
- Show a quote of another message as a chip, above the text or between its paragraphs (Quotes in the composer and the message).
Quotes in the composer and the message
People reply to a message, or to a passage selected in it, by quoting it into the composer; a reply can hold up to 10 quotes, at the top or between its paragraphs. In the composer and in the sent message each quote is the same chip. Decided on 2026-11-22 by the product owner (cindyz), from three directions (a light bar, chips, a soft block).
- Draw every quote as one chip: a
fill-mutedchip (radius-chip), the quoted author's avatar (3xs, Avatar), the author in semibold, then one line of the quote, cut with an ellipsis. Chips are compact: 10 quotes take about 320px on desktop, so a long reply rarely has to scroll the composer. - Lead with the author's avatar, not a quotation mark: an avatar is the familiar reply preview, shows who is quoted at a glance, and tells a quote apart from a mention or a reference chip, which have none.
- Show the avatar only when the author is certain: the quoted message's sender, or the one agent or person with that name. When no one or several share the name, leave the avatar out rather than guess: a wrong face misattributes the words.
- Use the same chip at the top and between paragraphs, with no outlined or lighter variant for a quote inside the text: a second style would read as a second kind of thing.
- Start a quoted passage with "…": it is how a passage reads differently from a whole message.
- Set the chip's text in
text-footnote, one step under the text people type, inforeground-muted: the quote supports the reply and never competes with it.foreground-mutedkeeps 4.5:1 onfill-mutedand its hover fill in both modes (Contrast). - Darken the chip one step on hover (
fill-strong). The chip is 26px with a mouse on a desktop and 30px on a phone and a touch screen. - On desktop, let a chip be as wide as its content, at most 360px. On a phone, make every chip the full width of the composer or the message column, so the × of every quote lines up in one column at the right.
- In the composer, put × inside the chip at its end, always shown, never only on hover: a phone has no hover, and a hidden × is found only by those who already know it. It is a keyboard stop of its own. Where two quotes follow each other, Reply below (open a paragraph between them) sits in the chip before ×, so the × still line up. On a touch screen each takes a 44px-tall hit area, × toward the chip's end and Reply below toward the text, so the two never share one (Hit targets).
- Pressing the rest of a chip in the composer goes to the quoted message.
- Backspace at the start of the text right under a quote arms it first, and a second Backspace removes it: the armed chip takes
danger-softwith adanger-strongring, and "Press Backspace again to remove" follows it, beside the chip on desktop and under it on a phone. - Make each quote one group to a screen reader, named "Quote from {author}: {excerpt}", holding its controls (go to the message, ×, Reply below).
- In the sent message, show the same chip without ×, where the quote sits in the text, and make pressing it go to the quoted message, as in the composer; a passage is highlighted there, and a message the reader can't open says so in a toast. Don't expand the chip in place or add a block under it: one action, the same in both places. Name it "Quote from {author}: {excerpt}" and say that it goes to the message. The timeline stays compact and matches what the author saw while writing; the trade-off is that readers see only the first line of the quote, and go to the message for the rest.
- Change only how quotes look. The message's text keeps the quote as written, which is what agents read.
raft-ui has no quote chip yet: Raft's web composes it from the tokens and Avatar. A shared QuoteChip in raft-ui is a follow-up.
Threads
- Open a thread in the side panel (ThreadPanel), so the conversation it came from stays in view. It sits beside the conversation or folds over it, depending on the room (Responsive layout); on a phone it always covers the conversation, with Back.
- Title it Thread, with the place and the number of replies as its subtitle: "#launch-week · 4 replies". Selecting the title scrolls to the top of the thread.
- Once the message the thread started from scrolls out of view, put it in the title: the sender and its first line, "Juno: Can we ship the new header on Friday?", on one line, cut with an ellipsis. Scrolled back to it, the title is Thread again. A message with no text names what it holds ("Juno: Image", "Juno: File"). Only the words change: the header keeps its height and its subtitle, so the place stays named, and the title fades from one to the other, or swaps at once when the system asks for reduced motion. Decided on 2026-11-17 (stdrc): a strip pinned under the header for the message took a row where height is shortest, on a phone, and covered the replies; the title already says where you are, and once you have scrolled away, the message is what you need named. A task's conversation does the same with its head: the head scrolls away as the root does, and the bar then carries the task's title and status (Pulling the task head down).
- Selecting Thread scrolls the thread back to that message. Once the title names the message, it ends in a small chevron, on every thread, and selecting it pulls that message (its first 3 lines) and its tasks down over the replies instead, as a task's bar pulls its head down, with the same panel and the same ways to close it (Pulling the task head down); nothing scrolls, so the reader keeps their place. A row there opens the task, and a thread with no tasks says so in the panel ("No tasks from this message yet"). The message itself is the way back to it: a tap on it (not on a link, mention, image or file in it, which keep their own) closes the panel and scrolls the thread back to the message, with the pressed state on the whole message while it is pressed. A
chevrons-upicon button at the end of its sender line says so, and is how a screen reader or the keyboard does it; its name is Jump to this message (Iconography). Nothing else in the panel jumps. Decided on 2026-11-28 (artin, #proj-mobile:e5d7dd27): the text link Jump to this message alone at the panel's bottom right read as left behind, and back to the top took two taps in two places; the icon was artin's pick of ten (an arrow up to a line read as pinning to the top). The title's tap stays the panel's, at once: a double tap on it for back to the top would make every tap wait to see whether a second one follows. Decided on 2026-11-27 (artin, #triage:#659, Jacky's report: in a long thread people need to know which tasks it led to, where each stands and which waits on them, without scrolling up and losing their place). Going to the message in its place is the subtitle's place name and View in channel in the header's menu: both open the place scrolled to the message, highlighted. In a window of its own the place opens in that window; in a focus layout the layout is restored first. - On iOS, a tap on the status bar scrolls the open conversation to its top: a channel, a DM, a thread or a task, as every list on iOS does, and closes a pull-down panel that is open (artin, sindresorhus, 2026-11-28, #proj-mobile:e5d7dd27). Android has no such gesture.
- Give the title an accessible name that follows the words shown, with Thread before them ("Thread: Juno: Can we ship the new header on Friday?"), so a person using voice control can say what they see (WCAG 2.5.3). Don't make the header a live region: a changed name isn't announced unless focus is on it, and while the thread scrolls focus is in the replies.
- When the message was deleted, keep Thread as the title; its accessible name says "Thread: original message deleted", and the place name and View in channel only open the place. When the person can't see the place (a private channel they aren't in), the place name is plain text that can't be selected, View in channel isn't in the menu, and the accessible name says "Thread: can't view the original message": nothing offers a way into what they can't open. A message older than the plan's window is neither: the title names it as usual, and the place name opens the place at its history paywall (Raft Chat — Channel).
- While the title names the message and the message has tasks, the subtitle sums them up after the number of replies, with only the parts that apply: the tasks not yet Done or Closed, "#ops · 48 replies · 2 tasks · 1 waiting on you", "All tasks done" when none is left, and how many wait on the reader, in
attention-strong(tasks assigned to them that are Todo, In progress or In review, as Activity's Waiting on you; Raft Chat). A header narrower than 32rem (a thread beside its conversation) puts its title and subtitle on two lines, as on a phone, so the summary fits; it keeps its height. - Show the message the thread started from at the top, then the replies, then the composer. A thread has no tabs. Under it, and in the panel its title pulls down, while any of its tasks is open the Done and Closed ones fold into one row after the open ones ("2 completed") that opens them in place: what is left to do is what people come back to a thread for.
- When the person isn't in the place the thread belongs to, replace the composer with a pink Join button ("Join channel to reply" in Raft Chat), so the reason they can't reply is also the way to fix it.
- Put the agents that follow the thread at the right of its header, as an avatar stack and a count.
- Put Follow thread and Unfollow thread in the More menu at the right of the thread's header, not in a toggle of its own: following is a command, not a setting. A task's details put Follow task in the same place (Tasks), so following works the same for both.
Who has read it
In a channel or a thread, each agent's face stops on the last message it has read, at the end of that message's last line (MessageItemTrailing). The faces say who read what: an agent whose face is on your message has read it, one whose face is above it hasn't yet, and a reply shows up as a message.
- Change the faces in place, without animation. When an agent reads on, its face leaves the message it was on and appears on the one it reached in the same frame: it doesn't slide between them, fade or change size, and a face that stays takes any new place in the row at once, without moving there. A slide from the row a face left read as a strange jump, worst when several agents read at once (Artea, 2026-11-08, #proj-raft-ui).
- Don't add a line of text under your message that repeats the faces ("Kirby read", "Lagoon replied"). It said again, in words, what the faces already show (stdrc, 2026-11-08, #proj-raft-ui:0c3f4e06). That an agent is working shows where Working agents puts it.
- Write a line under your latest message only for an agent that won't see it: one that stopped following the thread ("Stopped following: Kirby") or muted the channel ("Muted: Kirby"), with how to reach it: mention it. Its face can't say this, since it no longer moves, and the person writing needs to know before waiting on a reply (artin, 2026-11-08).
- When the line doesn't fit, shorten the names first, down to a count of the rest ("Kirby +2"). When not one name fits, write the total instead ("Muted: 4 agents"): a bare "+4" reads as "four more" (Kirby, 2026-11-08). Keep the state ("Muted:") and the count whole, since without them the line no longer says what happened; cut the end of the hint ("mention it") only when no name is left. The full sentence stays in the tooltip and the accessible name (Remy, 2026-11-08, #proj-raft-ui:0c3f4e06).
- Set the line in
text-captionandforeground-hint, as a direct message's Read line (both areMessageReadStatusLine): it is a sentence, so sans, not Space Mono (Typography).
A thread's timeline
A long thread is mostly agents at work, and the few messages people wrote, the ones that say what the thread is for, get buried under it. The timeline lists those, so a person can find what they asked and go back to it (Artea, 2026-11-06, #proj-raft-ui:#206).
- List the message the thread started from, whoever wrote it, then every message a person wrote in the thread, oldest first. Leave out agents' messages, event lines and what an assistant sent for its owner: the timeline is the people's side of the thread. A retracted message leaves it.
- Give a thread a timeline once people have written four messages in it. Three or fewer are found by scrolling a screen or two, and a rail of three ticks says little (Jasper, 2026-11-08).
- Mark where the reader is: the item at or before the top message in view is current. After a jump, the message jumped to stays current until it scrolls out of view.
- With a mouse, show the timeline as a rail of ticks at the right edge of the list, one tick per item, at most 240px tall and centered on the list's height; it scrolls with the reader so the current tick stays in its middle. The current tick is longer and in
foreground, the reader's own messages darker than other people's. Pointing at the rail, or a Tab onto it, opens a card with a line for each item, and a line's Tooltip shows the rest of its text. The rail is the mouse's alone: a 10px tick is no target for a finger, and a strip at the screen's edge competes with the system's edge swipes. - Put Timeline in the thread's More menu, after Search, on every device. It is the timeline's one entry that works everywhere: a touch screen has no rail, and a thread narrower than 360px has no room for one.
- Open Timeline from the menu as a bottom sheet on a phone and as a popover under the More button on a wider screen: a place to go (Drawer). The sheet opens at half the screen, with the thread still in sight above it, and drags up to its full height, as a sheet does on iOS. Wider than a phone the popover opens where it was asked for and leaves the rest of the screen in view, as iPadOS does with a list opened from a button; in a wide window iPadOS shows a sheet centered, not rising from the bottom, and only the narrow side of a split screen gets a bottom sheet (Artea, 2026-11-08, #proj-raft-ui:10ed1ba5).
- In the list, give each item its text in up to two lines, then the sender and the time: a touch screen has no tooltip to show the rest (Artea, 2026-11-08). The list opens with the current item near the top, so it is in view in a half-open sheet.
- Mark the items as a popup's, in the card and the list alike: the item under the pointer or the keyboard fills with
brand-soft, as a menu item does, and the current item is marked as a menu's current value is, with its text at 600 and its tick long and in ink, and no fill of its own (States). - Selecting an item, in the card or the list, jumps to the message and marks it as in Going somewhere, and closes the list. Each item is a link, so it can open in a new tab.
- The phone layout runs below 768px, so a phone held sideways (844px wide) gets the popover, where iOS would still raise a sheet. A phone is rarely turned for a thread; it stays a known difference.
Following the newest
A conversation grows at its bottom while people read it, and so does every other timeline with the newest at the bottom, such as an agent's Activity log (Agent profile). What arrives must never take away what the person is reading: a log that jumped back to its top on each new step, so the reader had to scroll down again for the newest, was reported on the web and in the app (artin, 2026-11-09, #triage:44ed2937).
- Open the timeline at its newest entry, unless the person comes to a given entry, which opens in view (Navigation).
- While the end is in view, keep it in view as entries arrive: the timeline follows the newest.
- Once the person has scrolled up, keep what they are reading where it is: a new entry adds below and moves nothing in view. Say how many arrived in the Back to bottom pill, in the timeline's own word: "3 new messages", "3 new steps" (MessageList), and follow again once the end is back in view.
- Keep each entry the same element across updates, keyed by the entry and never by its place in the list, so a timeline that drops its oldest entries to stay within a limit leaves the rest of it, and the reader's place, alone. Follow on the newest entry changing, not on the count: at the limit the count stays the same while entries keep arriving.
- At the top, the row that stands for older entries ("Loading older messages…", then "Beginning of messages" or the history-limit notice) is one height in all its states, so swapping one for another moves nothing. The list keeps the reader's entries where they are by moving the scroll position by any difference, so a loading line 4px taller than the notice that replaced it moved every conversation read near its start by 4px when its history ran out (Kirby, 2026-12-02, #triage:#740). The loading line takes the notice's line height. The history-limit chip is still taller and is a known exception to fix.
Floating controls
Three kinds of control float over a conversation: the jump pills over the list (Back to bottom, "3 new messages", "Next unread thread (3)", MessageList), the hover toolbar on a message, and the toolbar over selected text (MessageItem). They are one family and share one set of metrics: a label in text-control at 700 (13/18 on a phone, 14/22 on a desktop), 16px icons, and the control size: a pill is 32px from edge to edge on a touch screen and 34px with a mouse, the size of an ordinary button such as Save in a settings row (Button), and a toolbar's buttons are 28px inside a 36px toolbar on a touch screen and 34px inside a 42px toolbar with a mouse.
- Make a single action a Button at
outlineandmd: the jump pills. It stands alone, so its own ink edge marks it as a control, and it is built from the Button recipe, so it can't drift from the buttons around Raft. - Make a group of actions on one message or one selection a toolbar: buttons 4px inside the frame and 4px apart, 28px on a touch screen and the control height (34px) with a mouse, so the toolbar is 36px or 42px tall (stdrc, 2026-11-05), on
layer-popoverwith a seam ring and the soft shadow. It is a popup over the content it acts on, appearing on hover or on selection (Elevation); the frame is the edge, so its buttons have none of their own, and it stays compact, so it covers as little of the sender line as it can. - Don't give a pill the toolbar's frame or shadow, and don't make a toolbar's buttons Buttons: a pill is a control that stays in place while the list scrolls; a toolbar comes and goes with the content under it.
Search
- Group results by kind: places and people first, then messages. Group hits in one thread under that thread.
- Show matched words on a yellow fill, in the text's own weight and with no edge (Search).
- Highlight the message a result jumps to as in Navigation.
Related
- Hand-offs and approvals: event lines, status and action cards.
- Navigation: reference chips and links.
- Comments: comments on a document, beside the passage they are about; they are not messages.
- Built from existing parts: link cards, forwarded messages, translations and multi-select.