Transcript, events, cards and workflows
Conversation members
ChatFooterDock reads BrainChatProvider membership to show the owner followed by participants above
an expanded statusline model. Solo conversations, unknown membership and focused child sessions show no
stack. It reuses MarkStrip, Avatar and AVATAR_STACK_SIZE: five faces followed by a named +N mark
keep the model's horizontal space unchanged on phones. Every mark names itself immediately on hover,
keyboard focus or tap; the overflow mark names all remaining members. Snapshot and listing resyncs
update this projection directly, without another request or membership cache.
ConversationParticipants owns participant list/invitable/invite/remove/leave operations behind
/brain/sessions/:id/participants and /invitable. The response names the current owner and join-ordered
guests. Only the human owner invites or removes another member, regardless of administrator status;
a guest may leave themselves, and only administrator agents may invite on their account's behalf. Invitations exclude channels,
delegated/child/pending-fork conversations, existing members and non-human accounts.
GET /brain/sessions/:id/invitable returns every human account of the instance except the owner and
current participants, whether or not they belong to the conversation's Project. Host conversations use
the same rule; the former 409 not_project_member refusal is removed. A missing or non-human invite
target raises InvalidParticipant in participants.ts; brainParticipants.ts returns 409
invalid_participant. Other invite conflicts remain not_shareable and already_participant.
Mutations recheck under the existing send-to-session lock, flush persistence/publications and dispose the
old runtime once after current work settles. The next turn respawns with the current shared prompt.
Removal detaches that viewer and publishes a recipient-specific removed invalidation, without an alert.
Invitation raises conversation.invited:<sessionId> through AlertService with a conversation link;
settled mention alerts use the brain event boundary.
The existing BrainConversationMembership projection includes the required boolean agentPaused
in personal/managed listings, status and stream snapshots. capabilities.pauseAgent is true only for
the owner or a live administrator viewing an ordinary conversation with at least one guest, including
non-member oversight. Other guests see the state but cannot change it. Clients must use that capability
rather than infer authority. The oversight view has no composer menu; no new control is added there.
PUT /brain/sessions/:id/agent-pause takes strict JSON { paused: boolean } and returns 200
{ agentPaused: boolean } (BrainAgentPauseResponse). Invalid bodies return 400; a non-admin guest gets
403 forbidden, a missing conversation or a foreign conversation without administrator oversight gets
404 unknown session, and a solo conversation 409
not_shared_conversation for pause or resume. The live API catalog exposes the route to ElowenApi.
Pause/resume reuses the owner-scoped conversation.membershipChanged: true invalidation, already fanned
to every attached member and oversight stream as resync with reason: 'membership-changed'; clients refresh the
existing snapshot/list query, never poll. Removing/leaving the final guest clears pause atomically.
A pause affects only new turns. Existing work continues; people still exchange normal authored
messages, mentions, reply quotes and reactions through the journal and the usual user /
message-stored events. Resume sends nothing. The next normal message starts a turn whose history
contains everything written during the pause. See turn admission.
In the web the control is the last group of the composer's Options menu (ComposerActions, owner's
decision 25 Oct 2026), "Shared conversation", shown only while the bound conversation has a guest. Its
one row uses the menu's own MenuRow (icon, title, one-line hint), like the voice rows: Pause the agent
or, while paused, Resume the agent. It is enabled only by capabilities.pauseAgent; a non-admin guest sees the same
row disabled. useSetAgentPaused (web/lib/mutations/brain.ts) calls elowenClient.brainSetAgentPaused
and invalidates ['brain-sessions']; the menu closes on select, so a refusal is toasted from the promise.
BrainChatProvider keeps agentPaused in its membership, from the snapshot and the listing row, so the
membership resync and the list refresh change it live in every member's tab. While it is set,
ChatFooterDock shows one muted status line above the composer (chat-agent-paused), and the provider
treats a user echo as a stored message, not a turn opening: it starts no thinking, names no turn
writer, and a send reserves no live work header, because no idle would ever close one. A send made
before the pause reached the tab releases its header at the echo.
Members are managed from the conversation list only (owner's decision, 25 Oct 2026); the chat bar
carries no members control. The membership projection's capabilities.invite (membershipOf in
statusService.ts: the owner of an ordinary conversation, never a channel, a delegated or child session,
a guest or an overseeing administrator) puts "Invite a member to the conversation" into that row's ...
menu and context menu (ConversationListRow, after Rename). It opens ConversationMembersDialog for
THAT row, whichever conversation is open: ConversationListPanel keeps only the row id, so the dialog
follows the refreshed listing row and closes with it. The dialog is a small Modal (centered; a sheet on
a phone) titled with the participants and the conversation's name: the members from useParticipants
(owner first with its badge, then guests in join order, each with a remove button behind
ConfirmDialog), then the accounts useInvitable offers (all other human accounts of the instance,
not just Project members or administrators), each invited with one icon button. Both reads run only while it is mounted; loading
draws skeleton rows (the listing's member count for the members), a failed read is an ErrorState with
retry, and an empty candidate list says so in one line. Focus returns to the row's kebab (or its open
control, from the context menu) when the dialog closes. Invite and remove use useInviteParticipant and
useRemoveParticipant, whose ['brain-sessions'] invalidation refreshes the members, the candidates and
the personal listing together; the instance listing (['brain-managed-sessions']) follows the owner-scoped
membershipChanged conversation frame. A refused invite is a toast: a 409 keeps the dialog for another
pick, 403/404 close it.
BrainChatProvider owns the bound snapshot's BrainConversationMembership, viewer and capability
projection. List refresh keeps membership current; unknown membership never implies ownership.
Guests cannot rename, edit the icon, select the model/Project/reasoning/mode or decide the owner's plan.
Stop is separately governed by daemon turn control: the writer or owner may stop the running turn.
Participation lets a guest work in the conversation's Project through this conversation's turns only,
with their own tool grants and permissions and the owner billed. Guest turns omit memory recall;
the owner's own turns still honor their autoRecall setting.
It does not add Project membership, put the Project in the guest's Project list or grant file, terminal
or API access outside the conversation. The guest still sees which Project that is: the bar's disabled
ProjectPicker and the guest's list row and Project facet name it from the daemon's
project.identity / projectIdentity (name and kind glyph only) when the guest's own offer or catalog
lacks it (computer visibility). Removal, leaving or conversation deletion ends this access;
already accepted queued or recovered input is refused as participant_removed, while a fresh
non-member send remains concealed as an unknown session. Shared-turn admission no longer produces
project_access_required. Sharing adds no read-only mode,
expiry, artifact restrictions or configuration options. Guests may use all their granted tools,
including Delegate, DelegateContinue and workflows, in host and managed conversations. Descendants
persist only their shared conversation and original writer reference in the existing delegated scope;
core rechecks live participation after continuation or restart. They keep owner billing without gaining
the owner's API account (ElowenApi remains denied for guest descendants).
Invitation refusals have one localized mapper, inviteRefusal in ConversationMembersDialog.tsx,
reused by mention invitations.
List actions come from daemon capabilities, not guessed roles. The browser narrows pin to personal
rows and preserves administrator deletion through the existing managed route. Shared rows show
MarkStrip kind="conversation-members" (owner first, three faces, then a count, every name in its
label), including on phones; this row stack is where a guest or an overseeing administrator sees who is
in a conversation. A guest's row menu offers Leave (capabilities.leave), confirmed by the panel and sent
through the list controller as DELETE /participants/me, which refreshes both listings. Owner avatars use
the listing's owner profile, not an administrator directory read.
The existing useElowenEvents conversation handler consumes removed, clears a bound removed
conversation and invalidates the same lists; no second stream or membership authority is created.
Shared transcript, replies, reactions and mentions
Human messages with author (the daemon records it for every human writer, owner included, once a
conversation has participants) are drawn by author run in AuthoredMessage (ChatTranscript.tsx): the
writer's Avatar (the shared component and its fallback colours, no ring or accent) in a column left of
the bubble, the name and the first message's time above the first bubble of the run, and the writer's later
consecutive messages hanging in the same column, naming the writer only to assistive tech. The header is
quiet: the name in the text-small role and the foreground colour, the separator and time in
text-muted-foreground. BrainChatSurface decides the run while it maps the transcript blocks: a
message continues the run (continuesRun) only when the block drawn right before it is the same writer's
message, so the agent's work, an event row, a divider or an unattributed message starts a new one, and an
appended turn never regroups earlier ones (an older page can turn the first loaded message into a
continuation; the message's body carries data-chat-anchor, so the reading anchor holds the bubble rather
than the turn and dropping the header moves nothing being read). The run's first bubble keeps only its reaction row on its metadata line because the header
carries its time; a continuing bubble keeps its own time. The column is padding on a plain block
(.chat-author-run in chat.css) with the avatar in a zero-height slot, so desktop text still flows around
the dock float and the avatar never moves content: 28 px plus a 12 px gap on the desktop page, 24 px plus
8 px on a phone (phone from useMobileViewport) and in the compact dock. The slot centres the avatar on
the middle of the text-small name line (--text-small--line-height), so both sizes sit level with the
name. The agent is named the same way (owner's decision, 26 Oct 2026): BrainChatSurface passes
authored to AssistantRun when the run's opening human turn has author, the same data that attributes
people, and the run then sits in the same .chat-author-run column; where showRole opens a speaker block
its head is the shared AuthorHead with the Chetty mascot (/chetty-icon-192.png through Avatar's fixed
src) and t.chat.roleElowen, with no time, because the agent's time, model and duration stay in its
MessageMeta footer. A run with no opening human turn in the loaded window (a run continued from an older
page) draws the plain layout until that page loads. Unshared historical messages,
and every conversation nobody shared, retain their plain presentation, the agent's runs included. BrainChatSurface passes the signed-in account to Message and AssistantRun, which
highlight structured mentions of the viewer, not matching prose: a human message's author run row, or the
first text of an assistant step whose Address named the viewer, sits on the .chat-mention band
(chat.css) and carries the screen-reader chat.mentionsYou. The band is a faint --color-muted fill with
no border or accent colour; it bleeds into the gutter by the padding it adds, so the text, the bubble and
the avatar keep their positions, and the bubble itself looks like every other bubble. Only an attributed
message (one with author) can carry mentions, so an unattributed bubble draws no highlight.
Inside the text, every structured mention is drawn as a chip (MentionChip.tsx), for a person's message
and the agent's alike, and only from the stored mentions ({ id, name }): the ids a person's composer
sent, which the daemon resolves and stores with the message, or a step's Address. No daemon change and
no prose matching is involved: mentionTokens.ts turns each mention into the tokens it can be written as,
@ plus its stored name or the member's current mentionLabel (the label the composer inserts and the
agent's turn context names members by), and splitMentions cuts a text only at those exact tokens where
one starts a word and ends one, so jana@example.cz, @Janet and an @nobody no mention names stay
text. BrainChatSurface passes people, the bound conversation's owner and participants by account id
(from membership), to Message and AssistantRun for the chip's current avatar; a mention of someone
who has since left keeps its stored name and the monogram. A person's bubble is plain text, so
MentionedText renders the parts directly. The agent's Markdown goes through ChatMarkdown, which marks
the tokens in the sanitized document's prose (markMentions: never inside code, pre or a link, which
also covers autolinked addresses) as empty slots and fills each slot with the same MentionChip through a
portal before paint, so one React component, with the shared Avatar, draws both; text without mentions
is never scanned. The chip is the 16 px Avatar (decorative) and the name as written, in medium weight, on
a pill mixed from the text's own ink (.chat-mention-chip in chat.css), so it reads on the document and
on each skin's user bubble; the viewer's chip (data-viewer) takes a stronger fill. It stays an inline box
with thin padding, so it never changes the line height; the avatar is held to the name's first word with
nowrap (a line may always break after an inline image, whatever character follows it), and a longer name
wraps between its words, continuing on the next line with its own rounded ends. Assistive tech hears
chat.mentionChip before the name ("Mention: Jana"); the prefix and the avatar are select-none, so a
copied selection keeps the name. The CLI prints mentions as written.
Each stored user message and each assistant text step has its own reaction target, including text in
folded work. MessageReactions (web/modules/advisor/MessageReactions.tsx) draws the one reaction row at
the bottom of the message: a borderless ghost sm button per canonical kind (thumbs up and thumbs down,
lucide ThumbsUp/ThumbsDown, never an emoji), the count beside a used kind, the viewer's own reaction
pressed (aria-pressed, filled glyph, primary ink) and the reactors in the tooltip; a used kind's
accessible name carries its count ("Thumbs up 2"). Under an assistant
step the row is its own line, in the block (chat-turn__reactable) that carries group/reactable; on a
person's bubble it shares the metadata line inside the bubble (the studio skins give it the bubble's
paired ink). The row is in the layout from the start, so revealing it moves nothing: on a pointer that
hovers it is transparent until the message is hovered or holds focus, and stays visible once the message
has a reaction. On (pointer: coarse), (hover: none), measured by the existing useMediaQuery,
only used kinds stay visible as content (including other people's reactions); empty actions wait for a
500 ms touch hold on that message's group/reactable boundary. The row owns this local reveal state:
a press outside the message, any captured scroll event or a chosen reaction closes it, without changing
stored reactions. Short, cancelled or moving presses do not reveal it; buttons, links and editable content
keep their own gestures. Only interactive touch rows install listeners, and unmount removes them and the
pending timer. Nothing prevents default, captures the pointer, clears selection or suppresses the native
context menu/copy callout: the browser may show that callout alongside the actions. Physical iOS/Android
callout presentation is not reproduced by the Chromium mobile harness.
The buttons retain their touch-target size, accessible names and ordinary tab stops even while transparent;
keyboard focus-visible reveals a hidden action, and screen readers can still activate it.
useMessageReactions owns the optimistic overlay and reverts a failed request
with a toast. A message that arrived live becomes a reaction target when the daemon's message-stored
frame gives its turn the stored entry id (brain events),
with no reload; the provider moves submittedRun.userId with the renamed echo, so the sender's run keeps
its key.
Nobody reacts to their own message. writtenByViewer mirrors the daemon's rule from data the transcript
already has: a user message is its author's, its deletedAuthorId's when that account was deleted,
or the conversation owner's (ReactionControl.ownerId) when it names none; assistant messages are never
a person's own. The viewer's own message, and every
message for a viewer who may not react (administrator oversight, a child view), get the row without
onToggle: only the kinds someone used, aria-disabled, with their tooltip, and nothing at all while
nobody reacted. The provider's reactToMessage refuses an unbound/read-only conversation; neither the
surface nor the provider duplicates reaction state, and the daemon answers a self-reaction with HTTP 409
own_message (brain events).
A successful model Address marks the next text's replyTo. ReplyQuote is a quiet reference row above
that text: a 2 px rule in --color-border (never the primary colour), then the author's name (Chetty for
the agent) and the one-line, bounded snippet, truncated to the row, all in muted text-small with the
snippet at normal weight; it draws no avatar or mark. The row is a button that takes the foreground colour
on hover and the --color-ring focus ring. useReplyQuotes in replyQuotes.ts resolves loaded history first, then the
member-authorized single-message read cached by conversation and entry id. A 404 shows unavailable;
other failures show a toast and a retry rather than pretending deletion. Clicking a quote asks the
surface's existing disclosure state to reveal folded text, then jumps/focuses the real message box,
loading at most ten older pages. Conversation changes cancel the lookup. Only a target those pages did
not contain becomes unavailable, and only until a later page loads it; an older page that fails to read halts paging behind the transcript's
existing older-history toast and retry control, and the quote stays ready for another jump. A
/chat?session=<id>&message=<entryId> link opens a member conversation writable and jumps once ready;
an explicit binding refusal may use administrator read-only oversight. Missing targets report
unavailable without changing transcript authority.
Queued messages are one calm row each (QueueChips in ChatFooterDock.tsx): a muted Item of
size xs inside a labelled ItemGroup, with a clock in the media slot, or the writer's avatar and name
in a shared conversation, the text truncated to one line and a ghost icon-sm remove button. A caption
Queued · N appears from the second entry on; one entry is identified by its clock and the group label.
Shared queue rows use the same daemon backlog, with author avatar/name and per-viewer removable.
The HTTP seed supplies removability; the provider derives live-event removability from writer/owner
identity once. Only the writer's items, or anyone's for the owner, expose removal. Removing a waiting
admission cancels the producer, not merely its chip. Keyboard removal and recall select only a removable
entry; CLI recall independently uses the server's own-writer operation.
ChatFooterDock supplies ChatComposer with the people of the bound conversation the viewer may write in
(membership.capabilities.continue), shared or not yet: the members other than the viewer and, for the
owner only, the conversation's invitable people (useInvitable: every other human account of the
instance). The first @ of a conversation asks for that list through
ComposerMentions.loadCandidates, so opening a conversation reads nothing; from then on it refreshes with
the ['brain-sessions'] membership invalidations; moving the conversation to another Project does not
change it. Joined people are filtered out of a list read before their
invitation. A guest never invites and is offered the members alone. @ at
the start of the text, a line or a word, wherever the caret is, opens MentionPicker once someone
matches; with nobody to list it stays ordinary text, and the picker closes as soon as the caret leaves
the @query or selects a range. The picker is the shared Popover with a Command list, anchored to the
typed @ itself: caretRect (web/lib/textareaCaret.ts, the mirror-element technique: a hidden copy
of the textarea's box and typography with a zero-width marker at the index) measures the @ in viewport
coordinates on every positioning, a new anchor per query and per scroll of the field lets the list
follow the @ when its word wraps or the draft scrolls under it (the positioning watches the page's
scrolling, not the textarea's inner one), and Radix places it above, below when there is no room above, inside the
viewport. Rows are a small avatar, the name and a muted @username, about six visible before the list
scrolls; members come first and a quiet divider precedes the people to invite, with no heading or hint.
The textarea retains focus, arrows select, Enter/Tab inserts, and Escape closes while preserving text.
composerDraft.ts retains { id, token } with draft/stash. Only ids whose exact recorded token remains
in the submitted text are sent. Owner selection of a non-member confirms and completes invitation before
inserting; plain typed names never invite. Refused sends restore text and picks; HTTP 409
mention_not_participant drops only the returned stale id. The canonical send schema caps unique ids
at sixteen: selecting seventeen is refused without truncation or draft loss.
Chat keyboard and prompt history
BrainChatProvider.submit snapshots the existing composerDraft and records its raw text only after an accepted send, never composed attachment paths or refused sends. usePromptHistory reads the effective useMe().data.user.id (including impersonation) and useMyTerminalSettings().data.promptHistoryDepth, defaulting to the terminal's 100 and bounded to 20–1000. promptHistory.ts stores oldest-first strings in localStorage["elowen.chat.promptHistory.<userId>"], across conversations in that browser only. There is no anonymous bucket or server synchronization. Consecutive exact duplicates collapse; blank/file-only prompts do not enter history. Reads happen on demand so another tab's sends appear on the next browsing gesture. Storage/validation failures show a localized toast and do not turn a successful send into a refusal. A browsing gesture snapshots the list, avoiding index drift while another tab writes.
ChatComposer owns a PromptHistoryCursor: plain ArrowUp enters on an empty field, then walks older only at caret zero, placing recalled text at zero. ArrowDown walks newer only at the end, placing the caret at the end and restoring the pre-browse draft after the newest entry. Selection, modifiers and IME never trigger recall. Edits or account/conversation changes end browsing. The open mention picker, then slash-menu arrows and empty-field queued-message recall, run first. Hardware keyboards work on phones with no extra controls.
composerDraft.ts remains the provider's only draft authority, including restoreSession for sends refused after navigation. Its stash() parks raw text or pops the newest parked draft on empty input; stacks are conversation-local, capped at ten, not persisted, and forgotten with deleted sessions. A stash made during initial attachment follows the first bound session, just like its visible draft. Attachments are not stashed.
ChatKeyboard mounts once per BrainChatSurface, through ChatFooterDock.keyboardStatus. This optional render slot remains mounted independently of statusline visibility; its empty row takes no space. Pending state uses the shared muted Badge with role="status" in the footer's normal flow above the editor, in full and compact variants, never over the transcript. Its single native capture handler (including the former F9 listener) uses chatKeymap.ts and the pure packages/plugin-shared/chatKeys.mjs vocabulary. No runtime import crosses from web into daemon code. Focus must be inside that exact data-chat-keyboard-surface; open modal dialogs, menus, listboxes and editable controls other than the composer retain their keys. Shift+Tab/Ctrl+Tab mode switching is composer-only. Browser-reserved chords that the browser does not deliver cannot be intercepted; Cmd chords remain native on macOS. Copy/cut/paste remain native; Ctrl+X arms the leader only without a selection. The leader expires in two seconds, cancels on focus/window loss or session change, and announces pending state with a small live status. The keymap leaves plain Tab to the composer, which uses it only to insert a pending next-message suggestion.
Mounting or rebinding the keyboard performs no session-status read; the provider remains the lifecycle status reader. Ctrl+R reads the current model's reasoning levels only when invoked, then uses the existing reasoning writer (including its account-setting and open-picker invalidation). One shortcut read/write may be in flight at a time. A session/model/provider change (including a provider switch with the same model ID), child preview, voice takeover or surface unmount invalidates a pending read before it can write; read failures show the API error toast and never apply a cached level.
| CLI action | Default | Web action |
|---|---|---|
leader |
Ctrl+X | Prefix, two-second timeout |
mode_toggle |
Shift+Tab / Ctrl+Tab | Build ↔ Plan via provider switchWorkMode; Workflow returns to Build |
reasoning_cycle |
Ctrl+R | Read current offered levels on demand with elowenClient.brainStatus, then apply the next level via useReasoningLevel |
stash |
Ctrl+S | Provider draft's session-local LIFO |
rewind |
F9 | Existing rewind |
subagent_cycle |
Ctrl+O | Parent → remembered sibling children → parent via existing drill-in |
subagent_stop |
Ctrl+X, k | Focused owned child, otherwise newest running child; existing abort endpoint |
telemetry_toggle |
Ctrl+P | Existing rail toggle; compact chat opens statistics |
queue_remove |
Ctrl+X, x | Remove newest removable pending item through onQueueRemove |
stop |
Ctrl+X, s | Existing viewed-conversation Stop |
reconnect |
Ctrl+X, r | Existing explicit stream retry, no resend |
help |
Ctrl+X, h | Existing command help |
theme_picker |
Ctrl+X, t | Existing allowed-skin cycle, not a new picker |
model_picker |
Ctrl+X, m | Existing controlled model picker |
sessions_picker |
Ctrl+X, l | Existing conversation switcher |
subagent_background |
Ctrl+B | Unmapped: web has no foreground-detach control |
quit |
Ctrl+C / Ctrl+Z | Excluded: browser copy/undo |
paste_image |
Ctrl+V (Windows CLI: Alt+V) | Excluded: existing browser file paste |
CLI preference overrides remain CLI-only. Locked/read-only or voice-owned composers do not stash, change mode/reasoning or manipulate the parent's queue. The keymap has no second draft, transport, permission or modal authority.
Next-message suggestions use BrainChatProvider status and the existing stream/snapshot boundary. ChatComposer shows the hint as muted placeholder text only in an empty, unlocked, idle composer without attachments or dictation, in both full chat and dock. Plain Tab, or a lone space typed into the empty field (phone keyboards have no Tab; the composer reads the changed value, so virtual keyboards that report no key work too), inserts and consumes it; Enter remains the normal send action. Shift+Tab preserves focus navigation, slash completion keeps priority, and an accessible description explains the two keys. Drafts are never overwritten. Sending, changing conversations or an empty snapshot clears local hint state.
Conversation list contract
The conversation switcher uses one list renderer for mine and administrator-only all.
Its feature contract lives in web/modules/advisor/conversationListModel.ts; rows and
toolbar receive data and callbacks rather than reading stores or deciding ownership.
ConversationListPanel reads sub-agent branches separately from the conversation forest:
countRunningAgents supplies running counts, and the plugin history branch renders the tree.
web/lib/conversationTree.ts only organizes conversation rows and scheduled-job links.
The controller adapts the existing personal and managed queries. Search, page, selection and
branch disclosure state belong to the mounted panel, keyed by view, and end on close or a change
of authorized scope. Facets and sort persist per browser, account and view as described below;
the pinned-section fold uses the shared per-browser useGroupFold preference.
Both listing DTOs include projectRef: ProjectExecutionRef | null, parsed from stored
authority in core. The browser joins stable project ids only to the authorized Project
catalog; a personal row whose Project is outside that catalog (a guest's shared row) is named
by its projectIdentity instead and is not unavailable. Host/no selected project, an unavailable
historical Project and a failed catalog read remain distinct. Managed activity omits unread; caller-owned pin/unread metadata
comes from the personal listing. Foreign unread is not applicable. The personal DTO
also carries required platform: 'api' | 'subagent' | 'web' | 'cli', projected by core
(ownerSurface in statusService.ts): api from stored API-token creation attribution,
subagent for a row with a parent session, otherwise web once the web participated and
cli before that. Mine's Type facet distinguishes API from the combined Web / CLI
category using that field, never a session-id parser. This origin mark does not change
ownership, continuation or action capabilities.
brainSearch(query, scope = 'mine') keeps caller-only search by default. Only
scope=instance broadens the existing route, through resolveUserReadScope.
Instance results cover the managed listing universe, channels included; transcript
exclusions and bounded newest-first hits remain unchanged. Search state is scoped to
the mounted view and late completions cannot update a different view.
The controller grants rename, fork, pin, icon editing and member management (invite) only to
caller-owned ordinary conversations. Foreign and channel conversations open read-only; authorized export and
administrator deletion keep their existing endpoints. Caller-owned deletion uses the chat
controller so deleting the active conversation preserves retargeting. Bulk operations
snapshot selected ids, run sequentially with the active conversation last for deletion,
freeze conflicting controls and retain failed selections.
Opening an ordinary row is navigation through the provider's existing selection seam. A newer
selection or an atomic stream resync may supersede its connection generation without making the
open fail; the newest connection owns the displayed transcript. Actual connection and permission
errors still reject. Callers that continue with a mutation or a voice callback use switchSession
or startNewConversation and must still validate the returned binding generation before continuing.
Filters use OR within a facet, AND across facets and search. Model identity includes
provider, owner means the hosting account, and status uses native program control.
Each option carries the mark its rows draw: the model's brand mark, the conversation status dot
(the same ConversationStateDot the glyph paints) and the platform mark, cron for scheduled
types. The marks are decorative, so the option text stays the accessible name.
Context-only ancestors remain reachable but are not selected as direct matches.
The existing conversation tree owns ancestry; branch enrichment never changes root paging.
Newest uses local-calendar date sections; every other sort is global. Mine keeps pinned
roots first, once only. Section totals count filtered roots before paging.
Rows use list/listitem semantics and one native open control; Space selects without opening.
Row actions and toolbar height follow the shared control scale (see Control heights).
A row's revealed actions — pin, rename, fork, export menu, delete and the saved-icon picker — form ONE compact
action group and that group takes the compact square (Button size="icon-sm", ActionMenu size="sm": 32px,
44px on a coarse pointer through the primitive's own floor), so it never mixes a 36px control into a 32px row.
The switcher's search, New and Options trigger are a toolbar and take the default step (36px, 44px on a coarse
pointer) at every width, because a toolbar is not a compact group inside a card.
ConversationSwitcherModal owns only the current view while open. It mounts
ConversationListPanel keyed by that view inside Modal size="page" and
ModalBody fill, without width or height overrides. Desktop uses the same centered
frame as Settings; phones use fullscreen. The local top row holds search, New and the
canonical PageFilters Options trigger. Phones use named icon-only action buttons;
desktop retains labels. The dashboard link stays below the complete toolbar.
Only administrators receive the first Options field, Scope: the shared SelectMenu
offers Mine first (User) and All conversations (Users), with the same icon/value
presentation as Cronjob's filters. All is active, contributes to the Options count and
prints its translated option label as a chip; resetting it returns to Mine. The modal
keeps ownership of this view and still remounts the panel on a scope change.
The administrator's view is remembered per browser and account (usePersistentState, key
elowen.conversationList.scope.<account id>), so the switcher reopens on the scope chosen last; an account
without admin rights always shows Mine whatever is stored. The facets and the sort are remembered too:
useConversationListPrefs keeps them in localStorage (through usePersistentState) under
elowen.conversationList.prefs.<account id>.<view>, one slot per account and view because Mine has no
owner facet or owner sort. The stored JSON is parsed into the exact filter and sort types; anything else
(unknown status or sort key, wrong shape, an owner value in Mine, invalid JSON) falls back to the defaults.
Search text, page, selection and branch disclosure state are never stored. The pinned-section fold
is stored separately under elowen.settings.fold.conversationList.pinned. A saved facet can outlive its
last matching conversation or render before the list options load. ConversationListToolbar uses the
stored value as its chip label until a matching option supplies a display label; the chip remains
active and resettable without dropping that facet or changing the other filters.
PageFilters also holds project, status, model, type and (in All) owner facets,
sorting, selection entry and administrator Delete all. Sort and its independent Direction
field both use full-width SelectMenu rows with an icon per option; Newest stays first,
and changing the key retains its existing default direction. Neither is an active filter.
Multi-value facets retain their
menu checkboxes and share selectTriggerVariants with the single-choice picker: their
field title names the axis once, while the trigger shows All or selected option labels
and a primary-colour glyph, not a repeated field title. Active facets use
PageFilterChips with individual and combined reset; selection entry and sorting are
not filters. Once selection mode is entered, its page checkbox remains beside the list.
Every conversation card has a dashed token border and the list keeps its existing gaps,
groups and nested branches. New opens NewConversationMenu, including its Project
chooser, rather than creating a conversation immediately.
The panel owns search, facets, sorting, root page, selection, manual expansion and
transient confirmations/drill-in. useConversationListController(view, { search, pageIds, onNavigate }) owns authorized reads and asynchronous per-id operations,
not a second session store. Mutations resolve true on success and false when their
scope or lifetime has changed; actual failures reject for localized panel feedback.
A successful write still invalidates the personal, managed, branch and search caches
when its original panel has unmounted or changed scope; lifetime fences suppress only
late UI completion, not cache freshness for another mounted consumer.
Owned deletion passes quiet: true through the chat controller so batches announce
once. Export accepts an optional AbortSignal and aborts outstanding downloads when
the controller unmounts. The branch hook's explicit enabled flag suppresses disabled
scope reads; placeholder data never crosses scopes, and a new page reports its
sub-agent metadata as loading rather than an exact zero. A zero-root search keeps
observing the last page request in the same authorization scope, including its first
pending response. Only request identity and bounded ids are retained by the hook;
response data remains in QueryClient. This lets schedule-name search recover its
parent without clearing search after the initial links arrive. Empty visible ids
disable new reads after a page has been requested, while an explicit retry remains
bounded to that last page; a scope change discards the retained identity. Before any
page exists, the hook requests GET /brain/conversation-links?scope=mine&ids= (or
admin-only scope=all) to discover authorized schedules without any sub-agent roots.
The client preserves an explicit empty array as ids=; an absent ids parameter
still requests the whole authorized tree. This keeps cold schedule-only searches
independent of filtered root paging, including a query entered while sessions load.
Sub-agent metadata remains unavailable until roots are visible again.
Authorized user-directory metadata retains owner-uploaded avatars through the existing Avatar renderer.
Both views render ConversationList once. Search waits
300 ms at two trimmed characters; pending/error/retry and bounded transcript results
are distinct from a successful empty list. The secondary line prefers the first
highlighted transcript hit, then native state; it never fetches a latest-message preview.
Newest groups roots as Pinned (Mine only), Today, Yesterday, This week and Older,
using the browser's local calendar and Monday week boundary. Name, Tokens, Model,
State and Owner order globally in Results, after Mine's pinned roots; direction
and stable recency/id tie-breaking remain available. Root section totals are computed
before paging, while descendants stay with their parent and never consume a page slot.
After a successful pin or unpin, the panel follows the operated root to its page in
the current filtered, grouped and sorted root order, once the committed pin projection
arrives. This lets the list restore the same focused row control after a section or
page remount; unpin can move forward several pages rather than always returning to
the first. Focus lost with the remounted control is taken back from the body or from an
enclosing element such as the dialog, whose focus trap catches it while the row is off
the shown page, never from another control. Failed pin writes leave the page and control focus unchanged, and pending
writes retain the shared busy fence.
One useNow subscription serves relative times and calendar rollover.
A page holds a fixed 30 roots that scroll inside the panel; data-conversation-root marks
only direct roots, and expanding a branch changes neither the page capacity nor the page-id
request. The shared paging
hook consumes a serialized facet key in its reset inputs. Its Pager total counts every
paged root, including contextual ancestors; section match totals exclude those ancestors.
Only an active facet passes the tree filter's fourth matchFacets predicate, so clearing
all facets restores manual expansion instead of forcing every family open.
Page selection includes only direct matching roots on the current page, excluding
context-only ancestors and an active rename editor. Search, facets, sort and page
changes clear it; refetches prune missing ids. Bulk delete and HTML/JSONL export
snapshot ids and freeze conflicting controls while processing sequentially. Export
explains separate downloads and reports initiated requests, not files saved by the
browser. Deletion keeps the active conversation last and retains failed ids for retry;
one batch summary replaces per-id error announcements. Administrator Delete all is a
separate full-scope confirmation naming all accounts and all managed conversations,
regardless of the current search, facets or page. The panel passes an optional native
DOM ref to the existing SelectionActionBar and observes its border-box height.
Its scroll area reserves that measured height plus the bar's computed CSS bottom
inset, so wrapped actions cannot cover the final root on a narrow phone. The reserve
ignores entrance transforms, follows bar resizing, and is removed with the observer
when selection clears or the panel unmounts; other registers keep their existing layout.
Scheduled branches mount PluginHistoryBranchHost in named regions with standalone
list/disclosure fallback content. Every session target uses parseBrainSessionTarget
and preserves its continuation flag. The separate Subagent drill-in draws its runs as
cards under the host's one back control and forces delegated navigation read-only.
Fixtures use the existing wire DTOs plus the declared feature row fields: a nullable Project ref, authorized Project or null, explicit unavailable flag, native status, nullable caller-relative unread, nullable pin timestamp and explicit capabilities. Plugin branches mount inside named list-compatible regions, never host table rows. No latest-message preview, database migration, persistent preference or compatibility renderer is introduced.
Local computer destinations
GET /brain/execution keeps authorized server Projects first, in the account's configured order, and
appends local devices in their connection registry order, including offline devices. The dashboard
composer therefore defaults to the first server Project while its persisted explicit local choice still
resolves to that device. Offline state stays visible to every consumer of the shared list.
ProjectMenuContent renders the same account-scoped execution-target list for chat, the dashboard composer and new conversations. A local row uses its opaque targetId and renders on one line: the device label, then the muted Computer · Connected or Computer · Offline status. It shows neither the startup path nor the conversation's working directory; the path still feeds the search and the ProjectPicker trigger's fallback. executionRefKey preserves that identity across selection and dashboard persistence without pretending it is a project ID. ProjectPicker names the selected device and reports its current conversation cwd, while read-only and child views retain their existing switch restrictions. The shared ProjectIcon renders local targets as a laptop without an editor blob request; project icons keep their existing cache. PluginChatProject also carries {kind:'local',targetId}, allowing existing chat-dock consumers to distinguish it before asking for project-owned data. No local targets means no additional rows or background work.
startNewConversation passes the picker's target in the existing brainStart request. The daemon
authorizes it through the Project selection resolver before the first spawn and startup instruction read;
the first send follows that confirmed binding. No follow-up execution mutation is needed for creation.
Resuming an existing conversation keeps its selected target. Later picker changes continue through
brainSetExecution and the existing Project switch boundary.
Connection lanes in the composer footer
ChatFooterDock is the single nonblocking presentation placement for degraded
transport, model retry and waiting_for_computer execution state. It consumes
connectionState, typed connectionFailure, modelRetry, executionState and
the provider's retryConnection action. Canonical observations replace retained
ready/reconnecting booleans; no admitted observation/failure means no invented
offline row. Fresh connected/ready transport disappears without clearing either
independent model or execution row. All lanes can coexist before the first text.
A typed start failure uses localized connectionFailure.startFailed with unknown
connection state and no retry button: reconnect cannot replay /brain/start.
Policy/stream failures use their typed labels and the owner's actual admitted
GET target through actions.retryConnection, never raw error/status prose.
A setup or reader failure cannot attest to current transport. Computer waiting
uses its typed phase without invented device names, timers or attempt counts.
Ordinary server notices remain separate; no string matching identifies retries.
The ProjectPicker trigger renders canonical observation from
telemetry.project?.connectionState ?? null, preserving unknown/stale semantics
rather than deriving Offline from the execution catalog
SwitchableProject.computer.connected. The catalog wire shape is unchanged.
Local cwd and its full title, durable selected execution identity, menu keyboard
behavior and authorized mutation handlers retain their existing ownership.
The footer adds no fetch, controller or policy owner and does not block shell navigation. The provider removes its former fullscreen overlay and duplicate reconnect notice, retaining one footer transport lane; component tests do not prove the complete browser flow. Shared component rules, including unknown counts, freshness and accessible countdowns, live in Connection status.
Finite chat stream and background lifetime
useBrainChatStream (web/modules/advisor/brainChatStream.ts) binds actual
readDaemonStream to one finite shared connection controller, with strict
current-auth loadConnectionPolicy/getConnectionPolicy. It neither reads admin
config nor supplies a default/previous-account policy. Chat omits optional
maxBufferLength, preserving its existing unbounded SSE reassembly rather than
inventing a chat frame cap. Bytes, comments, headers and heartbeats refresh only
liveness. The 15-second snapshot timeout and existing configurable silence limits
remain separate watchdog/revive boundaries, not new retry maxima.
BrainChatStatus exposes connectionState: ConnectionState | null,
connectionFailure: { source: 'start' | 'policy' | 'stream'; status: number | null; code: string | null } | null, modelRetry: RetryProgress | null and canonical
executionState. BrainChatActions.retryConnection(): void owns current-bound
GET/bootstrap recovery, never start/send mutation replay. Initial attachment and
explicit selection alone invoke brainStart; failed start stays typed/unready
without an admitted stream target or inert Retry button. Navigation, New
conversation and explicit open remain available. The committed ChatFooterDock
is the actual independent transport/model/waiting consumer, not another owner.
Application readiness follows successful SYNCHRONOUS snapshot application plus current binding/generation/auth checks, never connection-open or a partial frame. Transport loss preserves transcript, model retry, computer waiting and daemon-owned workPending until authoritative snapshot/control explicitly clears them. Live retry advances the existing control hydration stamp so older status cannot erase it, including before the first token. Existing ready/reconnecting state still supports activity lifecycle and workflow consumers; presentation uses canonical observations, not those booleans as a second retry authority.
Close, auth transition and explicit target switch retire callbacks synchronously;
a replacement waits for old policy/controller/reader cleanup. A same-account
credential refresh pauses the reader without retiring the provider generation or
its fixed GET binding. Commit/rollback do not resume it: only LoginGate's local
ready phase after a fresh /auth/me proof opens a new controller with the same
session/client/generation and retained handlers. This applies to live and read-only
bindings, preserves the transcript, and never repeats start/send. Failed cookie
proof leaves the reader closed and the gate unmounts the provider. Focus, resync and
silence watchdog can reconnect the current attempt but cannot renew exhausted
work. Explicit Retry or an observed offline-to-online edge can restart that same
target's finite episode. A foreground return also renews an exhausted or stale
episode once, even when navigator.onLine stayed true throughout phone sleep.
A healthy brief hide does not reconnect. Blocked/refused targets and failed policy
bootstrap are not renewed by a foreground return.
subscribeRevive owns that edge: visibilitychange to visible, pageshow (including
persisted bfcache restores), and document resume share one foregroundReturned
signal, rearmed by hidden visibility, pagehide or freeze. The first pageshow/resume
may be the only observed restore signal. Hidden signals cannot spend a foreground
renewal; repeated visible signals never refill it, even outside burst coalescing.
Each real return starts at most one finite episode; a visible page with a dead
server still exhausts and offers Retry. No wake replays brainStart/send, refetches
history over a running turn or clears its text: only the same GET's atomic snapshot
reconciles it. Read-only child taps omit parent client/generation authority, stay
on their exact child GET and remain unready when unavailable; there is no parent
brainStart fallback.
Phone lock can emit pagehide with persisted:false even while a terminal WebSocket
keeps the page eligible to return. The provider therefore removes only its browser
pagehide Stop beacon. Visibility reporting and server generation tombstones stay;
transport detach retains the binding. The EXISTING 30-minute idle sweep
(IDLE_LIVE_SESSION_TTL_MS in src/brain/service/liveSessionReaper.ts, run by
reapIdleLiveSessions) eventually collects an abandoned runtime, not immediate detach
cleanup. Explicit Stop and selection retain their existing behavior. The now-unused
brainSessionStop beacon and isStreamDataFrame helper, with only their dedicated tests,
are removed; visibility reporting and the active silence watchdog remain.
No mounted/attached binding means no stream/policy work. Active chat keeps its existing one stream, snapshot hydration and watchdog resources, with no second socket, timer or retry loop. Focused hook/provider/footer tests use actual shared owners but are not a real-browser or physical-phone acceptance claim.
Interactive transcript history
The slash menu reads GET /brain/commands and refetches when a slash draft opens. Live input aliases are contributed through registerCommandProvider, with the invoking account's grants and skill ownership. The Skills plugin publishes the same user-invocable catalog used by /skills, including skills hidden from automatic discovery. Choosing an alias sends the raw slash command; the resource-loader input extension replaces its token with the declared invocation and forwards its argument tail to the existing plugin transform. Core and static plugin names win collisions. CLI suggestions use the same endpoint and refresh on opening too.
/help opens HelpModal, a filterable list of the same catalog with each command's description. Choosing a row runs that command through the runSlash path the slash menu uses, and /help itself is left out. The modal's first row is the rewind action. F9 in a focused chat surface (data-chat-rewind-surface) calls the same rewind() in BrainChatProvider, which refuses in read-only and delegated child views and while a rewind is already in flight. While a reply is streaming, the rewind request carries stopOnly. A typed rewind refusal (code rewind_*) is shown through typedRefusalMessage in the page's language; any other failure shows brainChat.rewindFailed.
BrainChatSurface composes the existing action, status and transcript context slices. Its root owns the one layout owner that settles floating-dock geometry and then the scroll position (follow-newest and the reading anchor, see desktop), the visual-viewport inset, pending-input reveal and ProjectChatDock; it does not fold events. The canonical fold remains src/brain/transcript.ts with its byte-pinned web/lib/transcript.ts mirror. The floating-dock observer publishes React state only when tile presence changes; its Effect Event reads current state without reinstalling the geometry observer. Repeated token mutations still invalidate layout, but unchanged tile presence must not enqueue no-op React commits. BrainChatDockReserve.test.tsx covers tile appearance/removal and BrainChatLongChatPerformance.test.tsx keeps the existing per-token render budget.
A non-triggering owner-call tail can be durably accepted while its preceding native tool is still running.
The atomic stream snapshot supplies these rows as optional conversationAppends, separately from
settled history and live events. fromSnapshot folds history and replay first, then appends these
inert display turns and records their suffix length as ChatView.conversationAppendCount. reduce
excludes that suffix from each live fold and restores it afterward, so tool progress, text and idle
continue in the original run without another user admission or thinking state. A session reset drops it;
a new snapshot replaces it atomically when the safe journal flush promotes the same rows into history.
keepOlderWindow excludes this suffix from journal-anchor matching, while ordinary older-page prepends
retain it. BrainChatProvider passes the count through its transcript slice and excludes pending rows
from live narration. BrainChatSurface and transcriptBlocks use it to keep the active work shell before
the cards rather than treating them as new work. With no pending input the count is absent and the
existing fold/grouping is unchanged. The server owns identities and promotion; no client queue, storage
writer, polling or timer is added. Rendering remains linear in the bounded snapshot/replay and pending
suffix. See voice.md for the owner-call producer and the durable append contract.
Chat rendering lives in siblings under web/modules/advisor/:
ChatTranscriptowns the memoizedMessage(the person's messages, event runs and dividers), the memoizedAssistantRun, turn metadata, tool rows, reasoning and authoring hints.WorkSummaryhas a stable toggle and a memo boundary: text deltas do not redraw its clock or Motion subtree; its existing one-second heartbeat, disclosure and run-state changes still do.ChatMarkdownis the single live/history renderer in the full chat, dashboard dock and assistant previews.markdownDocumentinweb/lib/markdown.tsreturns the existingplainContent→ sharedmarked→ DOMPurify pipeline's sanitized inert document;renderMarkdownserializes that same result for string consumers. The chat keeps each top-level block's HTML and React element in component state, keyed by position, and reuses unchanged elements. Only changed blocks replace DOM, preserving completed code/table scroll and text selections.display: contentsboundaries add no layout box; chat paragraph and tail selectors account for them. Parsing and sanitization still cover the complete source on each text change: late link definitions, unfinished tables and raw HTML spanning blocks must retain whole-document semantics. There is no second streaming renderer, direct live-DOM text mutation, history refresh or delta delay. A message's structured mentions are the one addition to that document:markMentionsturns their tokens in its prose into empty slots before the blocks are serialized, andMentionChipportals fill them (see "Shared transcript, replies, reactions and mentions").- The stop pulse and live work summary own small compositor layers (
will-change: transform) while running. Their existing shadow, shimmer, icon animations and quiet-effects rules are unchanged; settled summaries do not retain the promotion.chat.markdown-stream.e2e.tsrecords CDP script/style/layout and trace paint/raster/compositor-draw costs, React commits/renders and DOM additions/removals for the same 300-delta Markdown scenario in chat and the dashboard dock. Timings are informational; retained blocks, layout and interaction are assertions.chat.stream-effects.e2e.tschecks actual Chromium layer ownership and unchanged animation names. workRunsis the pure display grouping of assistant work, the only place that decides where a run starts, ends and folds.transcriptBlocks(turns, working, awaitingEcho, workPending, conversationAppendCount)groups native assistant steps and joins across a terminaldurationMsonly when the next native turn's first step hastrigger: 'delivery'. The shared transcript fold derives that trigger from typedturn-boundaryframes or the same history projection. A visible user turn, divider or untriggered assistant turn starts a separate group; scheduled wake-ups are untriggered. Event rows between joined steps belong to their work; trailing events stay outside.workPendingkeeps the last group live during outstanding conversation work without appending an empty shell; a fresh human send still reserves its shell before the first output.splitNativeRunsappliessplitRunseparately at every native terminal step. Only the last native turn's answer stays visible; an earlier turn's interim answer stays in that turn's work at its recorded place, before any tool calls that followed it (splitRun'sinterimflag skips the settled answer lift), so the folded log reads in time order and the settled group shows one final answer. While the joined section is live, delivered files, explicit images, submitted plans and completed views stay in their recorded positions inside each native turn's work timeline. Every native split receives the whole section's settled state, so a terminaldurationMs, delivery continuation or streaming pause cannot pin them while sub-agent, workflow, background-process or question work remains outstanding. A waiting plan/view and actionable questions remain visible outside the disclosure. Only once the joined section settles and automatically collapses are deliveries lifted out, including stopped and failed sections; reopening a settled section keeps them pinned.splitRundivides a native turn into the work timeline, the items still waiting for the reader (the plan whose decision is pending, an interactive view waiting for an answer) and the visible tail: the trailing text and message blocks plus a closing plan orAskUserQuestionrecord after the last ordinary work step. A streaming step'scomposingstate also counts as following work:splitRunkeeps its preceding text in the timeline, before the authoring hint thatAssistantRunappends, even while tool arguments are still streaming. Snapshot replay uses the same split; once thetoolevent arrives its row takes the hint's place in event order. When a run finished successfully (settled, neither stopped nor failed) and that tail holds no text, the run's last text segment is its answer and joins the tail ahead of it, so a closing call after the answer, such as saving a memory, folds without hiding the answer; a live, stopped or failed run keeps the strict rule. For a settled section, before finding that tail,splitRuncollects every delivered file, explicit image, submittedExitPlanModeplan and completedShowViewfrom all steps in recorded order through the sameisDeliveryclassification. Mixed tool segments split around submitted plans; each plan keeps its original tool item, including its approvalQuestionAnswerSummary, and the existingToolPillsrenderer draws the samePlanCardwith daemon-owned decision controls. Pending, approved and dismissed plans use this delivery path after settlement, including a plan-only ending and an earlier native turn in a joined section. Plans have no delivery timestamp, soorderDeliverieskeeps their recorded position while ordering timestamped attachments. Files, images and plans are extracted immediately, while completed views stay in the work items as boundaries during the tail walk so narration before a view is not promoted into the closing text. When building the result, completed views are lifted out of work and all deliveries join the visible tail in delivery order, above the closing text. Live deliveries remain part of the work timeline even when the reader manually folds it; after settlement they stay visible when later tools follow them, after reload and when no final text is produced. Image segments markedpreviewstay beside theirReadtool rows in the work timeline; waiting views remain in the waiting section until answered. Segments keep their identity unless a split cuts through a tools segment.runOutcomereadsinterruptedorerrorfrom the event row right after the run. It is web-only; the CLI draws steps as before.ChatEventsowns event wording, icons and event runs. It and the tool rows shareChatLog's column, row, glyph, native disclosure and output block, so neither renderer imports the other.ChatDiffowns syntax-coloured diff rows and expansion;ChatAttachmentsowns images and file downloads; full-size pictures open in the sharedImageLightbox(web/components/ui/ImageLightbox.tsx).MessageBlocksdraws a reply'sblockssegment (plugin message blocks, seam row 70 indocs/plugin-author/seam-catalog.md) as a card grid under the message: shadcnItemGroup/ItemwithItemMedia,ItemTitleandItemDescription, chips as the appBadge(neutralmuted, positivesuccess, warningwarning, dangerdanger, accentaccent), one column below a 32rem container and up to three from 48rem. Every string is a React text node. A 56pxobject-containthumbnail opens the sharedImageLightbox; a picture the daemon no longer serves shows the image-gone tile instead, and a block without a picture has no media slot. A block kind the build does not know draws nothing. The liveblocksevent and the reloaded segment are the same stored entry, so a reload changes nothing on screen.ChatCardsowns the generic read-only card, folding, preview and memoized transcript extras. Empty or completed lists remain absent. PluginChatCardHost selects registered plugin renderers by opaque card id; interactive task controls belong only to that plugin renderer. Loading, absent and refused renderers use StaticCard. A renderer crash stays inside PluginErrorBoundary and displays its notice. Session identity, live state and the command-opening callback still reach the plugin. Surface and rail use the same explicitchatRailCardstakeover resolver: a compatible registered owner, visible live-work rail, all rows addressable and no discarded card body are required before hiding transcript content. Unknown or pending ownership retains it; multiple declared owners each receive their section's rows. Declared live-work cards retain transcript placement even with historicalpinned: true, without rewriting stored cards; unclaimed pinned cards retain footer placement. The provider carries owner-stamped status groups through hydration, snapshots and live events without rebuilding a core domain DTO. Rail sections consume only their registered owner's opaque data, retain body-only content and keep per-section error boundaries. The canonical registration and read-only rules are in browser contributions.ChatComposeralone reads the draft context. Empty editable fields usebrainChat.placeholderShortbelow thesmviewport breakpoint and in the compact dock. The full variant renders an empty placeholder during server render and until the viewport is measured, then uses the slash-command hint fromsmupward. The same component serves delegated read-only views with their existing lock label and full accessible description. Fields stay at 16px belowmdand on coarse pointers, including landscape phones, to avoid iOS focus zoom, and autosizing still measures only typed content. File selection, clipboard files of any MIME type and drops on the composer call the sameBrainChatProvider.addFilesaction and resumable binary upload seam. Each upload queue captures its original session id.bindSessionowns all three authoritative parent binding changes: explicit start, stream snapshot and live session event. A changed id cancels pending transfers and clears staged references; reconnecting the same id and previewing its child keep them. Cancelled completions cannot attach a late result to the new conversation, and a rejected send restores its draft only while its original parent session remains bound, merging submitted and current attachments by stored path. The provider owns per-session text drafts, shared by the composer surfaces bound to that session. A rejection after switching showsbrainChat.sendErrorPreviousConversation, leaves the current session's draft untouched and restores the submitted text into the original session's draft throughrestoreSessionunless that draft already holds newer text; its attachment references are not restored. The daemon no longer refuses a send because the tab switched away during admission, so this branch is reached only by a real failure. A locked composer suppresses file-drop navigation without starting an upload; ordinary text drops and pastes retain their native editing behavior.ChatConversationBarowns pickers, reasoning controls and rename;ChatFooterDockowns notices, statusline, uploads and queue. Both bar and footer useChatStatusline's single model-control ownership rule,useModelControlHost, including absent or collapsed statusline state. The provider'slineCfgisundefineduntil the first/brain/statusread andnullonce that read reports the statusline plugin disabled; while it is undefined the rule answers no host and neither surface renders the model picker, so a reload does not flash the bar's picker before the statusline takes it.agentPresentationsupplies the pure steer description to both the agent table and tool rows. Cache-hit display importsweb/lib/displayFormatdirectly.
BrainChatProvider.sendMessage records the latest fresh send's submittedRun display identity before posting the request. Its awaitingEcho state reserves an empty run through transcriptBlocks; the authoritative user event binds that identity to the user echo id. The same AssistantRun key survives the pending shell, the echo, the first assistant output and settle, preserving its clock and the reader's disclosure choice. A queued steer reuses the existing live run without another shell; a fresh-conversation send ignores the previous conversation's working state. HTTP rejection, discard_user, a terminal frame before echo and conversation rebinding remove the pending shell. No optimistic user bubble or additional timer is introduced; reload restores the live run from snapshot control and the transcript, including a user turn still awaiting its first assistant step.
Shared general files download through GET /brain/chat-files/:file using the existing owned journal reference and administrator oversight rules. The route uses the standard range-parser and the existing byte-counted nodeResponseStream/requestScopedStream adapters to stream disk bytes with Content-Length, Accept-Ranges: bytes and single HTTP byte ranges for resumed downloads, including suffix and open-ended ranges; unsatisfiable byte ranges return 416. Malformed, unknown-unit and disjoint multi-range requests receive the complete response. ETags identify the immutable content address. Every response remains an opaque authenticated attachment with the original name, private caching and nosniff. The BFF already forwards Range and streams the response body with browser disconnect cancellation. nginx's 25m limit applies to request bodies, so these GET downloads do not cross it; conversation uploads retain their separate streaming location with client_max_body_size 0.
shapeBrainMessages and segmentsForTraces retain the ordinary ShareFile/ShareImage tool row and its separate payload, matching the live transcript on the web and CLI. Repeated explicit image deliveries retain each caption, even when a Read preview or another share uses the same stored bytes. Only repeated model-facing Read previews deduplicate by content reference. Successful shares and completed views carry deliveredAt, a host-recorded completion time in Unix microseconds: direct calls are stamped by the universal composed-tool wrapper after execution and any awaited plugin observer, nested calls immediately before their delivery event and durable trace settlement. For file/image shares, the trace budget reserves this metadata with the payload. Waiting views have no completion time; completed view events and history segments preserve it through the shared InteractiveViewDisplay wire type and the live fold. The importless canonical orderDeliveries in src/shared/chatPresentation.ts and its byte-pinned web/lib/chatPresentation.ts mirror order stamped payloads without moving tool rows or changing unrecorded historical positions. segmentsForTraces applies it within one reporting entry, and splitRun applies it to pinned deliveries after the joined web section settles so late results rewriting an earlier exec entry cannot move ahead of an earlier delivery reported by wait or a completed direct ShowView between that yield and the late settlement. The same wire field reaches live and historical CLI turns. The web's workRuns grouping is shared by the full chat, compact dock and child timelines; the CLI keeps its step rendering without the web disclosure.
Native checkpoint route refusals use the existing HTTP and typed chat-event feedback. typedRefusalMessage (used by apiErrorMessage) maps native_checkpoint_conversion_failed to the current document locale's core dictionary; SessionEvents maps the native-checkpoint-conversion notice and the same reason on model-switch-failed. All three cs/sk/en dictionaries explain that the original ChatGPT account and model must be available for readable conversion. The queued notice retains model/provider reconciliation through the existing picker event, and refusal preserves the transcript and prior selection.
The same mapping turns the 409 codes LOCAL_TARGET_OFFLINE and LOCAL_WORKDIR_MISSING into brainChat.localTargetOffline and brainChat.localWorkDirMissing. They replace the generic send failure in the chat composer's toast, plugin-picker and slash-command sends, and the dashboard composer's inline error, and they reach the conversation opening toasts and the new-conversation menu through apiErrorMessage. The draft stays in the composer. The Playwright fake daemon answers /brain/start and /brain/send with LOCAL_TARGET_OFFLINE for a local target that the seeded brain/execution listing marks connected: false (web/tests/e2e/specs/dashboard.offline-computer.e2e.ts).
shapeBrainMessages passes the journal row's ISO 8601 UTC created_at through as BrainMessageView.createdAt. Fresh and queued user echoes carry their announcement time as ISO-8601 UTC, so the live replay snapshot retains the run's clock before PI appends its user entry. Settled history uses the stored display time. This is display metadata only: PI entry timestamps and stored display/accounting time stay untouched. The web's work clock parses the same ISO timestamps as MessageMeta, which renders them through localDateTime; the group's final duration is the last joined terminal step's createdAt minus its opener's timestamp, including waiting gaps rather than summing native durationMs. The daemon stamps terminal display createdAt at native turn completion without rewriting provider-visible journal entries. Native durationMs still marks each turn boundary. The CLI receives the same normalized message view and keeps its existing shared time formatting.
workRuns.isConversationOnlyTurn distinguishes inert appended call cards (voiceCall with empty display text) from admitted voice requests (the same record with the request summary in text). The call producer already supplies this distinction: appendConversationMessage uses display: '', while startSend uses the admitted summary. Both grouping and BrainChatSurface's live-run/opener selection use this predicate, so an inert call neither reserves a shell nor takes pending work or its clock away from the preceding section. Delivery turns can join across those cards; the cards remain standalone outside the work disclosure. A submitted call, ordinary user message, divider or independent scheduled turn still opens its own section. This is display-only: no new wire field, daemon state, persistence or timer. chat.call-work-section.e2e.ts covers call hangup, atomic resync, reload, delivery continuation and admitted voice requests at desktop and mobile widths.
VoiceCallMessage renders optional voiceCall.operations lifecycle observations with localized outcomes and typed failure reasons beside the existing transcript disclosure. Operation-only cards omit the empty transcript control; details stay collapsed. Their empty display label uses isConversationOnlyTurn, so start/result appends preserve the surrounding native assistant/tool group. The CLI consumes the same message metadata, not a separate history source.
AssistantRun draws one run in one turn shell. While the run is live (it is the last run after the person's newest message and the conversation is busy, its newest step is still streaming or daemon control reports workPending) a WorkSummary button shows the shared ShimmerText "Working…" with a useNow clock counted from the fresh send's recorded start, otherwise from the person's UTC message timestamp, or from the opener assistant step's UTC timestamp when no visible user message opened it. Delivery continuations retain the opener's React key, clock and disclosure choice, and the timeline is open: one chat-work__node per segment or event run, with no rule and no markers. Tool, reasoning and event steps sit one log step (1rem) in under the header; interim prose and message blocks (data-step text or blocks) start on the answer's edge, because streaming text is drawn as the visible tail and moves into the timeline only when a later work step follows it, so an indent would shift it sideways mid-stream; a running tool row shows its own icon. Once the run settles the button reads "Worked for 24s", "Stopped after …", "Failed after …" or, for history without a stored duration, "Work log", and the timeline folds closed in about a quarter of a second (MotionCollapse: height and opacity over the shared motionTransition; reduced effects fade only, off stops at once) while the label cross-fades (MotionFade); the reader's own toggle wins from then on and folds the same way, as on the reasoning block. The button is native and carries aria-expanded and aria-controls. While the timeline folds it keeps the current steps, so the closing answer that moves into the tail is drawn once; once the fold has finished the timeline is not in the DOM. A run loaded from history mounts already closed and does not animate. The waiting items and the visible tail follow it, and the meta line under a folded run omits the run time it already shows. A live run shows its disclosure even before the first work step; a settled run with no work steps draws no disclosure. Inside the timeline the log column drops its own indent so tool rows and event rows share the steps' left edge. web/tests/e2e/specs/chat.work-timeline.e2e.ts measures live, settled, reloaded and keyboard states, the step indent, the absence of rule and marker styling, and overflow at 320 and 1440 in both studio skins. Per animation frame it also checks that the closing answer is drawn once, that a fold passes through intermediate heights, and that effects off folds in a single frame.
For example, a streamed text delta reaches the root and its live run while settled message, run, segment, card, bar and editor memo boundaries stay unchanged: AssistantRun compares its turns one by one, and each SegmentView is memoized on its segment, so a settled step inside the live run is not drawn again. BrainChatProvider reads workPending from live control and atomic snapshot control into its event-rate status context. An idle frame switches off streaming only, preserving outstanding work until newer control arrives; neither path refetches history, and resync still reconnects for an atomic snapshot. Each native turn renders under a stable fragment so joining a delivery preserves settled segment DOM identities. sameRun retains its existing real prop comparisons. These local module boundaries add no plugin API, polling, persistence or extra clocks. chat.work-run-continuations.e2e.ts checks pending sends, delivery gaps, preserved tails, collapse, reload, independent turns, Stop and errors in cs/sk/en at desktop and mobile widths. Public UI runtime contracts and design tokens are unchanged.
Questions and permission approvals use the existing pending-input mount in BrainChatSurface, drawn as transcript content with no card, border or fill, from RadioGroup, Checkbox, Input, Badge, Button and Item. Item variant="selectable" adds token-based hover, selected and focus-within paint through data-selected and data-disabled; its default variants are unchanged. Several questions page one at a time: the header line carries the question's header and a 2 / 3 position, the footer has Back (from the second page) and Next, and Next becomes Send on the last page, which stays disabled until every question has an answer and then names how many are answered. Next never requires an answer, so the reader can skip ahead and return. Answers live in the card, not in the visible page, so paging and a failed request lose none of them; a single question shows no pager. Paging moves focus to the new question so its number keys keep working. A question has one Tab entry, arrows move within a multi-select, numbers select, Alt+Left/Right pages and Ctrl/Cmd+Enter sends a ready batch from any page. A custom row opens its labelled input in place. Single-choice previews follow the selected option, beside the list on desktop and beneath that row on mobile. A preview is monospace art by the event contract, so it is drawn verbatim in a <pre> on the skin's sunken surface, like the CLI dock, never parsed as Markdown, which would reflow the lines a mockup needs; an approval's command block uses the same surface and the skin's text colour. Headers are shown in full. A question's plain-text detail (AskQuestionDetail, a plugin's record to confirm, such as EmailCompose's outgoing email) sits between the question and its choices on the same sunken surface with a hairline border: the fields as a two-column dl (muted label, value with whitespace kept and long values wrapped), then the body as React text with whitespace-pre-wrap, never Markdown or HTML, in a keyboard-focusable role="group" region named brainChat.askDetailBody that scrolls beyond 40dvh. Without a detail, as on every question an older daemon asked, the card is unchanged. The card shows sending, read-only, expired and failed-request states; retry retains the selected values. Approvals use direct buttons with no selection or default Enter submission, a code block for the command and a separate destructive Deny action.
AskOption.recommended is a boolean independent of its label. The AskUserQuestion schema, CLI and web consume it directly; models never append a recommendation suffix. details.questionAnswer stores question text, header, selected labels, optional custom text and an explicit answer/approval/expiry outcome beside the model-facing text. questionAnswerOf validates it at the existing result projection boundary. events.ts, messageView.ts and the byte-mirrored transcript fold carry it on the same tool item. Web QuestionAnswerSummary renders it as a quiet list, one line per question with the header beside the chosen answer (or the permission outcome beside its command), with no card or disclosure, and the CLI's expandable tool record shows it too, after settlement or reload without local persistence or prose parsing; a tool without these details retains its ordinary row. Permission-gated tool results carry the same record even for diff, shared media or ShowView results. Suppressing a code-mode wrapper's activity, either for nested traces or ownRow: false, preserves its permission record as a standalone settled tool item in both messageView and the live spawn reducer. interactiveViewOf validates the view once at the common result boundary used by direct events, history and nested records. A view and questionAnswer may coexist in one tool result and trace; the canonical fold keeps the approval as the ordinary tool record immediately before the view, so replay or wait settlement replaces both without duplicating them. HistoryMessage.segments aliases the shared BrainSegment contract, and the browser fold mirrors this same body.
PlanCard replaces the ExitPlanMode activity row with one sanitized Markdown document and inline Implement / Refine actions. If the tool itself needed permission, its QuestionAnswerSummary remains immediately before the plan, independently of the later Implement / Refine decision. Pending authority still comes only from daemon control. A pending plan outside the currently loaded history page uses that same card at the transcript tail until its tool anchor arrives; the tail is removed once that anchor is present, so the plan is shown once. Historical and read-only cards have no decision actions. There is no plan modal, overlay or second decision endpoint. The existing plan request fence, error toast and retryable buttons remain in BrainChatProvider.
InteractiveView renders the core view segment, as transcript content with no card of its own, in a sandboxed srcdoc iframe with sandbox="allow-scripts", never allow-same-origin. A trusted outer shell with frame-src about: contains the untrusted inner frame, whose CSP forbids connections, forms, external resources and nested frames. The inner body's display: flow-root keeps child margins inside its measured scrollHeight, so a plain paragraph's margins cannot collapse outside the reported height and clip its text when the host resizes the frame. The outer shell is necessary because a single sandboxed document can still navigate itself in current browsers. Both frames have opaque origins and no popup, top-navigation or form capability. The app accepts only messages from its iframe's contentWindow; the shell accepts only its child. Both use the strict importless bridge parser, byte-pinned between src/shared/interactiveViewProtocol.ts and web/lib/interactiveViewProtocol.ts. The only accepted messages are a nonempty action string within 4096 UTF-8 bytes and a finite height from 1 to 10000 pixels, with no extra keys. Authenticated action writes remain in the host, not the frame. The host sizes the frame to the reported height, so the inner document never scrolls vertically (html{overflow-y:hidden} in the boot style); at a fractional device pixel ratio the frame box would otherwise snap a fraction below that height and paint a scrollbar. Content beyond the 10000-pixel bound is clipped. The view has no border, fill or padding. Its documents are transparent and carry the host's color-scheme with the tokens, so the chat background shows through in every skin; a frame whose scheme differs from its embedder would otherwise be painted on an opaque canvas. The summary, the plain-text fallback for other surfaces, is the section's screen-reader description on the web, not visible text.
The frame receives current skin tokens and computed styles sampled from the shared Button's accent, default and outline variants, and the resolved text-conversation role (size, line height and weight, sampled at the current width), so plain text in a view reads at the size of the reply around it. The face is system-ui: the frame's CSP keeps font-src 'none', so the host's web font cannot load inside it and the platform sans stands in for it. Surrounding chrome uses shared tokens. A waiting click resolves /brain/view-answer, never /brain/send; concurrent clicks are suppressed and failed writes leave the view usable with localized feedback. The pluginSessionId boundary locks foreign, read-only and sub-agent views, including scripts that send messages manually. Settled waiting views remain locked on reload. Non-waiting local controls send no actions to the daemon. The short summary stays readable while loading and on every text-only surface. Browser coverage exercises the real BFF, stream fold, reload and locking at 320px mobile and 1440px in Studio OLED/Light and cs/sk/en.
Current conversation state comes from daemon BrainStreamControl, required in status and atomic snapshots and updated by the session-targeted control stream event. BrainChatProvider keeps a read-only projection under its existing generation/session/control-revision fences; foreground busy/Stop uses control.streaming, never transcript shape or the last tool. Snapshot control wins over older replay control. Public PI programStatus and independent backgroundWorking flow to the shared ConversationIcon renderer and its editable ConversationIconPicker, used by owned history, the admin register, chat headers, sidebar recent conversations and the assistant menu; the sidebar Chat row counts own conversations with native working or background activity, and the operation dock groups own hand-started conversations needing attention at desktop widths. The indicator uses existing tokens/tooltip primitives and keeps durable unread, scheduled completion and failure detail independent. An undecided plan can be blocked/question without streaming, and background children leave the parent composer available. Before hydration the state is unknown. A terminal error that closes the live stream invalidates its last control and fences older status reads, removing Stop until the reconnect hydrates current daemon control. Native transport errors without a JSON frame retain browser reconnect semantics. No older-daemon control fallback, client reducer, polling or persistence is introduced.
Tool rows carry producer startedAt, explicit pending state and native/durable durationMs. groupToolItems retains latest detail/count while naming an actual pending member; a later sibling or parent idle never completes that member. An error retires pending execution indicators only in assistant turns after the most recent user turn, including calls before a mid-turn chat marker. Pending tools from earlier runs, recorded timings and independent child/workflow progress remain intact. Reconnect replaces this projection from the atomic snapshot without another journal or request. The row shows the pending call's authored reason, not an inferred internal cause; completion retains performed detail. visibleToolDuration in canonical src/shared/toolPresentation.ts and its byte-pinned browser mirror paints live and settled tool clocks only from 5000ms; the original measurements stay in transcript data. CLI and browser use this same rule. ToolDuration subscribes to the existing shared useNow clock only while its pending timestamped row intersects the viewport, observing the row even before its duration label appears. Settled labels render stored durations and survive reload unchanged; old journal rows without timing render no invented clock. Only the small elapsed label updates on a tick, not the transcript fold or settled Markdown. Card and reasoning clocks reuse the same heartbeat. The CLI's ChatViewport reports pending visibility through its optional callback and invalidates only the bounded set of previously visible pending turns; ChatComposition reuses its existing animation owner, so a yielded nested call keeps counting without claiming the parent is busy. Without that callback a standalone viewport simply renders on demand. There is no daemon timing poll or additional journal. Browser acceptance is specified in chat.tool-status.e2e.ts at 320px with real mobile input and at 1440px, including independent calls, silent completion and reload.
src/brain/transcript.ts is the browser-safe pure fold of complete BrainEvent payloads and durable message views. web/lib/transcript.ts is its byte-pinned importless mirror; TranscriptModel is the CLI's indexed revision adapter around the same fold. Steady events fold only their indexed target; terminal stream errors pass the complete transcript so pending indicators before mid-turn markers settle identically on both surfaces. Images, files, tool commands, diff notes, model-step boundaries and durable identities stay in the data. Renderers alone choose HTML or terminal paint: image previews remain semantic image segments while the CLI renderer suppresses their redundant line; explicit image shares render a caption or filename. Cross-surface tests must exercise the actual renderer instead of expecting terminal words in the fold's data. The common session-targeted stream registration serves parent and read-only views without reconstructing partial events. A snapshot replaces history and provisional replay together. Control fields override replay: pending questions, plans and work mode come from the daemon, never from scanning displayed assistant turns. Explicit null clears stale control. Browser tests must publish the same authoritative pending-plan status before idle: emitting an ExitPlanMode result alone changes the transcript, not the fake daemon's canned control response. Idle reads take an issuance revision and capture their target session, so a late response cannot replace a newer read or rebind.
settleTail(turns) replaces only a streaming assistant tail, clears its composing metadata and returns whether it changed. The marker, user and step folds use it before another turn displaces the tail; TranscriptModel uses the same function before appendLocalTurn and publishes exactly one tail mutation when changed. Empty, non-assistant and settled tails retain identity and return false. The operation visits only the tail and mutates the supplied turn array; it does not end overall thinking activity or persist journal data. transcriptFoldParity checks the browser fold and indexed TranscriptModel against the immutable canonical projection. ChatTurn.id is an optional source journal identity for stable browser keys and prepend deduplication. Durable user/event ids may arrive live; live assistant turns receive no stored id during settlement, and only assistant turns constructed from stored history carry one. Plans are read from ToolItem through submittedPlanOf, not inferred from assistant text. TranscriptModel exposes actual turns through turnAt and no longer maintains a parallel last-assistant-text cache.
History requests target the synchronously selected session, including an administrator's foreign read-only view, not the hidden bound parent. Child entry clears the parent's transcript, cards, usage and execution identity before loading. Child reconnect stays on that session; the composer stays present as a disabled read-only field with its explanation and return control, and questions and approvals remain visible but their answer controls are locked. Execution identity comes from the authorized child snapshot, including its delegated placement. The tab's active-session id controls highlighting and post-delete navigation; the account-global active pointer is not display selection.
ChatComposer owns textarea sizing for both /chat and the advisor dock: an empty field uses one row, and nonempty text determines its border-box height. Deletions and replacements reset the textarea for measurement while holding its form's used height; the form is released synchronously after the final textarea height is written, so intermediate layout cannot expand the transcript and clamp a live scroll offset. The dashboard HomeComposer is a fixed two-row field and has no autosizing or transcript scrolling. The layout owner's settle in BrainChatSurface is the sole follow-newest writer (see desktop). Both transcript scrollports disable native scroll anchoring (overflow-anchor: none), which otherwise moves the agents tail when editor growth reduces the scrollport, even when the surface deliberately preserves an idle reading anchor. Idle editor-dock growth preserves the reading anchor; during a live turn, editor growth follows newest so the checklist and agents tail stay above the composer between stream deltas. Keyboard geometry only publishes the surface inset; the dock float geometry is solved by the same settle before its follow decision. A settle gives changed visual viewport dimensions, viewport inset or keyboard-open state precedence over editor-dock resizing, so keyboard safe-area removal in the same delivery still follows newest. Explicit conversation entry and transcript changes use the same writer while the reader follows the newest turn, a prepended page included. Scrolling away releases following, including during a live turn, and only a reader-driven scroll moving down into the bottom zone resumes it, because a finger leaving the bottom crosses that zone first; from then on holdReadingAnchor is the sole position writer (see the history paragraph below). The one other thing that resumes following is the reader's own send: sendMessage in BrainChatProvider bumps sendNonce (the same nonce pattern as focusNonce), and the surface answers a bump after mount through followNewestAgain, exactly as it answers opening a conversation, so a reader up in the history who sends a message is brought to the newest turn. A turn that arrives from the agent, another device or another participant never does, and neither does typing a draft. chat.composer-growth.e2e.ts types and deletes character by character at 320 and 390 pixels in real mobile contexts, with two visible agents, and measures scrollTop, a message anchor, the agents strip and composer bounds. Idle anchors stay fixed; live tails stay on the dock.
The shared paint helpers in src/shared and their byte-pinned web mirrors decode raw terminal controls without changing journal bytes, preserve structured shell kill outcomes, word failures from full output, validate local answer readiness and normalize absolute timestamps before local formatting. The importless plain-content decoder uses standard Unicode grapheme segmentation for logical eight-character tab stops, independently of terminal geometry; tool headlines receive that decoder at the paint boundary. Absolute-time formatting uses the mirrored localDateTime seam (src/shared/localDateTime.ts and web/lib/localDateTime.ts). Failed conversation-list reads retain any rows and expose retry instead of claiming empty history. The CLI statistics overlay reports independent section failures.
Web and CLI open the same newest page through GET /brain/messages or the atomic SSE snapshot. The response is always { items, hasMore, nextBefore }; before is the exclusive journal entry id from nextBefore, not a shaped-array offset. The default page size and validated query parser are owned by src/shared/chatHistory.ts, which both the real API and the browser harness use. The browser imports the page-size-only mirror in web/lib/chatHistory.ts as a dependency-free page-size entry; webMirrorContracts enforces equality. The server walks only the requested active-parent suffix using the session/entry index and shapes that page, keeping tool result rows with their assistant anchor even across an intervening user steer. A tool group can extend the requested anchor count. Hidden rows do not consume slots; visibility lookahead retires the cursor when only PI metadata remains at the root. Older-page reads first validate cursor ancestry without projecting messages; an abandoned or missing cursor returns 409 instead of reading an old branch. Pending entries never consume a slot while a live replay exists. With a parked restart and no live replay, only the confirmed provisional prefix can display. Cards, goals and control stay independent sidecars.
Exact automation result text is resolved through
host.stores().conversationsRead.messageText({actorUserId,sessionId,messageId}),
not a public exact-message HTTP route. Core checks session ownership or live administrator
oversight and reuses getSettledMessage plus shapeBrainMessages, returning only
{text} for that exact message, never a newer reply. Unknown/foreign/pending/missing
results are null; unexpected read/projection errors reject. Cron's own run-result endpoint
must authorize its receipt first, keeping missing text distinct from a service fault.
Paginated GET /brain/messages and SSE history remain unchanged, as does owner-only
lastAssistantText. These on-demand lookups do no inference or full-history scan;
transaction-bound reads use tx.host and expire with the transaction.
BrainStatusService.streamSnapshot partitions the durable prefix and bounded live replay before history windowing. Replayed user.durableId values exclude their stored echo rows; replayed chat-event.event.id values exclude those exact journal marker rows. A delegated result is already settled when committed, even while its parent's assistant/tool rows remain provisional, so retaining its history copy would move the badge ahead of the user's active work and cause the renderer to discard its correctly ordered replay twin. Both web fromSnapshot and CLI TranscriptModel therefore receive it once, in replay order after the tools. Only marker ids actually present in the captured replay are excluded: older settled markers and markers evicted by replay truncation remain history. Exclusion happens before slot counting and visibility lookahead, preserving the normal nextBefore cursor and older-page reads. This is display partitioning only; the settled journal and commit-time delivery acknowledgement remain unchanged, with no extra query, timer or client queue.
The web history hook prepends older pages and fences results by connection generation and history epoch. Every newest-window replacement (a live or read-only stream snapshot, including a shared-controller GET reconnect, and the newest-page read behind terminal truncation repair and rewind) goes through its one replaceNewestWindow, which keeps the lazy-loaded older pages and their cursor when the pure keepOlderWindow in the shared transcript fold proves them valid: the replacement's first stored turn id is already on screen at index k > 0, so the turns in front of it are still its ancestors on the active branch, and no retained row still shows a running sub-agent or workflow that the replacement no longer anchors. Otherwise the window resets to the replacement's cursor. Every replacement bumps the history epoch, so an older or newest page read before it is discarded, also when the window was kept: such a page may still show work the replacement has settled, and the kept cursor reads it again. The decision reads the last rendered view outside the state updater; loadOlder renders each applied page synchronously (flushSync), so that view already holds every page the cursor has moved past. BrainChatSurface owns the one paging and anchoring mechanism, the fill-and-anchor pattern of mature chat transcripts (Element Web's ScrollPanel fills until a pixel threshold above the viewport is met and restores a tracked node's offset after every fill; the anchor selection mirrors the CSS Scroll Anchoring algorithm, which Safari does not implement). One rule, fillOlderBand: while older history remains and the history sentinel's bottom edge is within OLDER_BAND_SCREENS (three) measured scrollport heights above the scrollport, request the next page. The rule is asked on every scroll event, on every transcript commit, on scrollport and content resizes, when the sentinel mounts and when the reader lifts a halt. Exactly one page is in flight: olderRef.inFlight answers scroll events synchronously, and loadOlder hands a second surface the request already running. After the commit holds the reading anchor the rule is asked again, so pages whose steps fold into a collapsed run without adding height keep coming until the band holds content or the history is exhausted, while a stationary reader whose band is filled requests nothing. There are no input listeners for paging, no band-entry state and no per-gesture budgets. loadOlder(ready) fetches the page, awaits the surface's gate, re-checks the generation and epoch fences and only then prepends with flushSync. The gate is scrollSettle.ts: iOS decelerates toward an offset UIKit fixed when the finger lifted, so a scrollTop written while the finger is down or the momentum runs is overridden by the next animation tick, and a prepend needs exactly such a write. A touchstart on the transcript opens a touch session; the gate resolves once the finger is up and no reader-driven scroll event has arrived for SCROLL_SETTLE_MS (250 ms), including after a bounce at the top edge. Outside a touch session (wheel, keyboard, scrollbar, the desktop) it resolves at once, so a page lands as soon as it arrives. A fling that outruns the three-screen band therefore stops at the loaded top with the spinner, and the page already fetched appears above the reader the moment the scroller is still; it never moves the text the reader is on. A failed page shows brainChat.olderLoadError and halts paging; the sentinel slot shows a common.retry ghost button, the only way to ask again, so nothing retries on its own. Following the newest turn is read from position alone: a scroll event that is not the surface's own write releases following when it leaves the bottom zone and resumes it only on the way down into it; an offset landing exactly on the bottom is the browser clamping it after the scroller grew (the composer shrank while idle), which moves up and still follows. While the reader follows the newest turn every layout change pins to it. Otherwise the surface keeps the first visible innermost readable block inside the source segment as its reading anchor. A paragraph inside a list item takes precedence over its ancestor, whose top would not move when an image inside that item loads above the paragraph. BrainChatSurface reuses each run's React key through a stored step present in the preceding render, so prepending its opening message preserves the reader's disclosure choice. Its step-to-key map is replaced by the rendered window on each render, with no history retained outside that window. AssistantRun keys segment renderers and timeline rows by source step and segment, and exposes that identity as data-chat-anchor; split tool groups use their first source tool. The surface stores the surrounding block's data-tk, the segment identity, the descendant path and its top in scroll-content coordinates, cancelling the current scroll offset and UI zoom. Every transcript commit and content resize moves scrollTop by that target's layout movement before paint. This holds text when a prepend extends the same run, and when late media above the paragraph changes that segment's height; anchoring only the run shell would miss both. Growth below the reader does not move the anchor. A single turn's data-tk is its React key; a run's is its last stored step, preserving its reading identity when a page adds its opener. Native scroll anchoring stays off. The CLI uses the application-owned SnapshotHydrator with independent parent/child older-page lanes for timeout and cancellation. Its transcript model retains live tail objects when prepending; empty or fully deduplicated pages only update the cursor and must not clear the shared array an unchanged pure fold returns; its viewport corrects the logical anchor by the prefix length, and PageUp, wheel or scrollbar dragging requests the next page after the loaded start is materialized. Synthetic tool anchors are retired when their real rows load, retaining newer live progress. Headless terminal repair walks the same pages only back to its last known durable row. No history cache or background full-history render is involved. An empty conversation returns an empty exhausted page; failed reads retain the current transcript. CLI reads surface the existing hydration error; a failed web older-page read is reported and asked again only from the retry control in the sentinel slot. Live compacted and resync frames reconnect through the existing serialized stream controller for an atomic page/replay/control snapshot, on owned and read-only surfaces. The read-only tap retires stale callbacks before reopening. Compaction is announced outside an open agent run, but cold-start and native pre-prompt compaction can be followed by user admission and provider output before an independent history read returns; such a read must not replace the transcript. Snapshot replay never invokes the live reconnect handler, so idle manual compaction does not loop. Boot recovery uses the same snapshot path. Model replay and explicit export still read the complete PI journal.
Conversation mode has one render-only mirror in BrainChatProvider, hydrated from daemon status, snapshot control, switch acknowledgements and durable mode events. Unknown state shows loading rather than a local Build default. The shared composer and telemetry controls request /brain/command with the selected mode and complete session/client/generation binding; no send carries mode. The mode picker is busy only during the bounded HTTP request. Send, keyboard submits and plugin-picker submits remain responsive and carry their captured binding immediately. A queued: true acknowledgement never selects the requested mode locally; the durable mode event completes the switch. Failed switches retain acknowledged control and show the localized error. Session, generation and control issuance fences prevent stale status or acknowledgements from replacing newer navigation or events. A remote mode event updates the indicator immediately and clears pending plans outside Plan. The authoritative workMode on a compacted history-rewrite frame also hydrates that mirror immediately, including rewind and clear. A new session starts unknown until its own control arrives. Status failures show a localized status-read error, not a mode-switch error. The shared scoped status reader rehydrates unknown control on the next successful ordinary read, including a settled child's usage read, under the same navigation and stream-revision fences; it adds no polling or retries. A read-only child cannot switch its bound parent.
Pending-message chips are a render-only queue in BrainChatProvider, shared by the dock and full chat. The daemon's queuedWithPending projection supplies both PI steering/follow-up messages and fresh sends waiting for manual compaction or a mode switch. Live queue frames and the latest queue event in the atomic stream snapshot replace the complete displayed list, including an explicit empty list, clear optimistic removal state, and advance the existing queue hydration revision so an older connect-time /brain/status reply cannot overwrite them. If the bounded replay contains no queue event, connect-time status still hydrates queued; absence alone does not mean empty. The transcript fold never owns these chips, and no send creates an optimistic message bubble. The existing ChatFooterDock renders them until delivery, hiding the bound parent's queue in child and read-only views. Snapshot handling scans the bounded replay once and adds no requests or polling; web/tests/e2e/specs/chat.compaction-queue.e2e.ts covers attach, late status, live send, reload and delivery on mobile and desktop.
The conversation list keeps its model mark icon-only and shows a separate, right-aligned two-line usage column at lg and above. Between lg and xl, supplemental running-agent and scheduled-job badges yield space to the title and usage; the existing branch/menu still exposes that work. A fixed desktop action track keeps model and usage columns aligned across owned and read-only rows. Both list routes carry cost alongside the existing tokens: transcript.sessionListing sums both in the same current-epoch brain_usage_session_totals query, with no journal decoding or per-row reads. These are the conversation's own totals, not descendant totals. Empty totals are zero; this tracked ledger does not distinguish unpriced usage from zero cost. Token sorting still uses the original tokens field.
useConversationListController reads the live measurement from the daemon's list payload, never from the open chat. Every row whose conversation is WORKING carries liveUsage — the measured effectiveTps of the current turn and the session's prompt-cache split — wherever that conversation runs: the web chat in another tab, the CLI, or a paired computer. The daemon projects it from the same sessionUsageSnapshot the open chat's status reports, so there is ONE measurement and ONE speed definition; a settled conversation carries no liveUsage and its row shows nothing. A working row shows its measured effectiveTps and cacheHitPct (cacheRead / (cacheRead + cacheWrite + input)); other rows have no fabricated live metrics. A delegated child whose turn runs in the sub-agent runner carries the measured speed alone — the daemon reads it from the run row and the prompt-cache split never crosses that boundary, so its row shows no cache share.
The list's own live channel carries the refresh: GET /brain/conversations invalidates the personal and the administrator's list when a conversation's durable activity changes, when a provider request settled and when a delegated child running in the sub-agent runner measured a new speed, so a working row measures itself as the turn runs. An ordinary account receives the invalidations of its own conversations only; an administrator also receives those of the conversations its All list shows. The stream replays nothing it missed while it was down, so every connection handshake (the : connected comment included) re-reads both lists before the feed reports ready; a mounted All list catches up after a reconnect that left the browser online. The controller opens no additional stream, timer or request, and the open chat in this tab is not a special case any more.
A turn settles once per provider response, so one working conversation produces a burst of invalidations. Each list therefore keeps ONE read in flight and reads once more when a change landed while that read was running: twenty settles cost two reads, not twenty. The read is never cancelled when it is superseded, so the list never waits for a request it no longer wants. formatTokens, formatCost(usd, 2) and the mirrored formatSpeed(tps, locale, 1) own display policy; the optional single decimal preserves other speed consumers' existing precision.
ConversationListPanel owns the typed sort key/direction through useConversationListPrefs; ConversationListToolbar presents the choices and conversationListModel.ts owns the comparator and section ordering. No table-column sort path remains. Sort persists in the same per-browser, account and view preference as the facets, without additional server requests.
API-token creation mark in the register
POST /v1/agent/runs passes whether authentication supplied apiTokenId to BrainService.openRunConversation. Only the fresh-conversation branch carries startedViaApiToken through lifecycle, spawner and session factory to store.journal.createSession. The factory inserts brain_sessions.started_via_api_token in the same transaction as the session row. The shipped schema (packages/db/migrations/0001_baseline.sql) declares it bigint NOT NULL DEFAULT 0 with a 0/1 check, so old and ordinary conversations read as unattributed. Continuation, respawn, token revocation and token regeneration do not rewrite it; a new web fork starts with its own default attribution.
The store's session listing includes that column in its existing bounded row read. BrainStatusService.listManagedSessions projects 1 as ManagedSessionView.platform = "api"; a channel session keeps platformOfSession(id), and every other row takes the same ownerSurface as Mine, so both views mark every row. ConversationListRow draws that mark in a fixed 16px box directly before the title, in both views, using the existing PlatformIcon renderer, whose non-plugin glyph set maps api to KeyRound with the shared cs/sk/en dashboard.surfaces.api label and native tooltip. It never requests a plugin icon. List glyphs retain their existing native tooltip independently of the named open control. Marked rows retain kind: "conversation", so hosted-room attribution does not apply even with direct = false. Ownership, session ids, routing, CLI and usage origin remain governed by their existing seams. There is no per-row query, new subscription or stored token identity. The harness's apiRunConversation fixture exercises this register projection in nav.conversation-icons.e2e.ts.
Persisted conversation icons
The existing metadata seam PATCH /brain/sessions/:id accepts optional title and icon, requires at least one, and rejects unknown fields. icon is an empty string or a member of the single src/shared/categoryIconNames.ts allowlist, byte-mirrored to the web. The shipped schema declares brain_sessions.icon as text NOT NULL DEFAULT '', so an unset icon is an empty string rather than null. BrainService.renameSession retains the owned-user-conversation boundary and returns { id, title, icon }; store updates touch only supplied metadata. An icon-only edit leaves recency and the rename journal unchanged. Resetting to the default bubble stores an empty name.
BrainConversationIcon carries this identity in stored/listed sessions, managed rows, dashboard continue references and diagnostics. Daemon status identities always publish it; the general wire identity permits omission for the CLI's real unattached identity, and the CLI provides no icon editor. No second metadata endpoint, activity state, subscription or browser persistence is introduced.
All host conversation rows use the renderer documented in Shared UI. Editable controls appear in the sidebar/drawer, owned history and switcher, owned rows of the admin register, desktop assistant menu and full/compact chat headers. The host root conversation of a scheduled-task history branch uses that same control; plugin-owned task rows keep their task presentation. Foreign/channel register rows, dashboard continue pills and diagnostics render the same saved glyph without an editor. Read-only chat headers take their icon from the viewed stream identity through BrainChatProvider.conversationIcon, so a conversation absent from the owned listing retains its saved glyph. Partial provider/model events preserve this identity; the next session snapshot/status supplies its own icon. The launcher menu lists the conversations that are working, waiting for an answer or approval, or have an unread result or failure, except the one on screen. Choosing one opens it in the assistant dock. Each busy row has a Stop action that calls brainAbort and keeps the menu open. With no such conversations, the mascot opens the assistant directly. The existing phone layout keeps the mascot hidden and offers navigation/history/header controls instead.
Conversation event rows
Historical image-refusal and provider-timeout events were rewritten to generic error events when those notices were retired. errorEventLabel displays their preserved text through its existing no-notice branch; neither retired code has a rendering case or translation key.
Every row between the person's messages and the replies (a stopped or failed turn, a changed model, mode, reasoning level, title or working directory, a sub-agent or workflow finishing) is a stored chat event, and the dock renders them all through ChatEventRow in web/modules/advisor/ChatEvents.tsx from the ChatEventView the daemon sends: history rows carry it as event on a role: 'event' message, and the stream delivers it as a chat-event frame, which brainChatStream hands to BrainChatProvider. There is no second frame and no client-side label for a raw kind; add a new row by adding its kind to ChatEventDetails, a case to eventRowView and an icon to EVENT_ICONS (the Record over every kind makes a missing icon a type error).
Cwd events keep their complete identity in the data and title while the visible label abbreviates an absolute path to its last two segments; managed project names remain whole.
Every kind renders as the same row: one lucide icon (distinct per kind, taken from the icon the app already uses for that idea), a label in the muted tone and a value in the foreground tone, joined by → for a change or a command outcome and · for a finish or a shell exit, on one line. The rows live in the tool rows' log column and reuse its primitives rather than imitating them: LogColumn (the indented monospace column at the tool rows' size), LOG_ROW (the row's flex line and padding), LogGlyph (the fixed-width, one-line-tall icon slot, which the tool rows' text glyph and spinner also use, so every label starts at the same x) and LogFold (the tool rows' native <details> disclosure with its chevron). On the full page an event run is drawn inside the same turn grid as a reply and stacks flush against the turn above; role labels and the block gap skip event runs (the gap is taken by the run itself only when it follows the person's message), so event rows read as one list. Event rows between two steps of one unfinished agent run are drawn inside that run's work timeline; event rows after a run sit between its folded summary and the next block, and the tool rows inside an opened timeline share their icon and label edges. The compact dock follows the same contract: neither variant spaces turns with a container gap, each turn takes its own breakBefore margin and each segment its own symmetric margin, and the dock's modal and ambient extras form their own spaced group after the turns. A failed row takes text-destructive on its icon and label only. A row whose text the column truncates becomes a fold (measured by useTruncated, which stays set once it fired) and unfolds in place through the group-open/fold variant, because a phone cannot hover for the title; a !cmd shows $ command · exit N and folds its output into a bounded (40dvh), keyboard-scrollable ToolOutputBlock. web/tests/e2e/specs/chat.events.e2e.ts measures the contract: no gap between event rows, shared icon and label edges with the tool rows of the opened runs around them, one-line height while collapsed, unfolding, and no sideways overflow at 1440, 390 and 320.
The dock words every row from typed facts in the reader's language, never from the daemon's English: a command outcome through commandOutcomeLabel (a no-op /compact by its reason, /goal status from its GoalStatusSnapshot, and a failure by its ChatCommandNotice when the daemon wrote the reason itself: restart-unavailable, or not-running for a command on a conversation without a live runtime, which failedOutcome derives from ConversationNotRunningError), and a failure through errorEventLabel, which uses the dictionary when the event carries a notice (the texts the daemon wrote itself) and shows text verbatim otherwise, because a provider's or a thrown error's own words have no translation. A notice never changes the English error or text the model reads. A frame whose kind changes what the status bar shows (STATUS_CHANGING_EVENT_KINDS in src/shared/chatPresentation.ts, byte-mirrored into web/lib/chatPresentation.ts, read by BrainChatProvider and the CLI's streamCoordinator) also refreshes the settled session state. For example, a model switched from the CLI shows one row in the web transcript and updates the model chip, without a reconnect. A reasoning level is recorded only when the next turn is admitted, so a change on another client arrives first as a payload-less settings frame that refreshes the same state and adds no row.
Usage and rail projections
Global useModelUsage and useUsageByDay read the complete provider/day counter, including recorded voice, sessionless inference and embeddings. UI API 49 withdraws useResetUsage and model-summary speed fields because this counter stores neither timing nor price provenance. Conversation and workflow speed remain measured. Users SpendLimit renders a small shared Button and ConfirmDialog under Limit and spend; useResetUserUsage(userId) calls the administrator-only target reset and invalidates the target user-spend query plus model/day/origin/provider statistics after success. The confirmation retains errors and blocks repeat clicks while pending; monthly limit configuration is unchanged.
Usage pressure is classified by usagePressure(percent) in the canonical
src/shared/displayFormat.ts and its byte-identical browser mirror. Below 70% is
normal, 70% starts warning and 90% starts critical. CLI telemetry uses that result
with its existing theme colours; browser usageProgressClass and
usageProgressColour in web/lib/usageMeter.ts map it to the existing design tokens.
Stats context bars and System diagnostics reuse the same colour mapping. Missing
context retains its empty fill and primary colour; no tokens, thresholds, readings
or polling behavior change. Classification is constant-time with no I/O.
The daemon's settled provider-request measurement remains authoritative. src/shared/displayFormat.ts
owns formatSpeed(value, locale?, fractionDigits?, mode = 'standard'), contextMeter(percent, mode = 'clamped'), providerUsageAfterRead(snapshot, failed)
and railProcessVisible(process). Its importless browser copy web/lib/displayFormat.ts is byte-identical,
enforced by webMirrorContracts. Formatting costs no I/O. Unknown context has a dash and no measured
fill at either rail density; the default context mode validates finite readings and clamps them to 0–100. ChatFooterDock selects contextMeter(percent, 'raw').label behind its existing null guard, preserving unbounded rounded labels (including NaN/Infinity), surrounding token text and DOM. An unknown standard speed has a dash, a positive sub-unit sample stays positive. CLI sub-agent/workflow metadata selects the formatter's compact fourth argument for the existing whole-number t/s presentation; browser consumers and the public three-argument plugin utility remain standard.
The formatter never reinterprets a settled rate as an idle activity estimate. Workflow cards, node
details, the web chat statusline and the stats modal call the same formatSpeed(value, locale) with the UI locale, including
sub-unit measurements: 0.4 renders as 0.4 tok/s in English and 0,4 tok/s in Czech/Slovak; positive samples
below 0.1 render as <0.1 or <0,1 tok/s. The web statusline omits an unknown/non-positive reading and
honors showSpeed without changing the other statusline segments.
The CLI composer owner applies the statusline plugin's showSpeed toggle and renders the focused
session's measured effectiveTps even after it settles, without gating it on current activity.
While a conversation is busy, the web chat refreshes its usage with a /brain/status read every 3 seconds (useBrainChatUsage in web/modules/advisor/brainChatUsage.ts). The timer runs only in a visible tab with no other session on screen, and streamed tokens do not restart it.
Quota fetching stays in UsageService on the daemon's schedule; the web's useBrainRateLimitsAll query does not poll but is invalidated by the daemon's provider-usage event and whenever the core event stream opens (useElowenEvents). On a transport failure,
providerUsageAfterRead keeps only the selected account's prior reading, unchanged, until its fetchedAt is
30 minutes old, and then withdraws it; a successful absent reading clears it. There is no "out of date" note
or warning tone: a missing Limits section is the failure signal. The telemetry rail, Settings account rows
and their provider-statistics drawer all project polling failures through this helper, so the same quota is
shown or withdrawn alike everywhere. A failed read with nothing usable draws no Limits section at all. CLI
quota reads also apply providerUsageAfterRead to each provider-keyed cached snapshot after transport
failure, dropping withdrawn entries; a successful absent read clears the map.
No helper caches data or resolves account identity. xAI/Grok uses the same provider-keyed map under PI id xai, already mapped by the connected-account row and the focused session's usageProvider. Its weekly or monthly allowance reaches the account row, provider-statistics drawer, telemetry rail and CLI through the ordinary ProviderUsage window projection; there is no xAI-specific UI fetcher or provider allow-list.
summarizeModelUsage(rows) in src/shared/modelUsageSummary.ts owns descending model sorting,
maximum token count, token/cache totals, known-cost totals and usage presence. Its importless,
byte-pinned web/lib/modelUsageSummary.ts mirror feeds buildUsageSummary in web/lib/usageBars.ts,
used by the chat StatsModal and dashboard MetricsTile; the CLI stats overlay imports the core source.
It copies the array before sorting, retains row objects, and costs O(n log n) time.
Empty input returns an empty model list, zero token/cache totals, a maximum of one, null cost and
false usage presence. Known costs are summed; unknown costs do not contribute, and an entirely
unpriced ledger stays null. A cost-only row still counts as usage.
This projection neither measures speed nor reads or persists data. src/brain/session/effectiveTiming.ts
owns measured request and turn timing, recorded through the canonical ProviderRequestRecorder.
Its pure speedOf and addSpeedSample arithmetic lives in src/shared/effectiveSpeed.ts;
brain events consume the effective timing rather than estimating speed from the model ledger.
Cache writes remain misses in the canonical cacheHitPct.
Goal facts come from chatEvents.goalStatusSnapshot. GoalStatus.tsx has a body-guarded browser
projection because backend runtime imports cannot cross the web build root. Both rail renderers consume
those facts, including durable evidence, rather than independently tallying subgoal JSON. CLI goal
commands and headless text output also format this snapshot; the headless JSON output remains the raw
wire goal. The CLI ProcessPanel consumes railProcessVisible directly. Malformed
subgoal JSON omits only the tally. src/shared/railSelection.ts owns uncollectedChildResult;
its importless web/lib/railSelection.ts mirror is byte-identical and pinned by
webMirrorContracts. Running children or pending result delivery own rail space.
railProcessVisible selects only running detached handles for display; foreground handles must
remain in the session snapshot. API 34 publishes both selectors through
window.ElowenUiRuntime.utils: SubagentsRail uses agents.filter(utils.uncollectedChildResult)
and TerminalRail uses processes.filter(utils.railProcessVisible) before either density renders.
Both bundled rails consume them and refuse to mount on a host below their declared API level (Terminal 63,
Subagent 66). These predicates cost constant time and no I/O; array filtering is linear and never mutates
snapshots. Empty selections draw no section, and without a contributing plugin no plugin section exists.
Conversation cards and drill-in
The host's GET /brain/conversation-links response comes from
src/api/routes/brainConversationLinks.ts. Its job-editor link targets the actual
plugin owning the live core-only conversationLinks control, with the job id percent-encoded,
while account grants, job visibility and run-transcript access are still enforced by core.
The canonical wire reply requires historyBranch: { plugin: string; key: string } | null:
the actual granted owner and schedules key on available/provider-error replies, null
when unavailable or registry loading fails. This descriptor is display metadata, not
permission to read a transcript. Run channels come only from the unique declared and
registered provider-owned run platform; channel previews remain non-continuable.
Conversation history navigation carries the granted provider's explicit historyBranch plugin/key descriptor. The conversation-list panel selects that owner through PluginHistoryBranchHost and obtains its branch-count label from the existing locale-keyed live plugin UI listing's merged strings.historyBranch. The label travels through the existing Panel→List→Row props, keeping rows presentational and avoiding a second metadata reader. Core supplies a neutral related-items disclosure while the provider registration is pending, missing, incompatible or crashes; authorized editor links and retained run session/continuation navigation remain usable. Unavailable navigation contributes no branch, while genuine read failures retain the existing retry path. Sub-agent history has its independent core-owned read lifecycle. Schedule clocks, active/paused labels and schedule-specific row presentation belong to the provider bundle, not to core.
PluginHistoryBranchProps.open(target) takes session:${encodeURIComponent(sessionId)} with an optional
:1 continuation request or :0 preview flag. Registry Cronjob sends its run's continuable flag;
bundled Subagent sends only the encoded child id. ConversationListPanel decodes the id and delegates
to the existing session opener, which checks actual ownership and eligibility. For the Subagent branch
the host always opens a read-only delegated transcript, ignoring continuation requests. The target is
navigation metadata, not authority. It adds no polling or separate session store; the existing session
stream loads the selected transcript. Without a plugin renderer the host retains its generic branch.
Every delegated child view is read-only, including owned children and nested drill-in. BrainChatProvider.openDelegatedChild sets the existing read-only state before opening the fixed-session stream; BrainChatSurface keeps the same mounted ChatComposer and textarea, locking editing, slash commands and submission. Locked views omit the Options menu and attachment input rather than showing unusable actions. The composer's outer footprint and the parent's field height are preserved; the field gains the removed menu's width. The narrative hint stays on one line with ellipsis at 320px in English, Czech and Slovak. Its full localized sentence remains in the title and accessible name. Normal parent text keeps native multiline wrapping. The importless childReadOnlyText(locale, { agentType, status }) in the shared chat-presentation seam and its byte-pinned browser mirror supplies both clients' label and description. It names the chosen agent type, not the task name, and distinguishes working, finished and error outcomes. Untyped and fork children omit the type. The fixed-session snapshot's session.delegation restores the child's durable type and outcome after reopen; authoritative delegation frames update the outcome on the same stream without another network read. An idle turn does not finish the delegation while nested children or background jobs remain outstanding. Generic history previews retain their history-specific wording. No Esc instruction is included because web child navigation uses the Return button. No separate read-only banner is rendered. Return occupies the attachment button slot and carries the child's name in its title. No message or skill-picker send targets a child. The parent's draft stays intact and its queue is projected only in the parent view, never into child status or transcript controls. Returning reconnects the bound parent and restores its composer. An owned focused busy child has a real Stop button in the composer's usual send/stop slot, using the existing child-targeted abort action. The attachment/return and send/stop slots use shared icon Buttons with the same geometry in the parent and child, including the coarse-pointer touch-target token. Task cards and the agents strip retain their usual place above the composer; child task rows are display-only through the existing null plugin-session contract. A history/foreign preview with no owned focus has neither Stop nor a model picker; the controller also refuses abort/model actions in that state so they cannot target the hidden parent. Model picks queued before drill-in are fenced by the stream generation. The request's delegated display kind selects the child-specific accessible description, separately from control authority. The existing pluginSessionId: null contract keeps plugin actions read-only too; no extra route or network read is introduced. Conversation history branches no longer advertise a child continuable capability; plugin navigation always opens a read-only delegated transcript.
What a person sees of a session's plugin cards (ctx.emitCard, the todo checklist is the canonical one) comes from one daemon path for every client: the cards of /brain/status and of the fixed-session stream snapshot, then card events. BrainService keeps them per conversation, and the snapshot of a drilled-in sub-agent carries that child's own cards, so the CLI child view (rt.childView.cards) and the web drill-in (openDelegatedChild in BrainChatProvider) draw the child's checklist, never the parent's. Card renderers draw the card they are handed and do not read a plugin route to rebuild it: the transcript card (PluginChatCardHost, falling back to CardBlock) and the telemetry rail's Tasks section (cardTasks in web/lib/railTasks.ts) both read the same card; a card whose rows carry no task ids stays in the transcript, drawn read-only.
The statusline numbers (context meter and window, cost, token rate) follow the same rule. A session's BrainUsage is computed once, from its own live PI session (usageOf in src/brain/events.ts, in the daemon or the sub-agent runner), and published on its step/idle events. /brain/status serves it only for the viewer's own conversations and rejects a child id, so a drill-in takes the child's usage from its stream alone: the last usage-bearing step/idle replayed in the snapshot, then the live frames. The CLI child view (rt.childView.usage) and the web drill-in (openDelegatedChild) both do exactly that; the web clears the parent's usage on entry and keeps its /brain/status usage poll off while another session is on screen, because that poll reads the bound parent. Exiting drill-in rehydrates the parent's own usage from its status and snapshot.
Acting on a session is separate from showing it. BrainChatActions.pluginSessionId is the conversation the plugin chat surfaces (cards, rail sections, pickers) may act on through their own routes: the viewer's own conversation, or null while a delegated child or a read-only transcript is on screen, because a plugin route writes only into the caller's own conversations (BrainService.writePluginCard). A surface without one draws read-only rows, and /tasks is refused in a child view with the same reason as the other parent-scoped commands, as the CLI refuses it. web/tests/e2e/specs/chat.subagent-tasks.e2e.ts opens a child with a task list in a real browser.
Plugin UI API 32 exposes that same cardTasks(cards) projection and
cardTasksAddressable(rows) guard through window.ElowenUiRuntime.utils,
typed in the UI kit as CardTask. The Todo bundle projects its card with
utils.cardTasks([card]); its rail receives the host's already-projected
TaskRailData.tasks and passes them unchanged to TaskList. Neither surface
rebuilds raw session tasks or extracts owner and blockers from glued text.
The host normalizes incoming plugin cards at the emit boundary. A rail slot is an internal
host projection, not another wire reader. A missing Todo card produces no rows;
an empty or partially unaddressable list fails the id guard. The projection is
linear in cards and Todo rows and performs no request or poll. Missing or
incompatible bundles retain the existing host fallback behavior.
Agent presentation
web/modules/advisor/agentPresentation.tsowns pure agent presentation:steerDescription(agent, t.agents)supplies the steer description to the agent cards and tool rows, anddeliveryLabels(agent, t.agents)suppliesdeliveryMethodanddeliveryStateto the agent cards inAgentsModal. Call it while rendering with the current locale's labels. Automatic delivery takes precedence; otherwise background work is manual and foreground work is inline. Only pending and acknowledged results add a delivery-state label; an absent or other result state returns undefined, so callers omit that line. These synchronous helpers perform no I/O or state changes and leave layout, tooltips and time formatting to their consumers. Cache-hit display importsweb/lib/displayFormatdirectly.
The live sub-agent row
The running sub-agents of a conversation are one rail section in both densities: the open rail draws the
rows, and the collapsed strip opens the same rows in a popover (RailMenu). The rows come from the
SubagentState the daemon already publishes for the conversation's own delegated children, so nothing
here reads a second source. Both densities draw the same row: the same status mark (the rail's own
RailDot, breathing while the run goes on), the same model's mark, the same name, the same figures and
the same stop control. The popover is the rail at its widest (RAIL_MAX_WIDTH), because a live row
carries a name, a model's mark, the run's note, its elapsed time, its speed and a stop control, and at
the rail's default width the name itself would be cut.
A row with a status note takes two lines (RailRow's note). The first line carries the status mark,
the model's mark, the name and the row's trailing meta; the second carries the note itself, muted, one
line deep, and inset so that it sits under the NAME and not under the model's mark. A row without a
note stays one line, like every other row of the rail. The name is the row's identity and is never cut
to a stub: the rail's default width is 340px, of which a row's own content is 308px, and the name, the
model's mark, the elapsed time, the speed and the stop button do not all fit on one line of it. The
trailing meta column therefore keeps the elapsed time — the clock the reader watches — and the speed
and the token count ride the end of the note's line, where they still read as the row's own figures.
A one-line row keeps every figure in the trailing meta column, the rail's house contract.
A row's name and a model's mark are hover targets, and the row's button stretches its own click area
over the whole row so that a click anywhere opens the child. That stretched area is painted above the
button's content, so the two targets are lifted above it (relative z-10) — otherwise Chromium
hit-tests the stretched area and the pointer never reaches the mark or the name. The lift changes
nothing else: the row still opens the child on a click, and the targets keep their own keyboard focus
and accessible names.
A row carries four facts, and each one has exactly one authority:
- the elapsed time is counted from the run's own
runStartedAt, the delegated call's stamp, on the shared visible-tab clock (useNow). A settled row shows its ownsecondsinstead; the clock ticks only while something runs. - the generation speed is the daemon's measured
effectiveTps— the samesrc/shared/effectiveSpeed.tsaggregate every other surface renders — formatted by the host's oneformatSpeed. A run with no measured request shows no speed, never an estimate. - the last status note is the run's
detail, the child's current tool or its authored status note. - the model mark is the child's own model, drawn with the shared
ModelIconand named on hover by the sharedMarkStrip; the name itself opens aHoverCardwith the delegation brief, which opens only after the pointer rests or the name receives keyboard focus. Its interactive Popover stays open while the pointer or focus is over the name or brief; Tab enters the reading region for arrow/PageDown scrolling; another Tab reaches Stop, and Shift+Tab returns to the name without requiring Escape. Wheel scrolling works over the card. Its height is capped at 16rem or the available viewport height, whichever is smaller. Escape dismisses it without opening the child. The compact agents popover also scrolls within the available viewport height, keeping every Stop control reachable even with 64 jobs. The row carries no nativetitle, so the browser's own tooltip never paints over it.
The stop control on a running row is the host's own child stop: POST /brain/abort with the child's
session id, the route the drilled-in child's Stop button and the CLI use. The daemon resolves the child
through the durable ancestry of an owner conversation, so another account's child is refused there, and
the run, its turns and its own sub-agents come down together. The row offers no stop for a settled
child, and the web adds no stop mechanism of its own.
A running workflow's row is drawn the same way, from the WorkflowState the rail already receives. Its
model marks are the distinct models of the nodes running now (a node's effectiveModel over its
declared model), stacked by the same MarkStrip; the name is workflowLabel, with the full label on
the HoverCard instead of a native title. The note names the running nodes by id, or reads as waiting
when none runs, and its line ends with the progress (done/total from workflowCounts), the failed
node count when there is one, the summed effectiveTps of the running nodes and the workflow's token
total. The trailing meta is the run's elapsed from workflowElapsedSeconds, the same headline both
workflow inspectors show. The stop is the plugin's own POST /brain/workflows/stop, the route the web
inspector's Stop button uses. The note's inset follows the width of the mark stack, so it stays under
the name whichever number of marks precedes it.
Stream watchdog defaults
DEFAULT_STREAM_SILENCE derives limitMs and reviveLimitMs from RUNTIME_LIMIT_DEFAULTS.streamSilenceLimitMs and streamReviveSilenceLimitMs. resolveStreamSilence uses these values before configured values arrive and retains the heartbeat floor from RUNTIME_LIMIT_BOUNDS. startStreamWatchdog measures wall-clock silence, skips hidden pages and returns the stop callback. BrainChatProvider resolves this pair from config.runtime.limits for its live conversation stream, without a separate setting or timer owner.
Advisor statistics
Advisor statistics rendering is owned by web/modules/advisor/StatsModal.tsx. Its private StatTile renders the existing label and value spans for conversation metrics, model totals and context-window figures. Pass a translated label, an optional Lucide icon and the already formatted value as children. Tiles preserve the existing muted background, borders and typography; omitting the icon preserves the plain context-label style. Missing usage values retain the caller's unavailable marker, and an absent context breakdown retains the modal's empty state. This component performs no fetching or accounting and is not exported as a shared UI primitive. StatsModal is its only consumer, with the model row remaining separate.
Workflow DAG layout
Delegation runStartedAt is the current call's epoch-ms anchor, separate from the child creation timestamp. AgentsModal ticks from this anchor while running and uses reported seconds when no anchor was recorded; it never uses the child's age as runtime. Boot recovery derives both live and terminal seconds from that same durable call anchor, including downtime. Rows without an anchor retain last-reported seconds plus respawn time. The claim-guarded completion and failed-recovery parking write terminal seconds atomically with the result so the published row cannot fall back to its last progress tick. Workflow snapshots carry one runTiming interval for the current DAG run. Start, manual resume and boot resume each begin a new interval; terminal snapshots freeze it with finishedAt. Both inspectors label the headline as run elapsed, computed by workflowElapsedSeconds, not the maximum or sum of node durations. Missing historical timing or a terminalized interrupted interval without a known finish renders unavailable. workflowNodeSeconds owns live node duration derivation for the CLI and web. These pure helpers have no I/O or token cost.
API 31 publishes ElowenUiRuntime.utils.workflowLabel and workflowCounts from the browser mirror of the shared workflow layout module. The bundled Subagent rail uses these helpers for trimmed titles, first-task fallback and done/total counts, and API 67 adds workflowElapsedSeconds so the rail's workflow row shows the same run elapsed as the inspectors; its manifest requires API 67. Empty node lists retain the workflow-id fallback and zero counts; without the plugin there is no workflow rail section. Bundles requiring this API are refused by older hosts before mounting.
src/shared/workflowLayout.ts owns the workflow graph's longest-path waves, stable barycenter order, via slots and orthogonal edge routes. The importless, byte-identical browser mirror is web/lib/workflowLayout.ts, pinned by tests/contract/webMirrorContracts.test.ts. Call layoutWorkflow(nodes, geometry) with a card width, per-node height, gaps, via-slot height and gutter lane dimensions. It returns positioned cards and edge point lists; the caller paints those units as pixels or terminal cells. With no nodes it returns an empty layout; dangling dependencies and cycles still place every node, while backward or unresolved edges are not routed. The CLI canvas in src/cli/chat/workflowCanvas.ts supplies cell dimensions and the fullscreen web inspector in web/modules/advisor/WorkflowModal.tsx supplies 196-by-68 pixel cards. Neither client has its own layering or routing algorithm. Via slots cost one thin row in each crossed wave, keeping long edges out of non-endpoint cards. The same module's workflowCounts, activeNode and stepSelection are the only node tally and selection walk; the CLI telemetry rail, its transcript marker, the workflow modal and the web inspector all read them rather than re-deriving their own.
The web inspector opens from the telemetry workflow row through the existing Modal fullscreen presentation, as the Agents and Conversation diagnostics inspections do. On desktop its graph and detail panel scroll independently; on a phone the same modal switches between a wave list and the selected node detail. Empty, loading, reconnection, live-following and keyboard behavior remain inside that one surface. The Stop button uses elowenClient.brainWorkflowStop(workflowId) through the shared JSON transport to call the subagent plugin's authenticated POST /brain/workflows/stop, returning its actual { workflowId, status: 'cancelled', stopped, running } response. An interrupted, possibly accepted stop is not replayed and its cause reaches the shared toast adapter. The plugin checks both the run's originating principal and the core-owned parent-conversation owner projection; a missing, foreign or terminal run is refused. Without the subagent plugin, the route is absent and the browser reports an error rather than claiming success.
The live snapshot clips each node's result and error to a 500-character preview, which is what the graph cards and wave rows show. The detail panel of a finished node instead loads the complete outcome from the subagent plugin's authenticated GET /brain/workflows/result?workflowId=&nodeId= route (useWorkflowNodeResult in web/lib/queries.ts), behind the same owner check as Stop (one ownedWorkflow helper in plugins/subagent/lib/workflow.mjs). A done node's answer is re-read from its durable child transcript through ctx.readSubagentResult, the path dependents and the final summary already use, and renders through ChatMarkdown, the transcript's own markdown block; a failed node answers the engine's stored reason. An unfinished node answers 409, an unknown node or a foreign, missing or no-longer-retained run 404, on which the panel falls back to the snapshot preview with a muted note that the complete result is no longer in the live view and lives in the node conversation; the preview renders through the same ChatMarkdown prose (or plain error text) as the complete result, never as code; any other failure is an ErrorState with retry. The route serves only runs the engine still holds in memory (the subagent resultRetentionMs, one hour by default). The query key carries the node's startedAt as well as its status, because WorkflowResume retries a node under the same workflow id and often the same child session: a new attempt is fetched afresh instead of reusing the previous attempt's settled answer.
The advisor workflow presentation keeps node-status display metadata in NODE_STATUS in web/modules/advisor/workflow/WorkflowNodeCard.tsx. Each supported status supplies its icon, tone, classes and translated label key. WorkflowNodeCard resolves t[labelKey] for its accessible name, and WorkflowNodePanel resolves the same key for its status badge. The metadata is internal to the advisor surface; callers use the existing workflowModal dictionary and the typed pending, running, done and error statuses. WorkflowGraph derives each routed edge's SVG path and live state once per render and reuses them for the edge and its energy animation. Energy is emitted only between a done source and a running target; without such edges there are no energy circles. Path layers remain ahead of energy layers. These render-time calculations add no I/O and leave layout and routing with the existing workflowLayout owner. WorkflowModal is the real consumer on desktop, while the phone wave list uses the same node-card status metadata.
The pagehide handler separately checks persisted and releases bindings with detachOnly. A bfcache-ineligible page may report persisted false during a phone lock; work-in-flight refusal and the daemon idle reaper remain authoritative.
Conversation names and pins
The conversation bar (ChatConversationBar, page and dock) is the one place the open chat is named. Its
title opens the switcher; the pencil beside it (on a phone the bar's ⋯ menu) and /rename open the
controller's renameOpen, which swaps the title for an input in place, so there is no rename dialog. For
a listed, editable conversation Enter or blur commits through renameSession (PATCH /brain/sessions/:id)
and Escape keeps the old title. For a new, editable conversation absent from the confirmed owned-session
listing the input edits an optional name draft instead, shown as the title until the first send.
BrainChatProvider owns this draft by session id, so dock and page surfaces share it and switching
conversations cannot apply it to another conversation. The first
brainSend(text, display, binding, title) carries a nonempty name as POST /brain/send.title; no name
is written on field edits or merely opening a conversation. Failed sends retain the name and message.
The daemon shares normalization (normalizeConversationTitle in src/brain/conversationTitler.ts,
whose manual mode rejects an empty title for both paths) and storage with the existing rename path
and commits the name on the first-message admission transaction. A manual-title flag prevents later
automatic replacement; an omitted name keeps automatic titling. The current user walkthroughs are
Task guides and the localized
conversation management guide;
neither flow has a separate new-chat Name field.
A read-only view (a delegated child, focused from the agents rail or opened from the register, or another
account's or a channel conversation) is never an unsent conversation, although the account's own listing
does not hold its session. Its title stays the conversation switcher (openHistory, the same button, chevron
and chat-conversation-switcher test id as an ordinary conversation), so the reader can leave the view for
another conversation without reloading; only naming is locked (no pencil, ⋯ rename row or inline editor), and
neither the bar's "+" nor the phone ⋯ menu offers a new conversation. ProjectPicker stays locked. The title is BrainChatStatus.readOnlyTitle, the conversation the view belongs to: for a child
focused from the live conversation that is the bound parent, read live from the listing, and a nested
descendant inherits the view it was opened from; otherwise the viewed session's own listed row, else the
opener's BrainOpenRequest.title, else brainChat.untitled. A viewed child's own name (childFocusName:
the label its Agents modal, telemetry rail, keyboard or workflow entry passes to focusSubagentSession, or
the register's BrainOpenRequest.name) follows as muted secondary text, as the project picker shows a
computer's state, so the bar says both where the sub-agent runs and which one is on screen. The name is
display data, independent of whether the drill-in owns targeted controls (childFocus): a child opened from
a /chat?session= link's read-only preview is named too. Return restores the conversation's own name and "+". BrainChatChildFocus.test.tsx, ChatConversationBarOwnerControls.test.tsx, chat.child-focus-bar.e2e.ts and chat.read-only-switcher.e2e.ts pin this.
ConversationListPanel offers Pin conversation and Unpin conversation in the existing row action
menu. brainSetSessionPinned(id, pinned) sends PATCH /brain/sessions/:id/pin with { pinned: boolean }
and returns { id, pinnedAt: string | null }. Core accepts only the caller's own ordinary conversations;
foreign, channel and absent ids return 404. Pending rows disable their pin action, failed writes show
a toast, and success invalidates the shared brain-sessions query. Core also publishes the existing
owner-scoped conversation-list invalidation so other devices refresh. There is no browser pin store
or pin limit. The sidebar and Mine's Pinned section filter the same listing by pinnedAt and use the
account navigation query's pinOrder through the shared comparator: new, unlisted pins first by newest
pin time and id, then saved order. The list's own sort never changes the Pinned section's order.
See shell for drag/menu editing, bounds, revision conflicts and restore-default semantics.
With no pins the Chat row has no submenu.
New conversation start
Plugin UI API 68 exposes startConversation({ draft }): Promise<string>. The Email page's reply-with-agent action passes its localized instruction and stable email reference. The runtime calls the mounted BrainChatProvider through the existing brainDock cross-component channel, then navigates to /chat only after creation confirms. It reuses startNewConversation with fresh: true and no target, leaving default Project selection to the daemon (the account's ordered eligible Projects), rather than borrowing the currently open conversation or the dashboard's remembered choice. It returns the confirmed session id. No message is sent, trimmed or queued; the user edits and submits through the normal composer.
The provider owns unsent text per bound session. A confirmed rebind saves the previous session's text and restores the destination's text; route changes and dock toggles retain that owner. A launcher draft entered before the first binding belongs to that first session. Only the still-current creation may install a prefill and request focus: refused or superseded creation rejects without a late prefill or navigation. Deleting a conversation drops its draft; provider teardown (including account replacement) drops all drafts. There is no local-storage or server draft persistence. Without a call the bridge does no work; a call pays only the normal creation, stream and query-refresh costs, with no inference.
A conversation with no transcript blocks opens on ChatStart (web/modules/advisor/ChatStart.tsx) once its history is confirmed empty; before that the surface shows the loading state. It repeats the dashboard hero: the greeting and ask over prompt cards. web/lib/heroCopy.ts is the one source both surfaces read. recapVariants(recap) expands the day's digest batch, with missing per-variant hero fields inherited from the top level; heroGreeting returns the agent-written greeting or the reader's time-of-day line with the first name, and null until the browser clock is known; staticHeroPrompts holds the static prompt seeds. The dashboard rotates through the variants (useRecapRotation) and adds its own costs and setup pills. The chat start reads the first variant through the same useDashRecap query, seeded on /chat by the route's server prefetch (fetchDashRecap, as on /dash) so the greeting is right on the first frame, and draws at most four shadcn Cards (chat icon and label as the CardTitle, the prompt as the CardDescription; the title's button stretches over the card as its one control). The greeting takes the dashboard's text-display role on the full page and text-page-title in the dock. Below the md breakpoint the cards are hidden and the greeting and ask are centred. The cards hold today's agent-written pills, else the summary, plan, find and capabilities seeds. A card only seeds the composer through openBrainComposer, so the text can be edited before sending; in the dock the card passes dock, so the seed stays in the dock's composer instead of moving to /chat. The recap query is the dashboard's POST /dash/recap, so opening an empty conversation may start the day's digest exactly as opening the dashboard does; a disabled recap answers { enabled: false } and the static copy stays.
Advisor session-open request
openBrainSession(sessionId, continuable, { delegated, title, name, dock }) stores one BrainOpenRequest across the chat host's mount gap and dispatches the live event. It contains sessionId, continuable, delegated and dock only when true and title and name only when nonempty. The shell answers every request by routing to the full /chat page (on /chat it loads in place, never navigating): the conversation switcher, the sidebar's pinned rows and the dashboard recap all open the real conversation there, with the delegated, read-only and naming semantics above. Only a request with dock: true opens the side dock, and only the advisor launcher's conversation rows send one. openBrainComposer(text, { dock }) follows the same rule for composer seeds: the dashboard pills, the command palette and guide search land on /chat, while the launcher's focus request and the dock's own controls (its ChatStart prompt cards and the compact bar's NewConversationMenu dock) stay in the dock. A phone never shows the dock, so both targets reach /chat there, as below Studio's dock width. title is the name of the conversation the transcript belongs to as the opener lists it: the conversation register passes the row's own title, and its sub-agent branches pass the parent row's title. name is a delegated child's own name: the sub-agent branches pass the node name their tree lists for that session (subagentNodeName in conversationListModel.ts). Both name a read-only view in the conversation bar (see "Conversation names and pins") and carry no authority. consumePendingBrainSession returns null when absent and clears a request once consumed. BrainChatProvider opens delegated requests read-only, even when continuable. focusSubagentSession(sessionId, name) retains actual rail child naming. The register's separate child tree consumes delegated opens; its inline rows follow conversation ancestry and schedule groups, and an inline row with a parentSessionId (the instance register nests delegated sessions) opens as a delegated request named by its parent row's title and its own title, or by its own title alone when the register does not hold the parent.
Conversation history selection
ConversationListPanel keeps selection by conversation id, limited to direct matching roots on the current page and excluding rename editors and context-only ancestors. Select explicitly reveals checkboxes on touch as well as desktop. Search, facets, sort, direction or page changes clear it; refetches prune missing ids. The shared SelectionActionBar offers Clear, sequential HTML/JSONL export and confirmed Delete. Export first explains separate browser downloads and reports requests initiated, never files saved. No host table selection path remains.
Bulk delete has no endpoint. It calls the controller's per-id delete one conversation at a time, with the open conversation last, so the per-id ownership check stays the only authority. A failed batch shows one error toast: a failure message when nothing was deleted, or a done and failed count on a partial run. Only successful deletions leave the selection, so failed rows stay picked for a retry.
Replay and tool-list projections
LiveEventReplay and appendReplayBrainEvent share one private pure fold-target computation for adjacent text/reasoning deltas and keyed snapshot-state replacements. User, step and tool events remain ordering boundaries. LiveEventReplay keeps sequence stamping, replacement character deltas and the appendedChars optimization, trimming at 512 events or 524288 serialized characters. The array appender keeps its caller's event-count limit and returns true only when an oldest entry was dropped. HeadlessSnapshotReconciler is a real array consumer; the live session journal is the other consumer. With no events the buffers stay empty; neither path reads durable history or changes the public event JSON contract.
GET /users/:id/tools returns name, label, plugin, group, state and toggleable. Its admin authorization, account/plugin grants and family-pattern rules are unchanged. The Users editor derives its monochrome glyph from the tool name and receives no icon field. An empty result uses the existing empty state. CLI/web ToolItem projections likewise retain tool execution data without icon; their renderers derive name-based markers. BrainEvent.icon remains the live channel icon contract: spawnEventReducer resolves it, and shared liveMessage/liveTrace retain and render it for chat adapters, with their existing generic fallback when no icon matches. The plugin tools endpoint and plugin manifest icon resolver remain unchanged.