The rules every change to the desktop app (apps/desktop) follows. The
tokens live in one place, apps/desktop/src/index.css (CSS variables and
the Tailwind @theme that maps them to classes), with the built-in themes
mirrored in apps/desktop/src/lib/themes.ts. Theme files (user and project
themes, the CLI and the engine's _rustcode/themes methods) are described
in themes.md.
src/design.test.ts fails the build on a raw colour (#hex, rgb(),
hsl()) or a Tailwind palette class (zinc-*, white, black, …)
outside the tokens files, on the retired class names listed at the end, and
on a native <select>, transition-colors, backdrop-blur or a hand-made
menu item.
- Calm. The transcript is the content; chrome stays quiet. One accent, used sparingly. Nothing moves, glows or changes colour unless the user did something or the state changed. The one exception is the live background (below, Motion): a slow field of light behind the chat that rests after 20 seconds without input, holds still under Reduce motion, and can be turned off.
- Neutral. Greys are true neutrals (no warm or blue cast), and every
grey comes from a token. Translucent fills are drawn from
--rc-text, so they stay neutral on any background. - Dark first. The dark theme is designed first and is the default; the light theme follows the same structure.
- Minimal borders. Separate with a step in surface, not a line. A 1px hairline only where two equal surfaces meet with nothing else between them (a list's rows inside one card, a panel edge).
- One shell. Sidebar, header and panes stay mounted; views swap inside the main column. Pressing or hovering never remounts anything.
- Opaque panes, glass floats. Panes, cards and rows are opaque; what floats over them shares one glass (below).
Every theme sets exactly these, as CSS variables --rc-<token>. In theme
files and the engine snapshot the names use underscores (surface_2,
text_muted).
| Token | Use | Default dark | Default light |
|---|---|---|---|
bg |
The chat and main panes | #0b0b0c |
#ffffff |
sidebar |
The sidebar | #151517 |
#f7f7f8 |
surface |
Resting cards: composer, settings groups, error cards | #1d1d20 |
#eaeaea |
surface-2 |
Raised: popovers, menus, dialogs, tooltips, toasts | #242428 |
#ffffff |
surface-3 |
Raised over raised: kbd, a hover label or a tooltip drawn on a popover | #2a2a2e |
#e4e4e6 |
border |
Hairlines and the edge ring of raised surfaces | #ffffff0a |
#0000000a |
border-strong |
A line that must read: a chart marker, a dashed outline, the knob's ring | #ffffff1c |
#0000001f |
text |
Primary text and icons | #ededed |
#171717 |
text-muted |
Secondary text, idle icons | #a1a1a1 |
#5c5c5c |
text-faint |
Metadata, placeholders, disabled | #6b6b6b |
#9a9a9a |
accent |
Links, toggles on, progress, selection marks | #93a3e8 |
#2f6fe4 |
accent-text |
Text and icons drawn on accent |
#0b0b0c |
#ffffff |
danger |
Errors, destructive actions | #f26d6d |
#d93d3d |
success |
Passed, connected, added lines | #4ec27a |
#1f9d55 |
warning |
Needs you, warnings | #e5a54b |
#b7791f |
focus |
The keyboard focus ring (drawn at 40%) | #93a3e8 |
#2f6fe4 |
selection |
Selected text | #93a3e84d |
#2f6fe433 |
code-bg |
Code blocks, diffs, terminal | #111113 |
#f6f6f7 |
scrollbar |
Scrollbar thumb | #ffffff26 |
#00000026 |
The surfaces step evenly in lightness (CIE L*): dark bg 3.0, sidebar
6.8, surface 10.9, surface-2 14.3, surface-3 17.2; light bg 100,
sidebar 97.3, surface 92.7, surface-3 90.6, with light surface-2
white (raised surfaces are lifted by their shadow there). A theme that
changes them should keep the steps even, and the step from bg to surface
is the one that carries every card: about 7–8 L* of it, so a card reads as
its own plane with no border (Borders).
Two more values are the same in every theme, and no theme sets them: knob
(#ffffff, bg-knob) is the part of an active control that moves or is
picked, and knob-fg (#171717, text-knob-fg) is the label drawn on it. They
are fixed literals rather than derived, so a theme cannot soften the white pill
into a tint of its own (see Active controls).
Derived values are computed from the tokens in index.css and are never
set by a theme:
| Derived | Value | Use |
|---|---|---|
fill-subtle |
text at 4.5% |
Resting fill of quiet controls (search field, cluster), hover on rows |
fill |
text at 8% |
Hover on controls, the selected row, chips |
fill-strong |
text at 13% |
Pressed, an "on" icon button, switch track off |
message |
text at 8.5% over bg |
A sent message's bubble: a step off the pane, so it is told apart from hover fills |
--rc-diff-add / --rc-diff-del |
success / danger at 14% |
Diff line backgrounds |
knob-shadow |
0 1px 2px soft plus a hairline ring: text at 20% on the light theme, border-strong on the dark one |
The ring and close shadow that keep the white knob apart from its track |
--rc-shadow-1 / --rc-shadow-2 |
see Elevation |
Tailwind classes use the token names, except the text family, which is
fg: bg-bg, bg-sidebar, bg-surface, bg-surface-2, bg-surface-3,
border-border, border-border-strong, text-fg, text-fg-muted,
text-fg-faint, bg-accent, text-accent, text-accent-fg,
text-danger, bg-code-bg, bg-fill, bg-fill-subtle,
bg-fill-strong, bg-message, bg-knob, text-knob-fg, shadow-knob. Opacity
modifiers work on any of them (bg-danger/10).
Primary actions are inverted neutral (bg-fg text-bg), not accent:
the accent marks state (on, selected, linked), it does not shout.
| Step | px | Tailwind | Used by |
|---|---|---|---|
| xs | 6 | rounded-xs |
kbd, inline code (on bg-fill), tiny badges, checkboxes |
| sm | 8 | rounded-sm |
22px icon buttons inside rows, branch chips, small inputs |
| md | 10 | rounded-md |
Icon buttons, fields, list rows, inputs |
| lg | 12 | rounded-lg |
Cards (tool output, error card), settings rows, menu items, pictures in replies |
| xl | 16 | rounded-xl |
Settings group cards, menus, popovers, dialogs, the command palette, large panels, tooltips and hover cards |
| 2xl | 20 | rounded-2xl |
The settings panel, toasts |
| composer | 20 | --rc-composer-radius |
The composer's box: one floating card a step rounder than menus and popovers, so its corners read soft over the text sliding under it |
| 3xl | 26 | rounded-3xl |
The largest floating surface (nothing uses it yet) |
| full | — | rounded-full |
Labelled buttons (Pill), selects, segmented controls, status chips, toolbar clusters, switches, avatars, dots, trackbars |
In the chat a component names its role instead of a step; each role is one of the steps above, so a theme's radius still scales it:
| Role | Step (default px) | Tailwind | Used by |
|---|---|---|---|
| inline | xs − 2 (4) | rounded-inline |
Inline code and file references in a reply, keycaps |
| chip | sm (8) | rounded-chip |
Compact controls H20–28: footer actions, tool rows' hover fill, thread chips |
| row | lg (12) | rounded-row |
Standard controls H32–40 and single-line rows |
| block | xl (16) | rounded-block |
Code blocks, diffs, tool output bodies, tables, file and preview cards |
| bubble | 2xl (20) | rounded-bubble |
A sent message's bubble, independent cards |
| panel | 3xl (26) | rounded-panel |
The composer, dialogs, panels |
A nested inset takes the outer radius minus the inset, and a hover fill keeps its container's radius, so no crescent shows between them.
A theme's radius (sharp, default, round) scales the steps
(sharp: 2/3/4/6/8/10/12, round: 8/10/12/16/20/26/32); components only ever
name a step. No arbitrary radii (rounded-[14px]), no rounded-4xl. A child
inside a padded parent uses the step below the parent's.
A surface is a plane of fill, never an outline: every card, panel, popover
and nested block is told apart by its step in surface (or by the glass and
the shadow where it floats), not by a line drawn round it.
- Hairline is always 1px
border-border; never 0.5px, never 2px. - A card is
bg-surfaceonbg-bg, with no border. Inside it, a grouped block isbg-surface-2(a nested panel, a token chip) and a quiet inset isbg-fill-subtle, again with no border; controls arebg-fill, which is translucent and so is always a step over whatever holds it. Never stack two edges to tell them apart. - The only lines left are separators: between the rows of one card, under a
header, above a footer. They all use the one soft
--rc-separator(border-border,divide-borderandbg-borderresolve to it), a few per cent of the text colour that is derived, never set by a theme: a theme's solidbordercolour read as a dark, hard line on a raised surface, so that token no longer draws separators.border-strongis for a line that must read (a chart marker, a dashed outline), never for a card. - A horizontal separator stops where the content's padding does, and a
vertical one stops short of the panel's top and bottom by the same amount
(never edge to edge):
rule-t,rule-b,rule-l,rule-randrule-rows(a line above every child but the first) draw it as a background, inset by--rc-rule-inset(16px; set it on the element to match its padding, e.g.[--rc-rule-inset:0.75rem]).menuSeparatorismx-2to line up with a menu row's text. A separator inside a padded parent is already inset by that padding and keeps a plainborder-t. - A panel nested in a rounded surface (the model card's effort column) is inset by the surface's padding, takes the step below its radius and has no edge line of its own.
- Raised surfaces get their edge from
--rc-shadow-*, which includes a 1pxborderring; do not addborderto a popover or menu as well. - No coloured borders for state (an error card is not outlined in red; a focused field does not turn blue). State is a fill, a tint or a chip.
The part of a control that moves or is picked is white (bg-knob), not
accent and not a dark pill: the selected segment of a Segments/Choice
track, a switch's thumb, a slider's thumb. It is white in both modes, with
shadow-knob (a close shadow and a hairline ring) so it still reads on the
light theme's near-white track, and its label is text-knob-fg, dark in both
modes. That ring is border-strong on the dark theme and text at 20% on the
light one, where 12% black would leave a white pill nearly invisible. A track's
own fill marks the range or the state the control is off in (bg-fill, or
accent for a switch that is on); the accent never fills the knob. Left out of
this: pressed icon buttons (bg-fill-strong), primary actions (bg-fg text-bg) and native checkboxes, whose check is the mark rather than a knob.
Every knob is 24 px, except a switch's: a 24×16 px pill inset 2 px inside a 44×20 px track (the track shows around it), travelling 0 → 16 px, and both the knob and the track's fill answer a toggle over 200 ms. The button's own box is the track's 20 px, so a switch in a Settings row does not make the row taller than its neighbours.
A segmented track is inset 3 px around its pill (Segments; Choice is its
24 px size), so the pill reads as sitting inside the track rather than filling
it.
Knobs answer the press, not just the release:
- Held, a knob swells: a switch's grows to 28 px toward the side it would move
to (staying inside the track), a segmented pill scales to 104%, a slider's
thumb to 115%, each over 200 ms
--ease-snappy. - A switch and a segmented track can be dragged as well as pressed. A segmented pill follows the pointer to the segment under it and picks it on release. A switch's knob follows the pointer and lands on the side it is let go nearer; a press without a drag toggles. A cancelled gesture changes nothing.
- The keyboard still picks with a click (Space, Enter), so a pointer gesture commits once, on release, and never twice.
- Controls normally use
:focus-visiblefor a ring: 2pxfocusat 40%, offset 2px. It is global inindex.css; components do not add their own focus colours. - Rings follow the keyboard:
lib/focusModality.tssetsdata-keyboard-navon<html>on a Tab and removes it on the next pointer press, and every ring is drawn under it.:focus-visiblealone also matches a text field and a control focused from script after a click (Radix handing focus back to a menu's trigger, a.focus()after Enter or Escape), so a click, a hover or a press never draws a ring or a border. Tab itself is never taken over. A component's own focus mark uses thekeyboard:variant (keyboard:focus-visible:ring-2); fills and reveals onfocus-visible(a menu row'sbg-fill, a row's hidden button) need no gate. - Clicking into the composer changes its fill only (
--rc-composer-bg-focus); tabbing into it draws the ring on its card. Its text field has no separate outline. outline-noneis allowed only on a text field whose container already shows focus (the composer, a search capsule).
Two levels, both including the 1px edge ring and both light: half the
theme's --rc-shadow-color (--rc-shadow-soft, so #00000040 in the dark
theme and #0000001a in the light one), a small blur, close to the edge.
A raised surface is told apart by its edge and glass, not by a dark halo.
--rc-shadow-1(shadow-1,0 1px 1px+ ring): things resting above the chat: the jump-to-latest button, error cards over the transcript. (Toasts share a slight shadow under them,0 2px 8px -4px; the composer lifts with a slightly stronger0 3px 12px -4px.)--rc-shadow-2(shadow-2,0 2px 8px+ ring): things that open over everything: popovers, menus, tooltips, dialogs, the command palette.
Do not hand-tune a shadow on one component: the tokens are the whole scale.
The elevated utility is glass (--rc-glass-bg-strong) + shadow-2 +
rounded-xl: use it for every popover, menu, dialog, tooltip and hover
card. A tip adds only its inset and width: tipSurface
(ui/primitives.tsx) is that surface with the tooltip's text size.
One translucency, one recipe, for every floating surface: popovers, menus,
tooltips, dialogs, toasts, the composer and the lightbox. --rc-glass-alpha
(how much of the surface shows through) is the one token, read off
--rc-transparency (Settings › Appearance › Transparency, 0–60%, default 28%,
so 72%). The fills are
steps off it — --rc-glass-bg (surface-2 at --rc-glass-alpha),
--rc-glass-bg-strong at --rc-glass-alpha-strong (84%) for popovers, menus
and floating pills, --rc-glass-faint-bg at --rc-glass-alpha-faint (24%) for
a new thread's cards. The filter is not a token: saturate(1.15) blur(9px) is
written once, literally, in the glass-filter utility, and every surface that
blurs takes it with @apply glass-filter. WebKit's prefixed
backdrop-filter ignores CSS variables and paints no blur for one (WebKit bug
289800), its unprefixed property is behind a flag, and Linux's WebKitGTK is
that engine: a var() there left the glass translucent with nothing blurred
behind it (#3328). Both properties are written, the prefixed one being the one
WebKit paints with. Use .rc-glass or the elevated utility, never a
hand-made backdrop-filter. The glass is macOS's alone: Windows and Linux take
the solid tokens and no filter at all (Platforms, below), as does Reduce
transparency (the media query, or the system setting the shell reads) on any
platform.
Headers use the same filter tinted with the pane instead of a surface
(--rc-glass-pane, bg at 78%; 52% with .rc-frost over a new thread's
banner), through .rc-header-glass. Panes, cards and rows stay opaque. The
sidebar is opaque too, except in the macOS app: there lib/material.ts sets
data-material on <html>, the page goes transparent, and the sidebar is
tinted at the same Transparency over the window's native sidebar vibrancy
(the system's own blur). The window takes the app's light or dark mode
(window_theme) so the material matches the tint. Reduce transparency makes it
solid.
The one other use of that filter is the scrim a narrow window's side sheet opens
over, .rc-scrim: bg at 52%, blurred, with what it covers opaque behind it
(ui/RightPanel.tsx). No second filter is stacked on it: the sheet over a scrim is
a pane, not glass.
Nothing that draws the glass animates. A backdrop-filter under an element
that fades or slides is sampled from an empty group: the blur drops for the
length of the motion and snaps back at its end. So a surface that opens or
closes keeps its filter on a stable element and moves what is inside it — a
card's fill may fade (a colour, which no group follows) while its content
fades and rises.
What floats just above the composer is that same dense glass as one class,
.rc-glass-overlay (strong glass + shadow-1's edge ring): the strip of
threads working for this one, its group card — a row on the strip's
surface, not a second glass — and the jump-to-latest pill, so the three
read as one surface. Only their radius differs. Latest is both the
surface and the control, so its hover is a fill layer over the glass
rather than a hover:bg-… utility a class rule would beat.
The composer floats over the transcript as one card: the field, and under it one control row with
every control the send needs. Its / and @ menus are a solid drawer attached to the box's top
edge, each opened by the token at the caret, at the start of the message or after whitespace
anywhere in it: / lists commands, and @ lists agents, machines, threads and the project's
files under those quiet headings, in that order. Machines are listed once another computer is
paired: this one first, then each paired one, dimmed while it is away; picking one writes @Name
and the message says @Name (machine: <id>), the id the thread tools take in machine. @ shows a few rows of each section to begin with — what the
folder's picks pointed at last, the threads used last, and each harness's own models under a
sub-heading carrying that harness's mark (left out when a harness has one row that is simply the
harness by name) — and the rest of a section waits behind its Show N more row, which draws it in
place, with Show fewer under it to put the short list back. What is typed searches every item,
not only the rows on screen.
# opens the same drawer straight on the threads. A keyword
is the drawer's first row while what is typed is empty or still a prefix of it — @agents,
@machines, @threads, @files — and completing one keeps the drawer open on that group, so @agents pi
looks inside the agents for pi. The arrow keys walk the rows across the groups and never onto a
heading or a harness's name; ⏎ on Show N more opens that section and ⏎ on Show fewer closes it,
and Esc closes the drawer. Everything in the card starts on one left edge: the field, the chips,
the thumbnails and the hint rows at 20px (px-5); the tray at 12px (px-3), because its round
controls carry 8px of their own, which puts their icons on that same edge.
The composer takes the shared glass in the sidebar's own hue: --rc-glass-alpha of
--rc-sidebar behind the shared filter, a step denser while focused or over a
new thread's picture, so what it floats over shows through instead of stopping
at a slab. It has no edge of its own: the lift under it
(0 3px 12px -4px of --rc-shadow-soft) says it floats, and the only rim it
ever draws is the keyboard's focus-within ring, focus at 40%. The strip under
it uses the same fill with a 4% lift of the text colour
(--rc-composer-footer-bg), and no ring either. The new thread's picture cards
stay the see-through step (.rc-glass-faint) and everything becomes solid under
Reduce transparency.
The model picker puts its effort and account control above the search and model list, inset 12px from the card edges. The card stays fixed while its model list scrolls.
One scale, on Tailwind's 4px grid: every screen takes its gaps and insets from
it, and design.test.ts fails on a half step that sits between two of them
(the retired 10px 2.5 and 14px 3.5).
| px | Utility | Use |
|---|---|---|
| 2 | 0.5 |
a nudge: an icon against its label, an inset separator |
| 4 | 1 |
inside one control: the gap in a chip or a field |
| 6 | 1.5 |
compact rows and the gap between chips |
| 8 | 2 |
between controls in a row; a list's own gutter, a menu row's inline inset |
| 12 | 3 |
a row's block padding, a compact tile, a popover's content |
| 16 | 4 |
card padding, page gutter, a section title above its card |
| 20 | 5 |
the composer's field inset, fixed by its controls |
| 24 | 6 |
between sections, a page's top |
| 32 | 8 |
a page's bottom, the gap a long page gives its parts |
The insets every surface shares are named in ui/primitives.tsx and reused
rather than retyped: cardInset (p-4), rowInset (px-4 py-3) and
menuInset (p-2). A card's text, a settings row's text and a menu row's text
all start on the same 16px line, so the surfaces agree at their edges:
- Sidebar and header: the sidebar's list and its toolbar rows are
px-3(12px from the edge), a row ispx-2inside it withgap-0.5(2px) between rows, and a section header, a menu row and a toolbar button take the same 8px inset; the header floats atpx-2above the pane. A menu's item text lands on the same 16px line as a settings row's. - Settings: the nav column keeps
px-2rows; the page column ispx-4, so the breadcrumb, the first section title and the rows under it start on one line. A section ismb-6from the next, a titlemb-2above its card, and a row isrowInset(min-h-12, the control stacks under the text when the row is narrow). The page column ispt-4under its 48px header andpb-24. - Popovers and menus: the surface is
menuInsetwith rows atpx-2 py-1; a content popover (popoverSurface) is 12px, its own sections 8px apart. - Cards:
cardInset(16) for a card that holds content; a compact tile or a row inside a card takes 12, never 14.
The chat lane is 736px
(--rc-chat-content-max-width, 46rem) for the transcript's rows and the
composer alike, inset by a 12px gutter, 48px from the sm breakpoint. The
gutter sits outside the cap, on the transcript's scroller (with
scrollbar-gutter: stable both-edges, so a classic scrollbar does not move the
lane) and on the composer's wrapper, so a row's edge and the card's edge are
the same line at every width.
Settings › Chat › Chat width moves that one cap and nothing else: Wide is
72rem, Full is the pane's own width. The right panel is the one thing that
narrows the column: it is docked beside it in the same row, so the chat keeps
its lane and re-centres in the room that is left (Right panel below).
Inter (bundled, @fontsource-variable/inter, the same face on every OS) /
SF Mono. Settings › Appearance › Font picks Inter, System (the platform's own
face, below) or Rounded (SF Pro Rounded). Settings › Appearance › Text size
picks Default (the original compact scale in @theme), Large
(one more point for the reading sizes, captions unchanged) or
Larger (one more again, captions too); :root[data-text-size] swaps the
--text-* variables, so every text-* class follows. Sizes below are Default /
Large / Larger. Replies read at text-body on a 1.625 line height
(leading-relaxed, set on the reply's own scope so the app's rows keep
theirs), in fg at 90%, with headings at 26/21/18/16 (h1–h4) in
semibold, a step bigger than the body so a long reply scans by its headings:
| Class | Size / line (Default · Large · Larger) | Use |
|---|---|---|
text-caption |
11/14 · 11/14 · 12/15 | Metadata, badges |
text-sub |
12/15 · 13/16 · 14/17 | Sidebar secondary lines, section headers |
text-callout |
13/17 · 14/18 · 15/19 | Controls, chips, secondary copy |
text-body |
14/19 · 15/20 · 16/21 | Body, rows, tool rows |
text-title3 |
16/21 · 17/22 · 18/23 | Card titles |
text-title2 |
18/23 · 19/24 · 20/25 | Onboarding, a document's headings |
text-title |
23/29 · 24/30 · 25/31 | Empty-state heading |
text-[26px], text-[21px] |
26/31, 21/26 | A reply's h1, h2 (Markdown.tsx) |
The chat reads on two named line heights that follow the text size:
leading-chat (body + 10px, 24px at Default) for replies and sent messages,
and leading-chat-sub (callout + 7px, 20px) for a row's secondary line. Its
rhythm is tight, then airy (ui/transcriptHeight.ts): the steps of the work
(tool rows, thoughts, groups) sit 4px apart, 8px under an opened Worked for …,
other items of a turn 12px apart, a reply's blocks 16px apart, the footer 16px
under the answer and turns 28px apart. A sent message is px-4 py-2 on
rounded-bubble, at most 70% of the lane. A tool row is its 16px icon, the
title, a 2px dot and a text-callout summary in fg-faint, on one line; a
failed command keeps its title grey and ends on a neutral capsule with a red
dot and the exit code, which never truncates. The footer's actions stay in view
on the newest turn when it ends in a reply; an older turn's fade in (100ms) on
hover or focus in room the row keeps, and stay visible on touch.
Weights: 400 body, 500 controls and selected rows, 600 titles. Numbers
that change use tabular.
-
Live background (
ui/LiveBackdrop.tsx, engine inlib/backdrop/, ported from Sable, MIT): the one ambient loop. It draws in a Web Worker on an OffscreenCanvas (the main thread where that is missing), only while visible and the window is focused, rests to a still frame after 20 s without input or a running turn, sheds effects and frame rate under load, and holds still under Reduce motion. Its colour is the only colour outside the accent and the state colours: the harness's own (as its mark), or the accent. It answers moments with one-shot beats (fieldBeatinlib/backdrop/events.ts):sendfrom the composer,doneandfailwhen a turn ends. -
Hover: in 60ms, out 120ms (
--rc-hover-in,--rc-hover-out), colour only, set once inindex.cssfor every button, link, row, switch and menu item, and for the row the keyboard lands on. Components never addtransition-colorsor their own hover duration. Press:active:bg-fill-strong, no delay. Notransformon press (no scale): text re-rasterizes and reads as a flash. -
Hover is pure CSS
:hover(or Radix'sdata-highlighted). No hover state in React (onMouseEntersetting an id); a keyboard-driven list may keep a selected index, shown with the samebg-fill. A popover's menu row has neither hook, so it fills on:hoverand:focus-visibleitself. Row menus aremodal={false}, so other rows keep answering the pointer while one is open. -
Opening: popovers, menus, tooltips 160ms
--ease-snappy(fade + 4px); closing 120msease-in. Dialogs 180ms. -
Nothing animates layout on hover. Height transitions only for folding sections (
ui/Fold.tsx: the sidebar's sections, a Settings row's details, an inline add form, a card a feature switch turns on), and for the composer's field, which grows and shrinks with its lines over 150ms--ease-snappyinstead of jumping between them; the transcript stays pinned to its end as the card rises, so the last line never goes under it mid-animation. -
Panels and sheets never animate the room they take across the chat as a matter of course: every frame of it reflows the transcript, so a slot's
width,height,topor grid rows only change on the one animation that is about the slot opening or closing — the right panel docking in and out, which runs 200ms--ease-snappy(ui/RightPanel.tsx), and the composer's field gaining or losing a line, which the pinned transcript follows. Every other width a panel takes — a tab switching it, the window resizing it down, the end of a drag — is committed with the transition off in the same frame, so nothing glides. A panel's left edge also widens it frame by frame while it is dragged: that width is written to one custom property on the dock, never to React state, which is committed once the pointer is up. Animate onlytransform,opacityand those two; neverfilterorbox-shadowon something that moves every frame. -
Toasts rise in with
rc-toast-in(220ms, from 10px below) and drop away in 140msease-in(at a top positionrc-toast-in-topandrc-toast-out-top, from and to above); a drag slides it toward its edge only (other ways rubber-band at a sixth) and it snaps back or flies off that edge in 160ms, and a card shown meanwhile takes the top of the stack. At rest only the front card is in flow, the ones behind peeking 6px above it; hovering or focusing the stack fans them out 8px apart (transformonly). -
A new transcript row rises in with
rc-row-in(260ms, fade + 6px), once: rows there when the thread opened, or remounted by the virtualizer, do not. A status dot that appears pops in (rc-dot-in); a segmented control's selection slides (translate) to the new segment. A count that changes rolls its digits vertically in 220ms--ease-snappy(ui/RollingNumber.tsx), keeping each column's place from the right, so 9 → 10 rolls the units and grows a tens. -
A message sent from the composer flies instead of rising: it starts a little inside the field's card (at 96%) and lands in its row in 220ms
--ease-snappy,transformandopacityonly, so nothing around it moves (lib/sendFlight.ts). The composer is found by the marker on its card. It starts at the card whatever the gap above it, so a message whose row rests above the field (its ownWorkingline, a reply already streaming) rises into place instead of fading where it stands; the row travels at most 220px. Only a message typed here flies, and only once: the item the app sends from the composer is marked (thread.tsbeginTurn), so a wake, a resume, one another thread or a view sent, and the history a thread opens with keep the plain row rise, and a flight is never replayed by a re-render, a closed turn, or opening the thread again. The field it left fades back in empty over 160ms rather than blinking.prefers-reduced-motiongets the fade alone. A message sent from the new-thread screen does not fly: it is drawn where the thread's own first row will keep it (the lane's cap, 20px under the header) and arrives from 8px below over 160ms (rc-send-in,--ease-snappy), while the composer glides from the middle of the chat to the foot. A session can exist in a single frame, so the thread takes the screen when that entry has played and not before (at most one entry,PENDING_ENTRY_MS): the screen it keeps draws the same row in the same place, at rest, so the hand-over itself moves nothing. A harness slower than the entry is already past it and takes the screen the moment its session exists. And each of the send's own updates gets a painted frame of its own (lib/frame.tsafterPaint): the pending screen is drawn beforesession/newis asked for, and the message's row before its prompt is built, so an in-process harness cannot fold all of it into one frame. -
A steering note landing in a running turn: the queued row it took from the stack glides 14px up toward the transcript and fades there (
rc-steer-away, 240ms--ease-snappy,transformandopacityonly, and it collapses under reduced motion), and the note's marker appears where the turn read it — on the plan card's active step, else under its message — without moving anything around it. -
A row mounts at the size the transcript already reserved for it:
estimateSizeis the row's own air (rowGap) plus its content, and a measured row keeps both. An estimate that left the gap out, or guessed a liveWorking for 12sat 24px when it draws 35, was corrected a frame after mounting — and a pinned transcript takes that difference back in one step, moving every row above it, the message just sent included. -
A streaming reply's new words fade in once each (
rc-reveal, 280ms, fromopacity: 0and a 4px blur, 18ms apart, no word waiting past 180ms).lib/reveal.tswraps only the words that arrived in the chunk, and only in the last block, so the text already on screen is plain text: nothing fades twice, and a finished reply has no spans and no animation. The blur is the onefilterthat animates: 280ms on a handful of words, never on a box that moves. Settings › Appearance turns it off; reduced motion does too, and Windows and Linux never paint it (Platforms). -
A value that changes in the Statistics tiles when the period does rolls instead of blinking: a count digit by digit (
RollingNumber), a cost or a compact token total up into place once (rc-roll, 240ms,transformandopacityonly). -
Skeletons sweep once every 1.6s (
transformonly, on the compositor). -
prefers-reduced-motion: all durations collapse to ~0; shimmer and the skeleton sweep stop.
The design is drawn on macOS; Windows (WebView2) and Linux (WebKitGTK) get the
same layout with their own type. lib/platform.ts
sets data-platform="mac|windows|linux" on <html> from the web view's user
agent before the first render (main.tsx); a browser (the mock, dev:web)
is always mac, or the one a dev build's ?platform=windows asks for. Every
rule for another platform is a token override under
:root[data-platform=…] at the end of index.css, never a per-component
branch, and nothing applies to mac or to a page without the attribute, so
the macOS look is the base rules alone. The few controls that are not a token
override — the banner's blur radius (ui/NewThreadBanner.tsx, off through
paintsBlur() in lib/platform.ts) and the window's own title bar and its buttons — ask appPlatform(),
which reads that attribute. To look at Windows in the mock, open it at
/?platform=windows (bun run mock-window open "/?platform=windows"), so the
first render is already that platform.
The in-app glass is the same on every platform: Windows (WebView2) blurs it
like macOS, and Linux does wherever WebKitGTK composites, turning it solid
elsewhere. The window material and the decorative blurs are macOS's alone. The chat background's Blur setting is not
painted there either: the effects worker bakes it into the picture once
(boxBlur in lib/bannerEffects.ts).
| macOS | Windows | Linux | |
|---|---|---|---|
Sans (--font-sans, --font-rounded) |
Inter by default; System: SF Pro / SF Pro Rounded | Inter by default; System: Segoe UI Variable Text, Segoe UI | Inter by default; System: Inter, Cantarell, Ubuntu, Noto Sans |
Mono (--font-mono) |
SF Mono, Menlo | Cascadia Mono, Consolas | JetBrains Mono, DejaVu Sans Mono |
| Font smoothing | antialiased |
system (ClearType) | system |
| Glass | the recipe above | the recipe above | the recipe above; solid surface-2 without compositing |
| Window material | sidebar vibrancy, through the sidebar's tint |
none (opaque window) | none |
| Word reveal | fade + 4px blur | fade only | fade only |
| Popovers, toasts, What's New open | scale + fade | scale + fade | slide/fade, no scale |
- Windows and Linux keep the frosted surfaces. On Linux, WebKitGTK paints a
backdrop-filteronly with accelerated compositing, which the environment can take away; the shell'swebview_blursays so andlib/transparency.tsthen turns onreduce-transparency: glass and popovers opaquesurface-2, the composer and the sidebarsidebar, the header and the scrimsbg. The release CSS must keep the unprefixedbackdrop-filterfor WebView2 (seeglass-filterinindex.css). The streaming reveal drops its 4px blur, and the new thread's banner turns its own blur and its glow off (ui/NewThreadBanner.tsx): the decorative blurs stay macOS's. - Windows' window is opaque (
"transparent": falseintauri.windows.conf.json): it has no material. The shell used to apply Mica when it built the window, and the page showed it through the sidebar alone; both are gone, since a material behind a solid page bought nothing and the transparent window only added a fallback of its own. Windows has no native decorations either, so the shell draws the window's own minimize, maximize/restore and close at its top right (ui/WindowControls.tsx); Linux keeps its native title bar. Linux has no window material either: Tauri cannot ask a compositor to blur behind the window. - Settings › Appearance › Reduce transparency makes all glass solid on any
platform (default off). The system's request does the same: the media query
where the web view has it, the shell's
reduce_transparencyon macOS. The sidebar goes solid too. - There is no rounded face off macOS, so Settings › Appearance › Rounded keeps the system face there.
- WebKitGTK often composites in software, so on Linux nothing animates
filterorscale; durations stay the ones under Motion. - A Smart UI page takes the app's
--font-sans/--font-monooff macOS; the terminal's font list ends in the Windows and Linux faces after Menlo. prefers-reduced-motionand Reduce transparency apply on every platform.
One Tooltip (ui/primitives.tsx) and one HoverCard recipe, both timed by
lib/hover.ts: the pointer rests 300 ms before a tip appears, a tip the
pointer has left keeps its place 80 ms (a slip off and back changes
nothing), and a target entered while a tip is open — or within 400 ms of
one closing — takes the tip over at once, so reading along a row of
buttons never waits. A press, Escape, a scroll, a resize, the window losing
focus or the target going away puts the tip out, and nothing brings it back
on its own: a click's own focus is not a reason for a tip, and the next one
waits for a fresh pointer enter. The keyboard opens tips too, under
data-keyboard-nav like every focus ring.
A tooltip and a hover card never close each other: they are one behaviour on two tracks, so a tooltip on a control inside the usage card (its context tiles) shows over the card instead of taking the card out from under the pointer. Only one tip of a track is ever on screen.
Both sit on tipSurface (elevated rounded-xl text-callout text-fg, the
xl radius) and share surfaceCollisionPadding (8px from the window's
edges). A tooltip adds pointer-events-none px-2 py-1 max-w-80, opens on
top by default, 8px from its trigger, and flips when there is no room; a
hover card adds p-3 and its own width, and takes the pointer only when it
has controls in it. Controls in the composer open theirs below, clear of the
box. Inside a popover, hints are secondary text, not tooltips.
The enter and exit are the popper rule in index.css (160 ms
--ease-snappy in, 120 ms ease-in out), one motion for every tip: no tip
carries an animation class of its own.
A pointer on everything clickable (buttons, rows, chips, switches, radios,
tabs, menu items, links), set on the control so its children inherit it;
the default arrow on static text; the text cursor only in fields and
.selectable text. Disabled controls show the arrow.
Hugeicons' free stroke-rounded set at stroke 1.5 (2.5 for chevrons at 10–12px),
imported from ui/icons.tsx under the Lucide names, with Lucide's props; never
import lucide-react directly. The four shapes the set has no match for (the
raised hand, CircleDot, SunMoon, GitBranchPlus) are Lucide drawn at the
same weight in that file. Sizes, and no others
(design.test.ts checks every size={n} in ui/): 10 for a glyph inside a
status dot and a spinner in a caption line, 12 inside chips and caption rows,
13 in menus, 14 in toolbar and composer buttons, 16 in page headers and tool
rows, 18 in empty states, 24 for a page's own mark. Icon colour follows text (text-fg-muted idle,
text-fg on hover).
Overlay where the system allows (macOS default), thin elsewhere:
scrollbar-width: thin in scrollbar, transparent until the scroller is
hovered or scrolling, and scrollbar-gutter: stable on long scrollers so
content never shifts when a classic scrollbar appears.
Shape rule: what you press or pick is a pill, what holds content is a
rounded rectangle. Pills (rounded-full): labelled buttons (Pill, never a
circle), segmented controls and their items, status chips, toolbar clusters,
switches, selects, the composer's footer chips, and the chat header's machine
pill and side-panel toggle (a quiet pill that names the tab it opens, the
panel icon before the name). A labelled button with an icon always has a fill;
quiet (no fill at rest) is for text-only actions. Settings' Action is
Pill, so every labelled button in the app shares one shape.
Rounded rectangles from the scale: text fields (rounded-lg), icon
buttons (rounded-md, rounded-sm in dense rows), cards, rows, menus and
panels. Circles only for icon-only round buttons (send, stop).
Buttons inside a callout's actions are rounded-md, one step below its rounded-lg, and centred on its message.
Rows are rounded-md (sidebar thread rows rounded-xl in the default comfortable
layout, rounded-lg in the opt-in compact one), menu items and cards rounded-lg,
menus, popovers and panels rounded-xl.
The shared controls are in ui/primitives.tsx; use them instead of restyling
a raw element. ?catalog in a dev build shows them all on one page.
- Button:
Pill, 24, 26 (default) or 30px high. Secondary by default (bg-fill text-fg, hoverbg-fill-strong);prominent(bg-fg text-bg, hover 90%) for the one primary action;danger(bg-danger/12 text-danger);quiet(transparent,text-fg-muted, hoverbg-fill text-fg). Icon:ChromeButton, orClusterButtoninside aCluster. Disabled: 40% opacity, no hover. - Select:
Selectfor one choice from a list, native<select>never: a pill trigger with a chevron, opening a menu with a check on the current option.Segmentswhen two to four short options should all show: abg-filltrack with the picked segment on a white pill that slides to it (bg-knob,text-knob-fg), the others muted;Choice(settingsKit) is the same pill track and selected pill inside Settings' cards. Both tracks fit their segments (w-fit), so a flex column never stretches one into a full-width track with its buttons at one end; a toggle that spans its card (the usage card's Before / After) passesfilltoSegments, and the segments share the width equally. - Switch: the track is 44×20 px (
bg-accenton,bg-fill-strongoff) and its thumb a 28×20 px white pill knob (bg-knob shadow-knob), as tall as the track and sliding from x=0 to x=16 over 200 ms. - Slider:
Slider(settingsKit) for a whole number in a short range, such as the delegates one thread may run at once: the native range (so arrows, Home and End work), a thin track filled with accent up to the white thumb, the value vertically centred beside it and the ends of the range under the rail. The native thumb is the knob too (.rc-rangein index.css): the browser would draw it in the accent colour. Its focus ring is the global one, drawn by the.rc-rangerule because the base layer takes the outline off every field. - Chip:
Chipfor a row's short state — signed in, not signed in, active, stale — tinted 12% in its tone, never a coloured border. - Input:
h-8 rounded-md bg-fill-subtle px-3 text-callout, placeholdertext-fg-faint, no ring until:focus-visible. A control in a Settings row takesfieldClassinstead:bg-fill, hover and focusbg-fill-strong, and still no edge. The row'sActionrests onbg-fill-subtle, hoversbg-filland pressesbg-fill-strong, so it never reads as a second input. - Chip:
h-6 rounded-full bg-fill px-2 text-callout text-fg-muted; status chips tint with their colour at 12–14%. - Row (list):
rounded-md px-2 py-1, hoverbg-fill-subtle, selectedbg-fill+font-medium; the hover action button appears with opacity only (no layout change). - Card:
rounded-lg bg-surface p-4, no border; rows inside separated bydivide-border. - Menu:
menuSurface(elevated p-2) withmenuItemrows (rounded-lg px-2 py-1), highlightedbg-fill(not accent); destructive rows addmenuItemDanger;menuSeparatorandmenuLabelbetween them. For 3–5 frequent, icon-friendly actions, putMenuQuickActionsfirst: equal square columns with a 16px icon over a short caption,fill-subtleat rest andfill-strongfor a toggle that is on. Pass the menu's ownItem(DropdownMenu.Item,ContextMenu.ItemorCardMenuItem) to preserve activation and closing. Full action names live in accessible labels and tooltips. Left/Right move across the row; Down enters the list, and Up returns to the quick row. Pickers, long command names and destructive actions stay as ordinary rows. Popover:popoverSurface(elevated p-3). - Dialog:
elevated rounded-xl p-5over abg-bg/60scrim. - Toast:
.rc-toast rounded-2xl(the composer's surface, edge and glass with a soft lift), 340px wide,py-2 pl-4 pr-2 text-callout: a 6px tone dot (infobg-fg-muted, successbg-success, errorbg-danger, a spinner while it has progress), the text intext-fg(up to 3 lines), at most one action as an outlined pill (h-6 rounded-full ring-1 ring-border-strong text-sub, label only), and a close button that is collapsed until the card is hovered or the button focused. The card is as tall as its text. Progress is a 2px accent bar along its foot.Toastershows at most three (state/toasts.tsenforces the queue), newest in front: at rest only the front card is fully shown, the others taking its height with their text hidden and peeking 6px past it, and hovering or focusing the stack fans them out 8px apart, away from the window edge. Settings › Appearance › Toast position puts the stack 16px in from the bottom-right corner (the default, away from the transcript being read), the bottom-left, the top-right or the top center (52px down, under the header); at the top it stacks and enters downward. No timer line: a card's clock is not drawn. A card replaced in place from spinner to dot settles onto the dot. The same message again refreshes its card and restarts its time instead of stacking; past three, the oldest is dropped. Info and success leave after 2.5s, errors after 5s. The pointer or focus on the stack, a drag, and a window in the background stop every clock, which resumes with what was left. A click anywhere on the card, ×, Escape (after a draft or an open overlay has taken it), or a drag toward the card's edge (left in the bottom-left corner, right elsewhere) past 48px or a quick flick that way dismisses; the card slides that way only, rubber-bands any other way, snaps back in 160ms, and never selects text. Use a toast for what is not tied to a message (copied, engine events, errors of an action), not to repeat what the screen already shows (no pin, archive, theme, harness-switch or steering notice); an error about a thread's turn stays an error card over the composer. No banners. - Title row: the window's title row is one row (44px on macOS, 36px elsewhere) with no brand in it:
the traffic lights (
trafficLightPositionx 20, y 30, centred on the row) and the sidebar's toggle with Settings beside it (the same two buttons, in the same place, whether the sidebar is open or hidden; Settings shows a small amber dot while a paired machine is not connected); the main column's header shares its height and line (ui/Titlebar.tsx). The app's name and version live in Settings › About. - Sidebar sections: one Threads list, always open, under Pinned when
anything is pinned, then the Snoozed and Settled shelves at the foot, under
one hairline, each a one-line header with its count and a chevron that folds
it. Every shelf folds on its own and the choice is kept per shelf
(
rustcode.sidebar.<shelf>Open; Snoozed and Settled shut by default); a shut shelf still shows its count and the dot for a thread that needs you or works. Threads leads with the threads whose turn runs and the threads waiting on work they handed out, the one the user last sent work to first, then the threads that have an approval or a question open, longest wait first, and then the rest, the one that last came back to the user first with unseen completions and failures above it. What asks you is not called "Needs you" in the list: the row above the list carries that name because it counts items — an approval, a question, a failed turn, a delegate — and opens the page that lists them, while a thread in Threads says "Needs you" in its own chip, and a failure never moves a thread. A section sorts from marks the app already keeps, so it never reorders as turns stream, and a row the user dragged keeps its place. Turning Working at the top off (⌘K,rustcode.sidebar.workingSection) gives back the layout before it: Pinned and Threads lead, Working folds into the foot shelf with Snoozed and Settled. A settled thread never sits under Pinned, and a pinned thread that works or needs you stays in Pinned and says so in its chip, never drawn twice. A section header never folds and is always open, so arustcode.sidebar.foldedvalue an older release stored for one (working,threads) is dropped on mount; a project's folder (project:<path>) is kept. Threads from every paired machine share the one list; a thread from another machine carries its glyph and name in muted text on its meta line, and a thread from this computer names this computer only when the filtered rows span several machines (docs/desktop.md › Several machines). The Needs you badge counts distinct threads in the active filter; opening it still opens the full inbox. Under the Needs you row sits the sidebar's toolbar (ui/SidebarToolbar.tsx), on by default and turned off in Settings › Appearance or ⌘K: a search field that narrows the list as it is typed (title, project folder, branch; it opens shut shelves and folders, ⏎ opens the first match, Esc clears), the Sort and filter menu (sort by Title, Activity or Last updated; Only this project, Group by project, Working at the top, Compact rows), and New thread. A filter that hides threads always shows: "Only " is a chip under the field with its own clear button, and the menu button carries an accent dot while anything differs from the default. Title is the default sort, so rows stay put while threads work and finish; Activity is the only one that moves rows as turns start and end. Project folders (Group by project) are always A–Z by name, whatever the sort. Threads settle after 3 idle days unless Settings › Appearance › Settle idle threads says otherwise (Never, 1, 3, 7 or 14 days). The foot carries no buttons: Settings lives in the title row. ⌘K finds threads too and holds every one of these options, plus Add project folder, Open Git, Open Usage and Statistics, each with the shortcut it has. A snoozed row shows when it wakes where the age goes. Snooze (presets, or Custom…) is a submenu of the row's menu. A snoozed thread keeps its place in the shelf until its time is up: it works, waits on an approval or a question, and finishes there without coming back to the list, counting in Needs you, badging the Dock or notifying the system, and nothing it does marks it unread. Its folded shelf shows its count and no dot either, so what it hides is not news until the snooze ends. It comes back when its snooze ends — or when the user writes in it — with the state it reached then, and one notification at most, for a request that waits or a turn that ended unseen. Section and project headers are one 32px line oftext-body(14px) infg-muted, with 14px folder icons: the label, a dot for what a folded group hides, a count only while it is folded, then the chevron. - Sidebar rows: project threads line up with their project header; only
delegates are indented. A full-width New thread
button sits above search, and a hairline and the Threads label set it apart from the
list. A detailed thread row is a fixed grid of two lines, 54px tall, with
rounded-xl(ui/Sidebar.tsxROW_GRID), so every row has the same height. Line 1 is the project mark and the title, in one weight whatever the thread does, then the state as an icon and a word in its tone, medium weight, as T3 Code's sidebar has it (Working turns slowly; Approval, Input, Waiting, Failed, Done, Review), then always a time: the running turn's clock, else its age. The hover actions take the state's place. Line 2 starts where the title does: where it runs (state/sidebarGroups.tsrowWhere: a worktree's branch, a branch off the default one, or a subfolder), cut in the middle at its real width (ui/MiddleTruncate.tsx, adapted from T3 Code), else the computer it runs on; then delegates, the pull request, a remote computer's glyph, and against the edge the harness mark with its model name, never cut. The Threads label carries no count and sits close above its rows. Each line is a left part that truncates and a right part against the row's edge that takes what it needs (as wide as its state or age at rest, widening to 76px for the three 24px hover actions), so the right side is never cut and every right edge lines up. Line 1: the project’s 14px mark, pin, fork or side-chat glyph and the title (text-body); at the right, one state byrowStatusas an icon and a word in its tone (Workingwith its clock inaccent,Needs youinwarning,Waitingmuted,Failedindanger,Doneinsuccessuntil the thread is opened,Reviewinaccent), else the hour a snoozed thread wakes, else its age (5m,3h, with a check before it when settled). Line 2 (text-sub,fg-muted): the working folder (home as~, a worktree's own folder), middle-truncated with the full path on hover, including under project headings. At the right, the harness mark and model (harness name when no model is known), then the running delegate count, pull request and machine glyph. Machine names appear on hover. Remote rows always keep their machine glyph; local rows show it in a mixed list. Branch and activity details stay on the hover card. Approval and question rows keep their sort position and state indicator. Renaming edits the title in place at the row's height. Counts are shown only for a thread the app has already read. What wants you — a request, a failure, a turn that ended while you were elsewhere, the open thread, a picked row — is weight 500 in fullfg; what works, waits or is settled recedes to weight 400 at 75%, back to full on hover, with its mark at 60% so a column of marks never competes with the titles. Hovering swaps line 1's state for Pin, Settle (or Unsettle) and the menu; the slot widens to their 76px and the title gives up that room, so nothing is drawn over text. Dragging a row slides the rows it passes aside to open the place it would land in, and near the list's top or bottom edge the list scrolls (ui/sidebarDrag.tsx). Logic:state/sidebarRows.tsrowStatus. - Delegated threads: a thread an agent started has no row of its own while
its parent exists, and it is nested from its first frame: the parent
is recorded on the thread when it is created (
_meta.rustcode.parent, carried by the rowsession/newadds), so a thread being spawned never shows as a row of its own in between. The tree is resolved against every session, so a project filter or a search never turns a delegate into a top-level row. Its parent's second line counts them (see Line 2); a group card in the chat draws a stack of at most three 16px circles (ui/AgentStack.tsx), each with a 1.5px ring in the sidebar's surface so the overlapping marks stay apart, the harness glyph filling 60% of the circle, the circles overlapping by 30% of the diameter, then+Npast the third. A mark never spins: the row's one spinner is in its trailing slot, so the stack stays still and what it cannot say in a glyph is in its tooltip. What needs you comes first, and the stack's state is one badge for the whole stack rather than one per mark: an 8px ringed dot on the last circle, inwarningwhen something needs you, indangerwhen something failed; finished delegates draw neither a badge nor a count. The slot is a fixed 74px, so a count going from one to three never moves the title's start, the age or the status; it ends on the same right edge as the chip above. In front of the marks a row that works for another thread shows ↳, and nothing counts messaged threads: the threads it started are the marks, and one it messaged is what makes the chip sayWaiting. Hovering lists the running threads and their state, and the row opens the parent. The open delegate itself is drawn as a compact one-line indented row, with a thin inward elbow, directly under its parent's row, unfolding in with the list's fold motion and folding away when the user opens another thread or goes back; the threads between it and its nearest row of its own come with it, and a parent in the Settled shelf opens the shelf and its slice far enough to be reached. A delegated thread whose parent is gone from the app entirely keeps a row of its own: with no parent row to sit under, nesting it would take it out of the app altogether. A search lists every match, delegates included, each row sayingin <parent title>rather than un-nesting the tree. In the chat's group cards the same stack reads at 20px with asurfacering; once all are done it shows the finished marks instead, with no spinner and no badge (the text beside it saysdone). Logic:state/agentStack.ts,state/topLevel.ts. - Thread details: the right panel's first view (
ui/ThreadDetails.tsx), the one a thread opens on: what the thread is and where it works first (folder, terminal, branch, changes, pull requests), then what it is as facts. The threads it worked with are oneThreadssection, grouped by what the relationship is in the words ofdocs/terminology.md:Started(a task handed to a new thread) andMessaged(a message to a thread already running), each heading carrying its count and one line saying which it is. The thread above this one readsStarted fromorWorking for, orMessaged by. A row is the thread's own name, its state word, and at its end what the sidebar's row for that thread ends with: the review mark when it waits for review, and its age in the same short form (4m,2d).Starteddraws its delegates as a tree (ui/DelegateTree.tsx, the rules instate/delegates.ts): the threads it started and the threads those started, each row a harness mark, its name, its state word, the work time and the best-known cost of its branch, indented under a tree line. A parent's figures are the sum of its whole branch; time counts only while a thread works, so a wait on an approval holds the clock still, and a cost no turn reported is—, never a zero (≈marks an estimate). A branch that finished folds to one line, opening a node folds the one open beside it, and its reply button shows the last answer in place. A Board card carries the same tree as one line (3 delegates · 1 working · $8.71). Its subagents are their own section, said to be helpers inside this thread and not threads. - Sidebar selection: one tab stop for the whole list, on the row the
keyboard is on (the open thread — an open delegate is a row of its own while
it is open — else the first): ↑ ↓ move it through the rows on screen,
including an open delegate's indented row, skipping shut sections and project
groups, ⏎ opens the thread, Esc lets the
selection go. Keys in a field inside the list (the
rename box) stay the field's, and ⌘/⌃/⌥ stay the app's. ⌘-click toggles a
row into the selection and ⇧-click takes the range from the last one clicked;
picked rows are
bg-accent/12+font-medium, which is not the open row'sbg-fill, and a plain click opens the thread and lets the selection go. A thread that leaves the list leaves the selection. With more than one picked, the row's menu and a bar under the list (3 selected, Pin, Settle unless all of them are settled, Unsettle while one of them is, Clear) act on all of them, with one toast and one failure message for the lot. - Skeleton:
Skeleton(.rc-skeleton):fill-subtleblocks the shape of what will appear (a text lineh-3, a meta lineh-2, a pillrounded-full), radiussmunless the real thing is rounder, varied widths so it does not read as a grid. Use it where content will appear (thread rows, the model pill, a transcript, Settings lists), never a spinner with "Loading…". A container of skeletons hasrole="status"and a label. Long waits on something that is not content (the engine starting) get a toast after 2s instead. - Header:
MainHeader, the sidebar's 52px title row's height, so the two are one line through the traffic lights,.rc-header-glassfloating over its view (absolute, z 10): the view starts its contentHEADER_HEIGHTdown and scrolls under it, and the glass fades out over 24px below the header's edge, as the transcript fades above the composer. Every view that has a header uses this one (the chat, new or open); the Settings panel brings its own. On Windows it keeps the window's own controls (ui/WindowControls.tsx) their room at the window's right edge. - Settings: a floating panel over the app, not a page of it: a centred
max-w-[80rem] max-h-[60rem]panel insidep-1 sm:p-6 lg:p-10(about a hundred px in from the sides at 1512×945, a small inset in a narrow window),rounded-2xl bg-bgover our raised shadow, which draws its edge, on abg-bg/60scrim; the shell stays mounted and inert behind it. A press on the scrim, Esc, ⌘, or the header's close button puts you back where you were. The panel takes focus when it opens, never its first control. A 240px nav column inbg-sidebar— its own step over the page, no divider at its end edge — holds a 32px search field, then the pages under shorttext-calloutheadings (Setup,App,System), or the results while there is a query. Nav rows areh-8 rounded-md px-2with asize-4icon,text-body; the open one isbg-fillinfg, the others muted and filled on hover. The nav is flat: one row per page, in every state, with no list of that page's sections under it (a page's sections are its headings, in the content), so a page switch never moves the rows around it. The content has its own 48px header — the breadcrumbSettings / General(the first part muted) at its start, "Restore defaults" and the close button at its end — with a hairline under it, and the page scrolls beneath. One page shows at a time in a centredmax-w-[760px]column,pt-4, its rows keeping thepx-4inset the section titles share. "Restore defaults" shows only while a row on that page differs from its default, and puts back every changed row at once with one toast. Picking a result opens its page and lights the row it found (rc-setting-hit, afillfading out over 1.2s). - Settings section and row: a section is its name in
text-base font-semibold text-fg,px-4,mb-2above one group card,mb-6below it before the next section. The card isrounded-xl bg-surface, one step over the page and no border, its rows divided by aborderhairline. A row isrowInset(px-4 py-3): its titletext-sm font-medium, its descriptiontext-callout leading-normal text-fg-muted, its control at the right, and the control stacks under the text when the row's own container is narrow; wide controls can be stacked below the description at any width. Buttons and segmented tracks and items are pill-rounded; controls useh-7(28px) andbg-fillover the card (hover and focusbg-fill-strong), with no edge, so the same control reads at every nesting depth; switches keep their own shape. - Settings titles, two levels: a section that holds several named cards (an
account under its harness in Usage, a source under Skills) names each card
with
minoronGrouporSectionTitle:text-body font-medium text-fg-muted, anh3. Twotext-title3titles never stack. - Settings buttons, by place: a section header's actions are
size="sm": the one that adds to the section ("Add server", "New skill", "Add machine") takes the default fill, its companions ("Edit config", "Check all") arequiet, and none isprominent. In a row,prominentis for the one thing the page waits on (a restart to apply, the pairing code); a repeated row's action ("Sign in", "Revoke", "Check") is the default fill, so a list never shows a column of white pills. Labels are sentence case ("Restart server"). - Settings choice tiles: a pick between a few large options (the hosted
agent to connect) is told by fill, never by an outline:
bg-fill-subtleat rest,bg-fillon hover,bg-fill-strongfor the picked one. - One arrow circle: reset, restore defaults, restart, retry, run again and
refresh all show the same arrow-circle icon (
RefreshCw;RotateCcwandRotateCwdraw it too). A setting that waits for a server restart showsRestartToApply, never a hand-built row. - Settings text with code in it: a title, note or hint that names a command
goes through
withCode(settingsKit), which sets each backticked part in code type onbg-fill; the backticks themselves are never shown. - Settings row, description and hint: a description is one short line
(about 90 characters at most): what the title does not already say. Anything
longer a person may need goes in
hint, a tip behind a small info mark after the title (RowandGroupinsettingsKit), opened on hover or keyboard focus. Group footers follow the same rule. - Settings feature switch: a section that turns one feature on (Voice,
Computer use) carries its switch at the right of its name (
Group'senabledandonEnabledChange). Off, the section is that one line and its card and footer fold away, so an unused feature costs one row; on, its rows show under it. - Settings row, reset: a row keeps the reset button of the bullet below where the value differs from its default.
- Tooltip:
tipSurface px-2 py-1(see Tooltips and hover cards). - Composer: one card,
.rc-composer(radius--rc-composer-radius, 20px, the2xlstep), with no padding of its own: every text row in it is insetpx-5(20px) and each keeps its own air. The message row ispx-5 pt-4, andpx-5 pt-1.5while pictures sit above it: their band carriespx-5 pt-5 pb-1, so the field stays close under the thumbnails instead of doubling the gap, and a field with nothing above it keeps the card's own 16px. The field itself carries 6px (py-1.5) above and below its text inside the scroller. The control row at the bottom of the card ispx-3 pt-1 pb-3, its round controls carrying a few px of their own, which puts their icons on the same 20px edge. The sidebar's hue at--rc-glass-alpha, behind the shared filter, has no edge and no inner highlight, only the lift under it, and a quiet focus-within ring for the keyboard. The card clips to its own corner. The editor reads attext-body leading-normal(21px, a hair tighter than a reply's 1.625, so a draft reads as something being typed), one line at rest above the control row and 208px at most, then it scrolls; its text carries 6px above and below inside the scroller, so the padding scrolls with it and the first and last lines keep their room (the box is sized to whole lines plus that padding, so one line sits centred between its two paddings rather than at the top of an empty second line, and the first new line grows the field a line instead of jumping). The edge it is cut at fades over 20px (mask-image,.rc-field-fade, whose two edgeslib/fade.tsdecides): the top once it is scrolled down, the bottom while there is text below, and neither when the draft fits, so a short message never dims. Typing at the end of a draft that scrolls takes the field to its very end, so the line the caret is on is never inside a faded band. A slash-command chip in front of it is that same line box, so it keeps the field's baseline. Tokens in the draft are drawn by a mirror under the field, not by an editor (the way T3 Code's composer keeps references in the text): the field's text is transparent over a copy that sets each URL on an accent pill, and each@filereference,#threadmention and@agenttoken on a quiet one (state/compose.tssplitTokens). The mirror prints exactly the draft's characters, token by token (mirrorText, which a test holds to the draft), and a token changes only its fill, its colour and its radius: never the font's weight, size or spacing, which would make the mirror wider than the field and drag the caret and the wrap points off the text. The two take the same padding, scroll and mask, and a token's span adds no horizontal padding — that is what keeps the caret on its character. The field's height is measured on an off-screen twin of it (same font, leading, padding and width, no transition,lib/fieldHeight.ts): reading the field's own box while its height animates reports where it still is, so the twin is asked instead and the field is given the final height once, which lets its 150ms transition run from the height it had to the height it needs — growing and shrinking alike. Under the field is the card's own row (28pxcontrols,.rc-composer-traysets their height): the attach button (+, a 16px mark at a true 2px stroke on the send circle's own diameter, so the row's two ends read as one pair) at its start, then the working agents, the model and send/queue/stop at its end, with no divider above it — the air between the field and the row, and the row's ownpt-1, separate them. The model reads as its harness's icon and its name, plain on the card,bg-fill-strongonly while its popover is open; beside it a second, quieter pill names the effort (or, for a harness that sets its own, the login it runs on) and opens a small menu: the model's levels from lowest to highest with its default marked and the current one checked, Reset to default, Fast mode as a switch when the model has it, and the harness's logins while it has more than one. The + rests onbg-fill-subtle(bg-fillon hover). The model popover is 360px wide: a rail of harness icons on the left (a tooltip names each, the browsed one is filled with a 2px accent mark on its edge, an unavailable one is dimmed and its tooltip says why), and beside it a search over that harness's models with the current one checked; typing searches every harness, each row then led by its harness's icon. The card is as tall as the longest harness's list (so moving along the rail never resizes it), up to the room the window has under the pill, and only the list scrolls. The search has focus on open, ↑/↓ move the highlight (the current model until the user moves), ⏎ picks the model and closes the card, ← at the start of the search moves to the rail, where ↑/↓ move between harnesses and → returns to the search. - New thread screen: a centred heading and a rotating tip above the field and its strip, with optional cards below.
The project name in the heading opens the folder picker; there is no path line or starter prompts.
Neither the heading nor the tip sits in a pill: over a chosen picture both take
.rc-text-over-image, a halo of the pane's colour (a crisp 1px stroke plus tight and wide lifts, white or near-black with the theme) that holds the glyphs off the photo, and the tip reads infgrather than muted there, so a dark photo's scrim cannot swallow it; over the pane itself they carry no background at all. The tip hides in short windows, and stays while the overview is open (its cards scroll below the field and never move it). The folder pill in the strip also picks the project, and its panel already lists the projects and ends withChoose Folder…. A chosen picture covers the whole pane top to bottom (object-fit: cover, no fade) under one light scrim (bgat 35%), so what is written on it stays readable in either theme. - New thread cards: under an empty thread's field, a dashboard of five see-through cards
(
.rc-glass-faint rounded-xl, no edge ring,p-3, 8px apart), a step wider than the field (up to 1100px, centred; the field keeps the chat's own measure): the activity heatmap and this project's recent threads across the first row, then the last thirty days of usage, its pull requests and this month against the last. One height for every card, its label intext-caption text-fg-mutedwith a 12px icon (faint text does not read over a picture); six columns fromlg(3 + 3, then 2 + 2 + 2), one sideways-scrolling row below it; a card with nothing to say says so in one line rather than collapsing. A persisted, initially closed overview toggle sits below the centred composer; the cards scroll in the remaining space and never move the field. Over a picture the toggle takes.rc-glass, so its label reads whatever the picture is. The cards are also the one motion that happens on top of the glass: opening and closing fades each card's own fill and moves what is inside it, and never touches the surface or its blur, which would drop for the length of the animation and snap back at the end. - Composer strip: what the thread works in and what it is allowed to do
hang off the card's bottom edge instead of sitting in its glass: a 36px strip
(
.rc-composer-footer) inset 12px each side, its top edge tucked 8px behind the card so the two read as one stack, its own corners round only at the bottom, no ring (the step in fill separates it) and--rc-composer-footer-bg(the card's fill with a 4% lift of the text colour);text-calloutinfg-muted, 14px icons,gap-4between the groups. The thread's folder, its worktree toggle and its branch chip are on the left, the permissions mode and the usage meter on the right; every one of them is a pill whose panel opens off the pill itself, 8px away from it,topby default. The usage meter's percentage shimmers while its turn runs and settles on the number when the turn ends, so a live number is not read as a final one. The project picker is pinned above its pill whatever the room below, the list belonging to the card above it; the other strip menus open downward when the window has room under the strip and upward when it does not, and shrink to the room they have (at least 280px below, else above) rather than flipping to a side the user did not point at. The card is a container (@container), so a narrow window drops labels (the folder name shortens, then the worktree label and the branch chip, then the permission label, the folder name and the agents pill) rather than dropping controls or overflowing. The transcript scrolls under the card (its bottom padding clears the stack plus air) and fades out over the pane's bottom 56px, behind the card. A draft is kept in app storage underrustcode.drafts(400ms after typing stops, and at once when the window closes), so an unsent message is still there after a restart: sending clears the entry, a draft over 100 KB is not kept, and only the 200 newest survive (state/drafts.ts). - Queued message: what waits for the thread, at the end of its transcript
(
ui/QueuedMessages.tsx), as a sent bubble's twin: right-aligned, at most 80% wide,rounded-2xl, a dashedborder-strongedge andbg-message/40instead of the fill, the command and links as chips over the text, pictures and files above it. The dashed edge is what says it waits, so under it theClockandQueuedand its 22px icon buttons — Send now, edit, move up and down (with two or more), remove — are one.rc-meta-reveal, hidden at rest on the row's reserved 22px and in together on hover or keyboard focus, the way a sent message's time and actions are (and shown on a coarse pointer, which cannot hover).Heldstays at rest when a stopped or failed turn left the queue waiting, since that is why nothing runs; so doesEditing in the composerwith Cancel. Send now follows one rule, shared with ⌘⏎, the composer's running-state hint andstate/queue.ts(sendDecision): plain text steers; pictures steer on a harness whose steer takes them (Codex, and Claude Code through_session/steering); a command, a link chip or a file waits for the next turn, as does any message on a harness that cannot steer, and one sent while an approval or a question waits on a harness that reads steers between steps only (the built-in one). The dimmed arrow's tooltip and the hint are that reason (Files go with the next turn,The turn is waiting on you: this goes with the next one, …). The rule reads the harness's fresheststeeringrecord (_rustcode/harnesses, else the thread's own), so the hint, ⌘⏎ and the row cannot disagree, and only a harness that cannot queue stops the turn and sends the message in its place. It is edited in the composer, never in a field of its own: its pencil, or ↑ at the start of an empty composer, loads its text, command, links and attachments there, ⏎ saves it back in the queue and Esc leaves it. A row a steer takes out of the queue keeps the stack's place while it glides up toward the transcript and fades (rc-steer-away, 240ms,transformandopacityonly), and the message it became lands where the turn read it. A held queue ends with Resume, which starts its first message. A wake turn the app sends is one quiet line in the notice divider's style (Delegate finished · Fix composer focus · Pi · 3m 49sfor one, the working delegate's harness marks and the longest time for several), never a bubble; a message another thread sent saysFrom “…”and is not the user's to edit. - Jump to latest: the pill over the composer's control row (
shadow-1,.rc-glass-overlay— the strip below it shares that surface — 30px) saysLatestand, while a turn runs, what that turn is doing now after a·(Reading files,Thinking · …), so a reader scrolled up knows what waits. One line, truncated. - Tool group: two or more finished tool calls in a row (with the
thoughts between them) are one row, closed by a hairline
(
border-b border-border/60,pb-2) so the answer below it is told apart from the work: the icon of the kind most of them are in the 18px column, then a sentence of the two most frequent actions,Read 4 files and ran 2 commands, the rest asperformed N other actions, intext-body text-fg-muted, the failed count indanger, and the fold chevron. The transcript's gap sets its air, not the row: 8px (ITEM_GAP) from a neighbouring tool row, from a narration paragraph or from a group, the same value everywhere inside a turn, and 16px (TURN_GAP) where a message starts a turn and a footer ends it. A tool row itself is quiet: 24px high (min-h-6), a 16px icon in the 18px column, its title intext-body text-fg-muted, the summary intext-body text-fg-faint, the chevron only on hover. It stays that one line while it runs, a spinner in the icon's place: what a call printed is never drawn under it by itself, only in the card its chevron opens (Command or Arguments, then Output), so a running command does not push the turn around as it prints. A command the harness sent to the background returned when it started, and says so quietly after its summary (Started in backgroundintext-caption text-fg-faint): its task is the thread's own waiting line, not a spinner on a call that already answered. - Subagent row: a subagent (Claude Code's
Agent/Taskcall, RustCode'sspawn_agent) is one row in the tool rows' grammar: its avatar (the harness logo, orBot) with a corner badge, aSpinnerin accent while it works, elseCheck,XorMinus; its type infont-medium, the task intext-fg-muted, and while it works its current step intext-accent, done3 steps · 42s. Its own steps never become transcript rows; the chevron opens a card (rounded-xl bg-surface-2) of one-line steps and its answer. Two or more subagents in a row are one row:3 subagents, then2 working · 42sin accent (or1 failed,done), opening to a card with each agent's row. Over the composer, the turn's working line reads2 agents working, or the one agent's name and task. - Turn fold: while a turn runs,
Working for 12sheads it under the message that started it (text-body text-fg-mutedover aborder-border/60hairline), its replies and the call it makes now stream below, finished calls fold into tool groups, and the foot shows what it does now inrc-shimmerwhen no running row does. When it ends, its work folds under one divider where the work began, above the final answer:Worked for 1m 3s ›orYou stopped after 12s, in the same type over the same hairline, which a divider right above it already draws (so it drops its own). The duration lives here and nowhere else; a redCircleXmarks only a turn that itself failed, and a step that failed keeps its own count inside. The running header (Working for 12s) holds its place for 400ms after a completed turn, settling on a green check andWorked for 12sbefore that divider replaces it; the live line at the foot settles the same way when no reply is under it. A turn that wrote no answer keeps its time in the header (Worked for 4s · 09:55 PM) and has no footer, since there is nothing under it to copy or fork. A turn with no steps folds nothing and so has no header, and its duration goes with it: a short direct answer needs noWorked for 2s, and its footer says only the time. What stays visible: the message sent (arounded-2xl bg-messagebubble at most 80% wide,p-3; consecutive messages soften the corners they share,rounded-tr-md/rounded-br-md; its time and actions on hover, 12px, clipped to the bubble, the actions before the time so a steer's kept badge and time end flush with the bubble rather than before their empty room; the first message of a day keeps its time in view, with the day,yesterday at 12:33ortoday at 09:10, so a thread that ran over several days shows where each began; the row under a bubble takes the narrow gap, since that time line is already its air), the final answer (the replies after the last step), warnings and errors, and the footer, which says only the time: no duration, so a folded turn never states it twice. A quiet notice the app appends for what it did on the thread's behalf (a call an access mode let through, a compaction) is one divider line; the same notice back to back is one line that says how many (Cleaned up a delegate's worktree · allowed by Full access ×6), and any other notice keeps its own line and the order it came in (state/fold.tscollapseNotices). Nothing else in a turn draws actions: an intermediate reply, a thought and a tool row only narrate what the turn does, and none of them holds room for a hover it would answer. A finished turn's footer is its one action row, always in view and never waiting for a hover: 20px high (h-5), copy and fork at 12px beside the time, then the Changes chip. A turn's changes are one line, never two: the completion card (N files changed +A −R ›, with the checks and the files it opens) where the harness reported one, else the checkpoint'sChanges +A −Rchip (which also holds Rewind to before turn N). The two sources are picked once per turn, so the numbers can't disagree. The newest finished turn keeps the line in view above its footer, and so does a turn with nothing folded: a turn whose work was only a reply has noWorked for 2mrow to hold the line, and hiding it there would lose the turn's changes entirely. An older turn that did fold keeps its line as the last row inside itsWorked for 2m, so it is there when the turn is opened and out of the way when scrolling past (and its rewind goes with it). The right panel's Changes view is the thread's own and stays as it is. Opening the fold shows the steps in order, each fading in withrc-expand(opacity and 4px, so nothing lays out under a transition; Reduce motion makes it instant). A<button aria-expanded>, so ⏎ and Space toggle it. Opened turns are kept per thread while the app runs; an opened old thread starts with every turn folded; find in thread opens them all while it searches. Folded steps are not rows at all, so the virtualizer and the timeline rail have fewer. - Rewind an attempt. A checkpoint is an attempt, not a one-shot restore:
Rewind to before turn N, in a turn's Changes chip, puts the files back to
before that turn (the chip names it because that turn goes too) — and the
conversation with them when the harness rewinds — and keeps the turns it
leaves as an earlier attempt: the same rows, faded to 50%, under an
Earlier attempt divider at the foot of the transcript (a hairline with
History, how many turns it held, and Go back to this attempt). The block starts right under the last live turn — it takes over the room the transcript reserves for the composer instead of sitting below that blank — and keeps the same room under its own last row, so the faded turns scroll clear of the composer. The view rests a little past the live end when an attempt follows, so the divider and the first lines it kept read above the composer rather than behind it. The turns stay readable and clickable — messages select and copy, a reply's footer copies it, a turn's Changes opens its diff — but nothing in them sends the thread on. The divider's Go back puts the files where that attempt ended, and its confirm says the conversation cannot follow, because the engine has no way to restore messages it took out. An attempt whose state the engine could not keep says so instead (TriangleAlert, "The state it left was not kept") rather than offering a button that would pretend. The record is the app's, so it lasts while the thread is open (like a question's row): the engine's history no longer holds those turns. The minimap wears the same idea at thread scale, without drawing a mark of its own on the strip: a turn a rewind can go back to is named in that turn's hover card, which saysCheckpoint · turn N(· currentfor the head, the newest) and offers Rewind here. Pointing anywhere on the strip picks that turn, so the strip stays the one target: the samerewindCheckpointthe Changes chip runs, which is one click with no confirm when the engine keeps the state it abandons (the button's title says so, as the chip's does) and behind its confirm when it cannot. The card sits clear of the strip rather than widening it, so the pointer only ever picks the turn it is over: it takes the pointer itself, holds the turn it shows while the pointer is inside, and lingers 160ms before it goes, so crossing into it works, while a click on its body still goes to the turn. Escape closes it and puts focus back on the strip, and so does a rewind, since the button goes with the card. The checkpoint is in the strip's accessible name too, so the keyboard reaches it. Logic:state/fold.ts(foldTurns). - Turn trace: the footer's
Tracechip, beside Changes, opens a card above it (ui/TurnTrace.tsx): the turn's own timeline from 0 to its end, one row per model call, tool call and delegate. A model call has no event of its own, so it is the stretch between the calls around it, and it is named by the thread's model (the round's ordinal is a suffix only when there are several); its bar isaccent/55, a tool's isfill-strong, and a delegate's is dotted. The label is on the left in a 184px column and gives way in its middle, keeping the file name (edit …/app.ts), never the bar's room; the cost or token count and the work duration are on the right, with+38s waitingbeside it when an approval held the call, and the longest row by work carriesSlowest. The stretch spent waiting on the user is hatched (rc-wait-hatch) apart from the work, and the tooltip says38s waiting on you;DurationandSlowestread work alone, so an approval someone took their time over is not a slow call. Delegates (spawn_agent,start_session,fan_out) fold into one dotted row that opens to each call.Sortis Timeline, Duration or the number shown;Showswitches cost ↔ tokens, opening on cost when the harness reported one and on tokens when it did not. Hovering a bar names the call, when it ran and what it used; a press opens the tool row's own detail (Input, Output, diffs, Copy) or the text a model call streamed. The label column, the track and the number column are one set of widths (TRACE_COLUMNSinlib/trace.ts) for the axis above the rows and for every row, so0sand the turn's duration sit exactly on the bars' ends; the axis is the scroller's first row and sticks to its top, so a classic scrollbar's gutter cannot make it a scrollbar wider than the rows under it. The bars are drawn inside a 4px inset at each end of the track (TRACE_TRACK_INSET), so one at the turn's first instant never touches the rounded edge, withTRACE_MIN_BARas the floor that keeps a short call visible. The numbers are the engine's per-round usage updates, subtracted from the turn's baseline (state/thread.tsTurnUsage); a row a harness left unpriced stays blank rather than guessed, and a replayed turn (no per-call timing) has no chip at all. Logic:lib/trace.ts, waits recorded instate/thread.ts(waitingOn,settledWait). - Settings reset: a row whose value differs from its default shows a small
reset icon before its control, on hover or keyboard focus (
Row'sreset). When the control stacks under the text, the icon leaves the flow for the row's top right, so stacked controls share one left edge. - Right panel: one
RightPanelfor every side view (Details, Changes, Pull requests, Thread). Overview uses a 280px card sized to its contents, with workspace actions, branch, Changes, delegates and context usage. It previews up to three active delegates, with the remaining agents available on demand. The detailed sections are under More thread details. The other views use a card floating over the chat view's row at the window's right edge (ui/ChatView.tsx), so it is never drawn over the board, the review or the compare view. Every view draws on one surface, the Details card's: the chat's ownbg-bgwith a hairlineborder-borderandrounded-2xl, inset 12px from the window's top, right and bottom edges: it rises over the header's right end and carries the panel's toggle ("Thread info",ui/PanelToggle.tsx) at its top right, and runs the window's whole height. The chat column keeps the row's whole width, so the transcript's scrollbar stays at the window's edge; the card publishes the room it takes as--rc-panel-roomon the row, and the lane pads by it (.rc-lane-padon a scroller,.rc-lane-inseton an absolute box, index.css), so the lane re-centres in the room that is left. The header floats above both, and the card draws above the header's glass (z-20against the header'sz-10). The header's controls stand clear of it by--rc-panel-room, published on the column that holds both. Where the window draws its own controls at the header's right (Windows) and on a sheet, the card stays below the header and the toggle in it. The dock around the card takes no pointer, so the chat under it still scrolls. A pane's header row is a 44px band: "Properties" on Details, a back button and the view's name on the views it opens (Changes, Pull requests, Thread), and the toggle; a view adds one slim toolbar (h-9): Changes says the file count and+/−lines, the Unified/Split switch when the pane is wide enough for split, the git button (commit, push, pull, open a pull request) and a reload. The card draws 420px wide by default and never wider than 560, 70% of the window, or the row less the 360px the chat column always keeps, nor narrower than 320; it is fitted down when the window or the row cannot hold what was asked and comes back when it can. One width is kept for every tab and thread. Details is one card with no tabs: the properties (with a Changes row that opens the diff), Pull requests, Activity, then Turns, which takes the height left: every turn newest first with its Trace chip, and a press opens its event log (ui/TurnEvents.tsx), every message, thought and tool call laid flat with a strip of its shape; View all opens every turn's. Opening and closing animate the dock's width over 200ms (see Motion) with the content pinned to the card's right edge, so the chat uncovers it instead of the card sliding. The left edge drags and answers the keyboard too: ←/→ 24px from the width on screen (Shift 96px), Home/End to the ends, ⏎ the default; the 8px strip straddles the edge, captures the pointer, and writes the width for the frame it moves on, committing state once on release. Escape inside the card closes the panel (unless a field in it is being edited), focus goes into it when a shortcut opens it with nothing focused, and closing hands focus back to whatever had it, else to the header's toggle. While it is closed or closing it isinertand takes no pointer, so nothing it draws can be reached. The panel belongs to the thread: each thread keeps the view it was last showing, and opening a thread restores exactly that (state/store.tspanelByThread, next to the width it keeps inui/RightPanel.tsx). A thread never seen opens on Overview in a wide window and closed in a narrow one. A view the thread cannot show when it comes back (Pull requests in a project without them, the Thread tab with nothing peeked) opens nothing rather than a view the user did not pick. ⌘⇧B toggles it, opening the thread's own view when it has one, else its overview (Details); closing it by hand is kept on that thread alone, so picking it again leaves it closed and another thread comes back to its own. Opening the thread its Thread tab shows ends the peek and returns the panel to that thread's own view, and a new thread ends it too. The new-thread screen opens without a panel, though ⌘⇧B still opens one there. Settling the selected thread while the chat is showing (its menu, the palette, the sidebar) closes the panel and leaves it for the new-thread screen in the same folder, with the same Undo the sidebar offers; settling from the board, review or compare stays on that view, and a status set by an agent or the engine never moves the screen. A thread that is settled and open in the chat says so in one glass capsule above the field, the same.rc-glass-overlayas the jump-to-latest pill — asuccesstick, Settled, and a quiet Unsettle pill — because settling it was the way it left the screen, and one press puts it back to idle where it is. Below 980px of window there is no room for both columns: the panel opens as a sheet over the chat instead —w-[min(88vw,380px)], full height at the window's right edge,bg-surfaceandshadow-2(opaque, because it opens over a scrim that is already blurred) with the same header row — over a.rc-scrim(bgat 60% with the shared glass filter). Escape, a press on the scrim or the close button puts it away; there it is a dialog and takesaria-modal. The whole stack of controls under the transcript — composer, its slash drawer, approvals, linked threads, a report — keeps its own z-order; the docked card shares no space with any of it, so opening the panel can never cover a field being typed in. Details lists what a thread is, in titled sections that drop out when they have nothing to say: harness, workspace, linked threads, subagents with status and elapsed time, plan, the timed approvals still in force (Allowed, each with its minutes left and Revoke), and usage. - Switch row: where a thread's model or effort changed after its first
message, a quiet divider (
gpt-6-luna → gpt-6-astra · Medium → High). Picks with no message between them are one row; the engine records it in the history on harness threads, so it survives a reload. - Approval row: an approval waits as a row in the transcript, at the call
it is about (
ui/AttentionCards.tsxApprovalRow): theHandin the risk's tone in the 18px column,Waiting for approvalinfont-medium, a risk badge, then the command or title infont-mono, with1 of Nwhen the turn waits on a batch. The risk (lib/approval.tsassessApproval) tints the icon and badge and nothing else:successreads Read-only,warningRisky or Changes files,dangerDestructive — a tree deletion, a forced push, a dropped table, sudo, or a write outside the thread's folder. An unknown tool is Risky. Under it, indented 26px, one body at most 160px tall that scrolls: for a command, the key–value preview (Command, Folder, Path), then the change it would make (DiffView), then its reason when it has one. An edit has no block: its diff header already names the file and its+N −M, and awhyrepeating the path is not drawn. Then its answers as 24px pills: Declineesc, Approve⏎(once), and a Grant menu — Allow for 1 hour or Always allow, the engine's other answers, and Allow all N waiting. A Destructive call offers no grant, here or in the bar or the inbox, whatever the engine listed; it is answered once or declined. It sits 2px from the call above it, like the tool rows do. An approval whose call is not on screen yet (or is folded away) goes to the foot of the transcript, where it can still be answered. - Approval bar: the card over the composer keeps one slim line for the
same approval —
Waiting for approval · <subject>, its risk badge (the icon carries the risk in a tip) and the same answers (elevated rounded-2xl,min-h-[34px],py-1) — because it is the target for the keys: 1–9 pick a visible answer in the engine's order (reject, hour, always, allow once; a destructive call has only reject and once),⏎approves andescdeclines, whenever no field, menu or dialog has the keyboard. The body is not repeated there; it is read in the row. A message sent from the composer meanwhile declines it and tells the agent what to do instead. - Answered approval: the bar folds into one settled line where the card
was (
ResolvedApprovalBar,rc-resolve, 180 ms): aCircleCheckinsuccessfor an allow or theHandintext-fg-mutedfor a decline, thenAllowed edit src/app.ts · once,Allowed cargo test --lib · 1 hourorDeclined git push --force. It staysRESOLVED_APPROVAL_MS(1.8 s) and leaves, so an answer has a visible result instead of a card vanishing under the pointer. - Question panel: a question waiting on the user is a panel over the
composer (
ui/AttentionCards.tsxQuestionCard,rc-composer-card px-5 py-4,rc-in), sharing the composer's surface, glass, shadow and--rc-composer-radiuscorner, not in place of it: the composer stays below with its draft, so the thread and the user's own words keep their place while the question is answered. The header (h2, accent) names the question and, for a set asked one after another,2 of 3(step/stepsin the request's_meta.rustcode); the question scrolls past 168px so a long one leaves its answers in view. The panel takes focus when it appears unless a field has it, never its first answer, so ⏎ cannot send an answer nobody chose; ↑/↓, Home and End move between answers, 1–9 pick one, esc dismisses outside a field, and once answered focus goes back to the composer's field. A question that takes the user's own answer also takes files: aPaperclipbeside Send (Attach files), a paste into the field or a drop on the panel (a dashed accent outline while a drag is over it), shown in the composer's strip (ui/Attachments.tsx). An answer leaves the panel as the settled line approvals use (Answered: Plain · 2 files,rc-resolve); reduced motion makes both instant. - Question row: an answered question stays in the transcript
(
ui/Rows.tsxQuestionRow,bg-fill-subtle rounded-lg px-3 py-2): the header infont-mediumafter aMessageCircleQuestionin accent, the question itself intext-fg-muted(three lines at most), and the answer under aCornerDownRightinsuccess, then the names of any files the answer carried asbg-fillchips with aPaperclip. It is not folded away with its turn. A question still waiting keeps its form over the composer, since its answer is a choice; only the answer leaves a row. - Plan card: a thread's plan, at the foot of the transcript
(
ui/PlanCard.tsx):rounded-2xl bg-surface p-4, aListChecksandPlaninfont-semiboldwith3 of 8 leftintext-fg-muted tabular, a Copy button and Implement (a prominent 24px pill that sendsImplement the plan.as an ordinary message; it is only there while the plan waits on you). Its steps are one line each,text-bodywith a 6px status dot (successdone,accentnow,fill-strongnext) and done steps intext-fg-muted. A step carries its clock at the right intext-caption text-fg-faint tabular: the time it has run while the turn is on it, its whole time once it is done, and nothing when the app did not see it start (state/steer.ts). Under the step the turn was on sits each steering note it read there, asSteered: <first line>(ui/SteerMark.tsx); a click, or the hover tip, gives the whole note and when it was sent. Past 220px it clips and fades over its last 24px, withExpand · N stepsunder it; expanded, it shows whole and offersCollapse. It is drawn while a turn works through the plan — live, with the running step's clock — and once the thread waits on you with something left; an all-done plan still draws it while it holds a note, and otherwise leaves no card. The header's popover and the composer's meter are unchanged. - Steering note: a message sent into a running turn says where the turn
read it. The plan card marks it on the step that was active then; a thread
with no plan, or a plan rewritten past that step, gets a quiet row in the
transcript instead (
ui/Transcript.tsx), on the divider's own line under the message it was sent as (Steered: use the fast path, inaccentbehind aCornerDownRight). Either marker is one line at rest and stays out of the turn's fold, and opening it — a click, or the hover tip — shows the whole note and when it was sent. The note is the app's own record of the turn, kept while the thread is open and not replayed from history. - Jump to latest:
.rc-glass-overlay rounded-full, centred 8px above the composer stack and above its drawer when one is open, over it in z. - Error card:
rounded-lg bg-surface px-4 py-3, the icon indanger(orwarningfor notices), texttext-fg-muted, actions at the right as secondary pills. No coloured border or tinted background. - Markdown in a reply (
ui/Markdown.tsx): 14px at 1.625 infgat 90%, the blocks in one column with a 10px gap and no block margins of their own. A heading takes one more step above it than the gap gives it (h1/h2 12px, h3 8px, h4 6px) so it groups with the text it heads; bold is semibold 600, never the browser's 700. A fenced block is onerounded-lg bg-code-bgsurface — the one the terminal and a reply's own diagrams use, so two fences in one reply do not read as two materials — with atext-caption text-fg-mutedlanguage in its head, a Copy pill, and the code infont-mono text-callout leading-[18px], scrolling sideways rather than wrapping. Inline code isrounded-sm bg-fillat 0.85em; a task item's checkbox is its marker (no bullet beside it, the box in the marker's place); nested lists step their marker (disc, circle, square; decimal, letters, roman) rather than only indenting; a table sits on its ownbg-fill-subtlecard with a hairline under every row but the last; a quote is that same card with a 3px bar in the gutter. Pictures,hr, links and formulas follow the radius and token rules above.
| Do | Don't |
|---|---|
Use a token class or var(--rc-…) |
Write #hex, rgb(), zinc-800, text-white |
| Separate with a surface step | Outline every card with a border |
| Name a radius step | Write rounded-[14px] |
| Take a gap from the spacing scale | Write p-3.5, px-2.5 or gap-7 |
Show focus with :focus-visible only |
Recolour a field's border on focus |
| Mark state with the accent | Fill primary buttons with the accent |
| Keep subtrees mounted; toggle visibility | Remount a view on open, or key it on hover |
| Change colour or opacity on hover | Change size, padding or border width on hover |
| Put hints in secondary text inside popovers | Let a tooltip cover a neighbouring control |
| Use the glass tokens for floating surfaces | Hand-tune a backdrop-filter or blur a pane |
| Make a labelled button a pill | Make a labelled button a circle |
Let index.css time hover |
Add transition-colors duration-200 to a control |
Retired class names (failing design.test.ts): fg-2, fg-3, fg-4,
fill-1…fill-4, hairline, brand, brand-fill, chat, field,
attention, info, the surface utility (now elevated), shadow-float,
shadow-panel. Off-scale spacing (p-3.5, px-2.5, gap-7 and the like) is
held by the spacing scale's test, not this list.