Chats page — thread UI memory, the thread inspector, browser pane and side panes, what looks redundant but is not, and what not to reintroduce (command center included). A repository rule for apps/ui/src/renderer/chats/thread-ui-memory*, apps/ui/src/renderer/chats/panel-flags*, apps/ui/src/renderer/chats/agents-panel*, apps/ui/src/renderer/chats/browser/**, apps/ui/src/renderer/chats/timeline-tab*, apps/ui/src/renderer/chats/notes-dialog*, apps/ui/src/renderer/chats/composer-shelf*, apps/ui/s...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Rule Ui Chats Layout?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/geniro-io-rule-ui-chats-layout)
---
name: rule-ui-chats-layout
description: "Chats page — thread UI memory, the thread inspector, browser pane and side panes, what looks redundant but is not, and what not to reintroduce (command center included). A repository rule for apps/ui/src/renderer/chats/thread-ui-memory*, apps/ui/src/renderer/chats/panel-flags*, apps/ui/src/renderer/chats/agents-panel*, apps/ui/src/renderer/chats/browser/**, apps/ui/src/renderer/chats/timeline-tab*, apps/ui/src/renderer/chats/notes-dialog*, apps/ui/src/renderer/chats/composer-shelf*, apps/ui/src/renderer/chats/shelf-*, apps/ui/src/renderer/chats/waiting-messages-strip*, apps/ui/src/renderer/chats/thread-inspector*, apps/ui/src/renderer/chats/chat-list-item*, apps/ui/src/renderer/chats/subagent-block*, apps/ui/src/renderer/chats/task-list*, apps/ui/src/renderer/chats/scroll-follow*, apps/ui/src/renderer/command-center/**, apps/ui/src/renderer/components/browser-occlusion*, apps/ui/src/renderer/components/color-rename-menu*; read it before editing a file there."
---
<!-- GENERATED by scripts/sync-agent-rules.mjs from .claude/rules/ui-chats-layout.md. DO NOT EDIT: edit the source, then run `pnpm sync:agent-rules`. -->
# Chats — layout, thread UI memory and the command center
**Thread UI memory** (`chats/thread-ui-memory.ts`):
- Folds are remembered per thread, keyed by the row they belong to (`tools:<group id>`, `tool:<call id>`, …), never by an index.
- Only a press writes.
- Which hook remembers a boolean, in a thread or outside one: `.claude/rules/renderer-components.md` → _The one home for…_.
- Two things are deliberately not per thread: the context readout's drill-downs and the builder palette.
- The thread inspector (`chats/thread-inspector.tsx`) is the one side panel of a thread: 360px, tabs Agents / Timeline / Notes / Plugins, each with its glyph before its label (decision `inspector = tabs`; user decision 2026-12-02: Changes and Context left the panel, the plugin blocks took a tab of their own). The Plugins tab stands only while the thread has a plugin block; with it the four labels do not fit the column, so every tab but the shown one draws its glyph alone, its label in the tooltip (`TabStrip` `iconOnly`). A thread's changes are the shelf's changes chip (`FolderChangesChip`, opening the review screen), its pull requests the shelf's chip and the Pull requests section heading the Timeline tab, and its context the composer's ring, whose readout carries the window by category and the Compaction block (`ContextMeter` `layout="full"` with its `compaction`). The header's avatars open Agents and its panel button toggles the last tab; a thread remembered on the old Progress tab opens on Timeline (`inspectorTabFlag`); which tab and whether it is open are remembered per thread, and a thread that never set it opens with it shut (user decision: no thread opens the panel by itself). It is always a column beside the thread, on a tablet and in a narrow window too, never a sheet over it (user decision 2026-12-02): the chat list folds first, then a newer side pane takes the older one's place, and a lone inspector keeps its column while the thread gives up width; it opens by itself only where its column fits. A paired iPad draws it the same way (user decision 2026-12-02). On a phone it is a full-screen page with a scrolling tab strip, opened from the header's actions sheet. It never auto-opens on an artifact. A thread card opened on the command center's graph draws neither the inspector nor the composer shelf: its head, the chat and a one-line composer (decision `cc-open-card = chat`; panels and tools through Open in Chats). The manager's window, compact but with a header of its own, draws the composer shelf (`HostedThread.shelf`; user decision 2026-12-04) and draws the inspector only once its header opens it (Side panel, or Thread timeline, Processes or Thread notes in its ⋯ menu), as a column beside its conversation, which gives up width (user decision: those controls did nothing there). Its shelf's Monitors and Pull requests chips list, in one block per thread after the manager's own, the board threads' running monitors and the pull requests they opened that are open or not answered for yet (`HostedThread.shelfRoster`, built by `CommandCenter`: `command-center/shelf-roster.ts`, and `command-center/use-roster-monitors.ts`, which reads a thread's monitors through its run state only while the board's live `monitorsOpen` for it is above zero, again whenever that count changes or the Monitors chip opens, and stops a monitor through its own thread).
- On a phone, while the manager's window is open (`narrow && chatOpen`), the graph is held: `HeldGraph` in `CommandCenter.tsx` keeps it as last drawn, since the window covers it, and it redraws once the window closes. The board is re-read once per 250 ms gather (`BOARD_CHANGES_GATHER_MS`): the `command_center_changed` announces inside one window make one read naming all their runs. An answer keeps each card object whose content did not change and the cards array when nothing changed, and its answers are applied as transitions.
- An agent card in the inspector's Agents tab (`chats/agents-panel.tsx`) reads, line by line: the name, its status as glyph and word (`AgentStatus`, never cut, no clock — the worked total in the figures row is the one clock) and its context ring; the role (giving way first) · CLI · model; what it is on (`AgentActivityLine`, only when it says more than the status word); its figures and controls. Every line after the face stands in the text column under the name (user decision 2026-12-02). A solo chat's card carries no MCP plug: its MCP servers section's Manage opens the same dialog (`McpDialogButton` `variant="none"`), on the member the newest live call runs on; a team card, with no section, keeps its plug. Running commands (`ShellRows`) are two lines each — the command and its clock, then its note with Output and Stop — three shown and the rest behind Show N more, never a box scrolling inside the card that cuts a row.
- The inspector's Plugins tab holds the open thread's plugin blocks (`plugins` prop, `chats/plugin-blocks.tsx`, read through `usePluginBlocks`); the Agents tab draws none. Each block folds per thread as `plugin:<slug>:open`, open by default.
- A block's refresh timer runs only while the block is open, approved, the inspector open and the window shown (`useDocumentVisible`); the Plugins tab stays mounted, hidden, while another tab is shown, so its timers and its tab's mark keep going. A changed file never runs; its last data draws dimmed beside a Review line.
- The browser pane (`chats/browser/`) is a side pane of its own beside the transcript, opened per thread by the header's globe. The thread is never narrower than 560px (decision `pane-rule = protect`) unless the window cannot hold it beside the inspector at all: when panes need room the chat list collapses first (into the header's list button; a list folded only for room comes back on its own once the window holds it again), then the newest side pane replaces the older one (the browser and the inspector, and the inspector and a chat list shown again from that button). It draws a placeholder that main covers with the chat's active tab (`browserSetBounds`), so every overlay primitive (`Dialog`, `Menu` — and `ContextMenu` and `Select` through it — and `Popover`) reports while it is open (`components/browser-occlusion.ts`), and while any is open anywhere the pane swaps the view for a still (`browserCapture`) — a new overlay that skips this is drawn under the page. A press on the still hands the keyboard to the page (`browserFocus`), since that is where the user meant to click. The one exception is the pane's own full-screen view (`BrowserColumn`), a `Dialog` with `coversBrowser={false}` that hosts the view itself while the column's pane steps aside. Open in new window moves the whole browser into a window of its own whose renderer draws only `BrowserPane` with `windowed` (`chats/browser/browser-window-root.tsx`, chosen in `main.tsx` before `App` loads); the docked pane keeps the tab strip and says the browser is in its own window, with Show window and Dock back. It opens by itself only for a tab an agent just opened (`BrowserStateEvent.agentOpenedTabId`), once, and when the browser docks back from its own window (`dockedBack`, so a column closed during the pop-out comes back); later agent actions only mark the globe. Every chat link (`useChatLink`, `ChatLink`, `ChatPanelLinkRow` in `chats/browser/chat-link.tsx`) opens an `http(s)` address in that pane on a plain click only while the pane is open, else in the system browser; its right-click menu offers both browsers and Copy link. A link whose address is a local absolute path (`localPathOfHref`: one leading `/`, percent-decoded) shows that path in Finder on a plain click instead (`useShowInFinder`, the artifact folder button's channel and gates: a fresh click, one per `OPEN_PATH_GAP_MS`, desktop only), titled Show in Finder, with why it was not shown beside it for `PATH_LINK_NOTICE_MS`; it has no right-click menu. A tab shows its name (`BrowserTabState.name`, else the page title, which stays in its tooltip) beside a colour dot that opens its colour and Rename menu (`components/color-rename-menu.tsx`, shared with the terminal's tabs; double-click the name renames too, through `TabStrip`'s `leading`, `editor` and `onDoubleClick`); the user's rename or recolour goes through `browserLabelTab` and main keeps it from every later agent label, field by field. On a paired device there is no pane and the globe says "The browser runs on your Mac". Tabs and cookies are each thread's own; the pane holds no browser state of its own beyond what main reports (`onBrowserState`).
- The inspector holds only what belongs to the thread. The header's ⋯ menu holds the thread's other actions (Search this conversation ⌘F, Thread timeline, Where the run went, Processes, Thread notes | Export, Analyze, Reflect | Rename, Archive); there is no strip of icon buttons. Processes are a section of the Agents tab (decision `processes = agents-tab`), Where the run went a full-screen view; their reads are gated on that section or view being shown (`onProcessesShown`, the popup state), never on the inspector being open. The header menu's Processes and Where the run went open their popups (`RunPopups`, drawn by `Chats` beside the inspector) and leave the inspector as it was (user decision 2026-12-03): the inspector opens only from its own button and from what shows something that lives only in it.
- The inspector's Timeline tab (`TimelineTab` in `chats/timeline-tab.tsx`; the Progress window before the redesign, user decision 2026-12-02: named Timeline and drawn on a rail) is the thread's one overview and the chat screen's too: with goals, stages or an outcome, the summary card (goals ring, headline, counts, stage and outcome tags) on top, then Timeline / Goals / Stages (Stages only in a run with stages); with none of them, a quiet line and the add-goal field over the events. Its events (`chats/thread-timeline.tsx`) are the user's messages and what happened on the thread, newest first under a heading per day, each an icon dot on one vertical rail (`TimelineEventRow` `variant="rail"`) — Key steps by default, Everything (calls, team notes, pages, achieved goals, plain approvals) remembered per thread (`timeline:everything`) — each row through the shared `components/timeline-event-row.tsx` the command center's timeline also draws; a row's press jumps to its transcript row, an achieved goal shows the Goals tab, and a pull request's link is a sibling control beside the row's activator. The shelf's Timeline chip and the header menu's Thread timeline open it on Timeline; the tab lives on `Chats` beside the open flag, since the shelf renders under two parents. There is no timeline popover. The chip stands whenever the thread has stages, goals or an outcome, or the user can add a goal, and reads "Set goals" — the one status counter with words — while the user can add one and none is set; moving a stage stays in the Timeline tab's Stages view.
- The inspector's Notes tab (`NotesBody` in `chats/notes-dialog.tsx`: the user's own notes, autosaved, then a team run's team notes, each one row of its kind tag, author and time over its text and, once picked, its actions, all on one left edge): the header menu's Thread notes, the shelf's Team notes chip and a `team_note` row in the transcript (`TeamNoteOpenContext`) all open it, the last two on the pressed note.
- Read the MCP listing only when its disclosure opens (`mcpOpen`).
**Looks redundant, is not.** Check here before cutting:
- The task list renders in both the transcript and the inspector's Agents tab. The user confirmed they want both.
- The shelf's Tasks, Sub-agents and Terminals chips restate panel counts on purpose.
- The chat-list row is two lines (owner decision): the state glyph in its hue (every row keeps its state glyph; an unread row wears the attention dot on its corner, and a row asking the user draws its question glyph with no dot, so opening it changes no glyph), the title and the time — swapped for Archive and ⋯ on hover — then the agent or team with the preview or activity, the card key and the pull request. A row that needs the user (asking, failed or unread) carries the straight attention bar at its left edge, drawn beside the content so no row content moves. The open row wears the neutral selected tone with its hairline ring and a straight 3px primary bar at its left edge, which takes the attention bar's place on that row; a user's colour is a faint wash on the other rows, and rows stand 2px apart (user decision 2026-12-04). Do not add a third.
- A Search all chats hit (`global-chat-search-dialog.tsx`) is drawn as its thread's row (user decision), from the row's own parts (`chats/thread-row-parts.tsx`, `PullRequestBadge`), with the matched words between its two lines: the state glyph, title, team and archived marks and when the words were said; the quote; the agent or team with who said them, the card key and the pull request — never the folder path. The search route carries each hit's thread once (`runs`, `ChatSearchThread`: what the row reads), and the dialog resolves its pull requests through `use-thread-pull-requests.ts` like the list.
- The tail `ResizeObserver` watches the scroller itself as well as its children, because a shrinking viewport fires nothing else.
- The composer shelf reserves its height (`min-h-7`). When its chips do not fit it scrolls sideways at every width and never squeezes one (user decision 2026-12-02), so every chip stays whole and the chips past the edge are reached by scrolling. Anything thread-produced worth reaching is another chip there, never a new band — with one exception (user decision): messages other threads sent that still wait for this thread's turn are drawn above the composer as `chats/waiting-messages-strip.tsx` (sender, why it waits, first lines, Deliver now and Remove), because a counter alone went unnoticed; the Waiting messages chip lists them all. Who is working shows in the header's member avatars (a ring on a working one) and, in a team run, the shelf's Agents chip (decision `working-agents`; user decision 2026-12-02), never as a floating card; a desktop or tablet header 480px wide or less, measured on the header itself, draws no avatars and leaves who is working to the side panel's Agents tab, puts the status time («· 2h») into the status tooltip, and moves the Browser and Terminal buttons into the ⋯ menu as rows checked while their pane is open (user decisions 2026-12-02), while the phone header and a wider one keep all of them. Content chips (changes, pull requests, buttons, teams) run durable to volatile from the left; the status counters (Terminals, Monitors, Sub-agents, Waiting messages, Team notes, Tasks, Timeline, Agents — the agents chip last, user decision) are glyph + figure in `ComposerShelf`'s `status` cluster at the row's right end, volatile to durable so the right edge stays put; the cluster stands beside the chips' own scroller (`composer-shelf-chips`), never over it, and draws no ground of its own, so no chip passes half-covered beneath it — the scroller fades its own ends where chips run off and hides whole a chip an end cuts (`useOverflowEdges`' `--shelf-clip-start` / `--shelf-clip-end`), so no sliver of a chip shows at either end. Every shelf item is one chip look (`shelfChip` in `chats/shelf-chip.ts`; user decision 2026-12-05, replacing the cardless counters): a reading is a counter — the card ground and hairline the composer card and the working-threads pill share, a soft attention or destructive fill only while its subject needs the user — and a press is an action — the button's secondary ground (Pause, Set goals, Send now, an agent's buttons); every item is 24px high with one gap between any two, and on a touch screen the row is 44px high and each chip's press target reaches it. The queue's summary and its Pause ride in the shelf after the content chips, and its rows sit inside the composer card above the field (`MessageComposer` `queued`).
**Do not reintroduce:**
- Landing-view centring on the window.
- A pinned block above the command center manager chat's composer (user decision): no list of finished threads there (they are the Inbox gallery's), and the manager's own open questions and approvals stay at their place in its conversation, never pinned (`placeOpenQuestions`' `canPin`, false while `HostedThread.commandCenterManager`).
- The run's folder in the composer: it belongs in the header.
- A horizontal timeline strip on the chat screen, on a command center card, or a timeline inside `subagent-block.tsx` (user decision: the cards carry none). The command center's timeline is one page-level panel in its right sidebar (`command-center/timeline-panel.tsx`, read from `GET /v1/command-center/timeline`), with no filters (user decision). A timeline row never leaves the page: its click shows the thread's card (`showThread`), a question or approval its thread still waits on offers Reply — the answer popover hung from that row, in every view; `showThread` on a phone — and a finished row of a thread on the board offers Archive. The header's Inbox button (named Inbox by user decision 2026-12-03; it was Needs you) opens the attention gallery (`command-center/attention-gallery.tsx`), never a sidebar list (user decision: a gallery, no swipe deck, no Later pile, no Undo): a centred `Dialog` as tall as its tallest card (capped at the window, a taller card scrolling inside its slide), full screen with a phone back entry on a phone, its title row splitting the count by kind, each with its icon and hue (questions, approvals, needs decision, failed, finished, reviews, other: `attentionSplitParts`) from the one kind map the cards' own icons read (`command-center/attention-kinds.ts`: failed crimson as a failed card is, finished green, questions, approvals, needs decision (a flag) and reviews caramel, a review card of any kind wearing the reviews icon — user decision: a red card has a red count; on a phone, with two kinds or more, each count is its icon and figure alone, its words left to the tooltip and screen readers, and the counts wrap rather than clip), and one card at a time in the middle of a horizontal CSS scroll-snap track (`scroll-snap-stop: always`) like a gallery of pictures: each slide is the card's width (`--slide`, read off the column with container units; the column is at most a 720px card plus a 20px gap and a 56px sliver each side, so a neighbour peeks in by the same sliver at every width and is never drawn as a cut-off card — user decision 2026-12-03), so the cards before and after it peek in at the sides, dimmed and a little smaller, and a press on one brings it to the middle (user decision 2026-12-02, replacing "no peeking neighbours"); a card is as tall as what it holds, centred on its slide, its actions right under its content (user decision: no gap between a question and its buttons); round ← / → arrows stand at the track's sides over the neighbours and a quiet "n of N" under it (on a phone the arrows sit beside "n of N"), with no position dots — the card's one title row, Show more, shortened links and its footer bar as below — moved one card by those arrows, the arrow keys (not while typing in a field), a mouse drag (one that starts on a card's picture too: the picture's native drag is cancelled, the press becomes a drag only once it travels a few pixels, and a plain click still opens the picture) and a finger swipe — no `touch-action` on the track or a card, which kills the tablet swipe; moving never changes a card. Its cards come from `command-center/use-attention-cards.ts` over sources the page already reads — each asking thread's open cards (`useOpenRequests`, answered through `sendVerdict`, never the manager's relayed copy), failed board threads, finished ones (`column === 'done'`, a finish whose `run.outcome.needsYou` is non-empty text being its own kind, `decision` — Needs decision, with its own count — sorted after questions and approvals, user decision 2026-12-05; less a finish the user dismissed: the board's `finishKey` matched against the manager's Done dismissals, `useManagerNotices`), the pending memory, lessons and knowledge (`useWaitingItems`) and the manager's Settings notices still open and not dismissed (`useManagerNotices`, drawn only while `settingsNoticeShows` says the card has something to show) — in that group order, questions and tool approvals first, oldest first inside each group; each is drawn through `AttentionCardBody`: a question or approval by the manager chat's own `RequestCard` under the Inbox status line (`InboxCardTop` as `ThreadRequestContext`'s `head`), a review and a notice by `WaitingReviewCard` and `SettingsNoticeCard`, and a finished, needs-decision or failed thread by the Inbox's own card (`command-center/inbox-thread-card.tsx`, user decisions 2026-12-05: the manager chat's Done card keeps its look), so each carries the same actions, and leaves the gallery once its thing is done anywhere. A card that arrives keeps the card in view where it is; a resolved card's place goes to the next. The Inbox thread card (user decisions 2026-12-05) answers in its first screen what happened and what the user must do: one status line (the kind's glyph and word in its hue, the agent or team, the project's dot and name, the age), the title on up to two lines and the pull request; What happened (the summary the agent recorded, else its report folded to 3 lines; on a failed card why it failed, the thread's newest error as `CommandCenterCard.failure` reads it, and no section when no error says); Needs your decision (`needsYou`, never inferred from text) under the straight attention bar with the flag beside its label, the needs-decision card carrying the attention bar on its own left edge too, or No action needed from you for an empty one, nothing when the agent did not say; one 56px button per published page with its kind as a word (Plan, Report, Acceptance report, …, Page for none) and, with two or more, Main on the one listed first — the page `record_outcome` named, else the newest published (user decision 2026-12-05); the agent's full report folded to 3 lines behind Show full report; and an action block in the card's footer (sticky at the slide's bottom): one full-width 44px primary chosen by the card's kind (`inboxActionsOf`: Reply on a decision, Archive on a finish, Retry on a failed solo chat, Unarchive once archived), a row of labelled buttons of equal width (icon over word) under it, and the action that puts the card away (Dismiss, Archive on a failed solo chat) apart at the right, quiet; no Undo after Dismiss (user decision). While the reply box has focus on a phone the row and the apart action hide. On a phone every press a gallery card draws is 44px tall (`GALLERY_ACTION_CLASS`): its quiet presses, its Show more toggles and its reply box's send and attach buttons; the status line carries the card's one age. The Inbox button's count covers every card, and its tooltip splits them the same way.
- A second view of the command center's threads (cards grid, board columns), or a switch between views: the page is always the graph (user decision: no chat / graph / both switch), with the manager's chat in a `FloatingWindow` over it (`compact` with `shelf`: the composer shelf, a one-line composer with its agent chip, and the agents panel only when the header's panel button opens it, as a column beside the conversation — whether it is open is the thread's own flag (`AGENTS_PANEL_COLLAPSED_FLAG`), so a panel opened in the maximised window stays open once the window is back to its normal size, the conversation giving up width; `components/floating-window.tsx`: moved by its head, resized from any edge or corner, maximised to the page and restored, closed from its head or by Escape, with no minimise (user decision: the chat button already opens and closes it); clamped to the page and drawn inside it again when it shrinks; closed, it stays mounted and hidden, so the chat keeps its state; on a phone a `fixed` layer from the screen's top, over the title bar, down to the tab bar, which stays in reach (the bottom edge only while the keyboard has put the bar aside, `useBottomTabBarShown`), its close button the way back, hidden with its page — user decision 2026-12-04), opened and closed by the chat button in the graph area's bottom-right corner (`command-center-chat-toggle`, hidden on a phone while the window or a thread card fills the page; it carries the number of the manager chat's unresolved Settings notices — open and not dismissed, `useManagerNotices`' `unresolved`, the same on every device and shown with the chat closed — as `command-center-chat-notices`, user decision: no header counter, no pinned block), with the working-threads tile (`WorkingThreadsCard`: a 44px pill of the agents tile and its counts, "3 working", as the redesign's corner draws it; the same counts in its label and hover panel) just left of it, hidden with it (user decision), and a full-height right sidebar showing the timeline, opened by its header button — user decision. A waiting request's card there is headed by the same block the manager chat's relayed card carries (`ThreadRequestContext` in `chats/thread-question-card.tsx`: the card's ways into the thread — Open chat, New popup, Go to thread — the thread's head with faces and labels, and the messages before it), so it says as much about the thread (user decision 2026-12-03). The manager chat draws the same tile at the right end of a row of its own directly above the message box, inside the chat column the message box stands in (the dock's `DOCK_COLUMN_GUTTER`, `chats/chat-column.ts`), so it never covers a message or the message box and never drifts to the window's edge (`chats/Chats.tsx`'s `transcript-corner`, fed by `hosted.workingThreads`, drawn only while one thread works); its threads are the ones the manager node counts as working, `isWorkingThread` with the project filter applied, in the order the graph stands them (`workingThreadsInGraphOrder` over `orderedBlocks` in `command-center/graph-order.ts`, which `graphBlocks` builds on: project blocks in order, inside each the block's own order, a manual one included; a dragged block or a pinned card keeps its place in that order), built by `CommandCenter`'s `workingThreadOf`, the same mapper as the board's tile, and each row opens through `showThreadFromWindow` as the manager chat's own links do (user decision: the manager chat shows who works where an ordinary chat shows its agents). Nothing on it loops but the app's `Spinner` at its `stepped` pace (still under reduced motion) in a working card's head and in the working manager's state (a smooth spin repaints every display frame, and one on the SVG itself restyles the page every frame — measured; user decision: the looping borders, glows and flowing wires it replaced kept the GPU and the renderer busy while threads worked; never bring back an endless canvas animation); its other motion plays once — a node's entrance and a shown card's flash (`.cc-node-in`, `.cc-flash` in `styles/global.css`, off under reduced motion) and a dot travelling a wire per message. The graph is React Flow, the team graph's library, laid out by `command-center/graph-layout.ts` (`layoutBlocks`) — the manager on top and one block per project under it (user decision: a project is a block, not a colour), left to right in the project order the header filter uses and wrapping once a line is `perLineFor` cards wide, each line centred, the threads of no project in a last block "No project"; a block is a tonal panel with no coloured edge, headed by its project's colour dot (none for No project), its name, its thread count (every thread of the project, those past the node cap included) and how many work, and the threads past the cap (`MAX_THREAD_NODES`) end their own block as a Show N more press with no wire of its own (user decision: one wire per block), which draws every thread of that block, and Show fewer hides them again (kept in renderer memory; a focus on a thread past the cap shows its block the same way) (`project-block.tsx`, a React Flow node of type `block` drawn behind the thread nodes with `pointer-events: none`, so a drag on it pans the canvas — except on its header, its `dragHandle` (`.cc-block-handle`), by which the whole block is dragged on the desktop (user decision: move a block by its name) — never React Flow parent nodes, since pins, wires and open-card slots are absolute flow coordinates); inside a block its threads stand in reading order, working first (`BLOCK_ATTENTION_ORDER`), then by attention (`attentionOf` in `card-view.ts`, top to bottom by `ATTENTION_ORDER`: blocked, question (only threads asking the user), working (threads the manager awaits a reply from included, chip "Awaiting reply"), quiet, inactive after a day, then done (a thread whose board card is Done or whose outcome is recorded stays on the graph at full strength until it is archived, while a card inactive after a day is faded to .55 as the step-5 reference draws it; a failed one stays blocked and an asking one stays question) — user decision; working threads stand newest started first, every other band newest activity first, so a running thread never moves its card) — unless the user set the block's order by dropping a card into it, an order kept per project on this device (`commandCenter.blockOrders`, `command-center/block-orders.ts`, pruned to the board's threads) that status changes never reshuffle, a thread it does not name joining before the first named one the automatic order puts after it (`orderedWithin`) (user decision: kept until Reset layout) — each card as tall as what it shows; one indented column on a phone, each project's heading and threads inside the same tonal panel with its dot as on the desktop (`layoutColumn`'s `frames`) and no wire, as the design draws it, never draggable there. A card's board card (`CommandCenterCard.task`, the card it works, nothing else) is a label on it. A card's head is the shared `ThreadHead` (`components/thread-head.tsx`, the same head the manager chat's thread cards wear); its quiet Show chat, archive and Open in Chats icons stand in its footer, off the title line, so the title stays readable (user decision: titles were cut to a letter), shown on hover and keyboard focus and always on touch, their room kept (decision `cc-actions = hover`), while a question card's Answer stays shown, a tonal button rather than the filled primary (user decision: the white one shouted); a finished card trades the archive icon for a worded Archive there, its one archive control (user decision: no second archive control on a Done card). Every archive control on the page — the node's footer, an open card's head, the manager chat's thread cards (one archive control per card: the head's archive icon on a message or wake card, the worded Archive alone on a Done card, Unarchive alone once archived — user decision), and the timeline's finished rows — reaches the one flow through `ThreadArchiveContext` (`components/thread-archive.tsx`), which `CommandCenter` provides; it always asks first with the sidebar's own dialog (`components/archive-thread-dialog.tsx`, Extract lessons included — user decision), then shows an Undo notice that unarchives; with no provider (the Chats page) nothing is drawn; Open in Chats, a card's Go to thread (`ThreadDestinationsContext.goToPage`, the Inbox gallery closing first), and the off-board toast's button, are the only controls on the page that leave it (user decision); the manager node opens nothing. Each project on the graph has a colour (`project-colors.ts`: the app palette in project-name order over every project on the board, so the project filter never recolours one), worn only as a dot — in its block's header and on a project label — never as a frame or a stripe (user rule: a coloured accent never follows a rounded corner); there is no legend of project colours (user decision), while the header's one 46px row carries the state legend, Blocked / Question / Working / Quiet with their counts (decision `cc-counters = header`). A node's card never cuts its head: its title folds onto two lines and its labels run onto more (`ThreadHead`'s `wrap`), and each node reports the height it is drawn at (`useReportHeight`) for `graphRows` to lay it out at, `threadCardHeight` being only the first guess (user decision: elements were cut at the card's edge). The phone column's flow pane yields vertical panning to the page (`.cc-touch-scroll` in `styles/global.css`, unlayered so it beats xyflow's unlayered `touch-action: none`; a Tailwind utility in a layer cannot), or a finger cannot scroll it. A thread opened on the graph is not a second view of it: its node turns into one card in its own place, the node's head on top and the thread's chat under it (user decision: the node becomes the chat's header, one width, resized as a whole). The node becomes a `slot` node as big as the card at zoom 1, so the layout leaves room in its block (`layoutBlocks` gives each box its own width and the block grows to fit it, to the right and down from where it stands with every card closed, so opening or resizing a card never moves it, its block or any block before it on its line — only the blocks after it along the line and the lines below move to make room) and the wire still ends on it; the card itself is drawn by `command-center/thread-card-layer.tsx`, a sibling of `<ReactFlow>` inside `GraphView`'s provider and never inside a node, a `NodeToolbar` or the transformed viewport (a `Popover` or `Menu` fixed panel would be captured there), placed on its slot's top-left corner and scaled with the graph by CSS `zoom` on an inner wrapper, both set through refs from one subscription to the flow's transform (while a zoom moves the wrapper is scaled by a transform instead, and takes the zoom as CSS `zoom` once it has rested `ZOOM_SETTLE_MS`, because every step of CSS `zoom` lays the whole chat out again — measured as a third of the wheel events dropped with one long chat open), so it covers its slot at every zoom (user decision: the open windows shrink and grow with the graph); `zoom`, unlike a transform, leaves the fixed overlays inside the chat in place, and `Popover` and `Menu` (viewport anchor) undo it with `counterZoomStyle` (`components/ui/css-zoom.ts`) so they open full size at their trigger (a `Dialog` is portalled to the body, outside the zoom); head drags and resizes divide the pointer's move by the zoom (a live resize is also capped to the pane on screen), and the transcript's scroll arithmetic divides a difference of two rects by `cssZoomOf(scroller)` before adding it to `scrollTop` (rects read in viewport pixels, `scrollTop` in the scroller's own — measured in Electron), its chat (`thread-card-chat.tsx`: `Chats` with `hosted`, the existing run read by id from both listings through `chats/read-run.ts`, its queue under `command-center-thread:<runId>`, drawn with no chat header of its own — `hideHeader`, since the node's head is the card's one header, user decision, so no agents panel either: a `compact` chat draws it only from its header's button; `compact`, so no composer shelf, and a one-line composer reading "Write to this thread…" with no model chip, `hideRunSettings`) behind `memo`, so a pan draws no chat again. It resizes from its corner, which wears a visible grip, and from its bottom and right edges, never past the graph pane, and keeps its size per thread on this device (`commandCenter.cardSizes`, pruned to the board's threads); its collapse chevron turns it back into the node and unmounts the chat. Any number may be open (user decision), held in renderer memory (`command-center/open-cards.ts`); an open card's thread keeps the band and order it had when it opened, always has a node even past the Show N more cap, and opening or closing one never refits the view. A thread's node, and an open card by its head, can be dragged once a press travels `DRAG_THRESHOLD` — its wire is drawn with no `d` transition while it moves (`moving` on the contact edge), so it stays on the node rather than gliding after it, and the nodes and wires are `memo`'d on what they draw, so a drag frame redraws only what moved — (`thread-card-layer.tsx`; a shorter press stays a click), never on a phone. Every drag or resize of a card or of the manager's window runs through `components/use-pointer-gesture.ts`, which ends it once on a release the window never saw: a move with no button held, a lost pointer capture, a cancel, a window blur or a hidden page. The drop is kept per thread on this device as an offset from the manager node's top-left (`commandCenter.nodePositions`, `command-center/node-positions.ts`, pruned to the board's threads; `run-records.ts` is the per-thread localStorage map it shares with the card sizes). `layoutBlocks` stands each pinned box there, out of its block, which shrinks around the rest, and a block it would touch moves along its line past it with the blocks after it — nothing else moves (user decision: working cards stay on top); a block is judged for that at its size with every card closed and its Show N more folded, so a block an open card or Show N more grows keeps its place and a pinned card or placed block it now overlaps moves along instead, for as long as the card is open (user decision: the block whose card opened stays where it is, what is around it moves); while a card is dragged nothing else is laid out again: every other block keeps the place and size it was drawn at and the dragged box moves, wired like a pinned one (`withBoxAt`), while its own block makes room for it — with its centre inside that block, a dashed drop slot the card's size (`dropSlot` node) stands at the reading-order place nearest it (`slotIndexFor`) and the block's other cards reflow round it (`withBlockItems`), and outside it the block closes up as it will after the drop (user decision: show the space a card will land in); dropped with the slot shown, the card takes that place in the block, its pin forgotten (`onUnplaceNode`) and the block's order stored (`onOrderBlock`, nothing stored for a drop back where it stood), and dropped without it, its pin is laid out on the drop; a block dragged by its header moves with its free cards, open cards and its Show N more (`withBlockAt`), its wire drawn with no `d` transition while it moves as a dragged card's is and is kept per block on this device as an offset from the manager node's top-left (`commandCenter.blockPositions`, `command-center/block-places.ts`, pruned to the projects on the board), where `layoutBlocks` stands it out of its line, wired with an elbow like a pinned box, the blocks of its line keeping their places and one it lands on moving along its line; cards pinned out of a block stay where they are when it moves; it lays every block on the line and at the left edge it has in the graph with every card closed and every box in its row (`frame`, that layout itself) and centres the manager on that layout's width, so neither a pin nor an open card moves the manager and with it every pinned node; one wire runs from the manager to each block (user decision) and carries the contact pulses of the threads inside it, and a pinned node keeps a wire of its own, an elbow from the manager's bottom (user decision: a moved node stays put and the rest lays out around it); every wire lies under every block and card (`WIRE_LAYER`, below the blocks' `zIndex`), and a card's ground is opaque (a failed card's tint is laid over the card colour), so a wire never shows over a card or under a label only (user decision: one layer order). Reset layout, in the zoom controls while any card place, block place or block order is stored, forgets them all; Reset zoom, above them while the zoom differs from the width fit the page opens at (`atDefaultZoom`), takes the view back to it and lets the view refit on the graph's width again. A wheel or two-finger gesture is latched to what it started on (`command-center/wheel-latch.ts`, a window capture listener, `WHEEL_LATCH_GAP_MS` of rest ends it): one that starts on the flow keeps panning or pinch-zooming it through `wheelStep` over an open card, the manager's window or anything else, and one that starts elsewhere never moves the flow (user decision: panning stopped as the pointer entered a card's chat). The canvas pans without bounds (user decision: no `translateExtent`); Fit and Reset zoom bring the graph back. The view refits itself on a canvas resize, and on a change of the graph's width only until the user pans or zooms — a drag, a new thread or a band change never overrides the user's own view. On a phone the open card fills the graph pane, one at a time, with a back control and a phone back entry. A card closes when its thread leaves the board. While the page is hidden its pane measures 0×0; `GraphView` keeps the last real size, so the flow and every open card's chat stay mounted and nothing re-reads on return (a card's chat reads a first page of `REMOTE_HISTORY_PAGE` rows, `transcriptPageCap`, and `CommandCenter` keeps `threadIdentities` the same object while `sameThreadIdentities` holds, so a board update draws no card's chat again). Every in-page way to a thread — a node's title or Show chat, the answer popover, the Inbox gallery (closing it first), the timeline, a thread link in an open card — goes through `CommandCenter`'s `showThread`; the manager chat's own links and its working-threads tile go through `showThreadFromWindow` instead (below); the working-threads tile in the graph's corner only points at its thread (`pointAtThread`: the project filter, a pan and the flash, no card opened — user decision; on a phone, with no canvas to pan, it opens the card), and it has no second way to open one (user decision: Open in window removed): the manager's own thread opens its chat window; any other closes the manager's window on a phone and its thread window on a desktop, switches the project filter to the thread's project, opens its card, pans to it and flashes it (`.cc-flash`), and a thread opened from inside the manager's window on a desktop (the manager chat's `onOpenThread` or its working-threads tile, `showThreadFromWindow`) opens in a thread window instead of as a card: a `FloatingWindow` over the page (`command-center/thread-window.tsx`, z 35 and up, so it stands over the manager window at z 30) with the thread's chat, first opened centred at 88% of the graph area and at most 1040px wide, each further window stepped 24px down and right, and up and left from where it opens once the graph area has no room that way, so no two windows share a place (`command-center/thread-windows.ts`) — a thread card's Open chat (`ThreadDestinationsContext.openChat`) shows its thread in the one shared window, which takes the next thread opened that way in its place (`reuse`), while a card's New popup (`popOut`) and every other way into a window open the thread's own window that stays (`open`; a thread shown in the shared window becomes its own then), and a thread already in a window is brought forward rather than opened twice; every window, shared or its own, is one stack, so Escape closes them front first (user decision 2026-12-04: one window stack, #818 built on #819) — every window reusing the one rect the user last moved or resized, remembered on this device (`commandCenter.threadWindowRect`), and Reset size (shown only while a rect is remembered) forgetting it; its head is the card's head with Open in Chats, Archive, Reset size, Maximise and Close last, no up-chevron; Escape closes it and gives the keyboard back to its opener, and Escape goes to the top window: pressed in the manager's window, or with the keyboard on no control (after a press on a window's empty part), it closes the front thread window first and the manager's window only once none is open (its Close control always closes it); a press in it brings it forward, and a thread is open in one place only, so opening it on the graph closes its window and opening it in a window closes its card; on a phone there are no thread windows and the thread opens full screen. A card (`ThreadCardLayer`) stays at z 20, under the manager's window, whichever way it was opened (`CARD_Z`); closing a card `showThread` opened gives the keyboard back to the control that opened it; a thread no longer on the board raises a toast whose Open in Chats is the way out. Its pan is marked as the view's own, so it does not close the answer popover. A card's Answer opens `command-center/answer-popover.tsx`: a `Popover` (`anchor="viewport"`, drawn outside the flow, whose transformed viewport would capture a fixed panel) hung from the pressed button, with no header of its own (the node or row it hangs from names the thread), its content scrolling inside a capped height so its footer stays reachable, holding that run's cards through the gallery's own `RequestCard` (`command-center/request-card.tsx`) and answer path — never a window (user decision: a window looked crude for it). It closes once the run holds nothing to answer, on a press outside it and when the view pans or zooms (`onViewportMove`), since a transform leaves it behind. Its nodes get `onNodeClick`, or React Flow sets `pointer-events: none` on them and no card answers the mouse.
- Always-visible controls for an absent axis.