Chat bottom dock: a worded status line carries Interrupt, answerable question dialogs dock above the composer with "Chat about this" modelled, and the header shows model and context at every width¶
The Chat put everything the operator acts on in different places. The conversational state was a coloured badge in the header (a bare dot below 640px). Interrupt was a header icon-button beside Stop (ADR-0029). A pending question was an interactive card somewhere in the stream (ADR-0028), so answering meant scrolling to find it and then scrolling back to the composer. Below 640px the model chip and its context meter were hidden (ADR-0061), so a phone never showed which model was running or how full its context was. Claude Code's own picker offers a "Chat about this" row that lab did not model at all, and a run of tool calls collapsed to a count that said nothing about what happened.
The maintainer reviewed three mockups and chose "Dock", revision 2 (issue #58; the mockup is docs/reference/chat-dock-mockup.html). It moves every action to the bottom edge, in thumb reach. This ADR records what that supersedes and the one server change it needed.
The decisions, pinned:
-
Header: model and context at every width; no state badge, no behind chip, no inline Interrupt. The title block becomes two lines: the click-to-edit title over a secondary line of project link · forge link · model and effort. The model text no longer hides below 640px. The context meter is a ring plus the rounded percentage, visible at every width and in every conversational state whenever usable context usage exists. It is no longer nested in the model chip, and it keeps ADR-0061's amber (≥80%) and red (≥95%) bands, with the percentage text always present so the band is never colour-only. The state badge and the standalone "N behind" chip leave the header at every width; the status line and Run details replace them.
-
Run details is what the meter opens. It is a bottom sheet below 1024px and an anchored popover at and above it. It lists model and effort, context as
N of M tokenswith a bar, the run's branch, and the base branch with its commits-behind count. A Pull base action sends the existing/pull-baselab command down the ordinary reply path, and it is shown only while a live run is behind. The meter only exists when usage is known, so the•••menu also carries a "Run details" entry and the surface is always reachable. -
The
•••menu exists at every width. It is a bottom sheet below 640px and an anchored dropdown above. Whenever the run is live it carries Interrupt, whatever the derived state says. Below 640px it also carries what does not fit the phone row: the open affordance and the two-step Stop. At 640px and up those stay inline. Rename, the project and forge links and the exposed-secrets badge stay where they were. -
A worded status line sits above the composer. It is shown whenever the run is live, the transcript is available and no dialog is pending. Working reads "Working" with a pulsing dot, the running tool call's title, and the elapsed time since the turn's latest user message, with a one-tap Interrupt on the right. Needs input reads "Waiting for you". Idle reads "Idle" with a hollow dot and how long ago the last message arrived, with Pull base · N behind on the right when the run is behind. A missing timestamp just drops the time. The line never gates Send: ADR-0029's always-Send stands, and Send never morphs.
-
Interrupt moves out of the header. One tap, no confirm, through the one
createInterruptcontract. It lives on the working status line and, because derived state can be stale (issue #38), as a•••entry at every width whenever the run is live. ADR-0029's liveness gating carries forward unchanged; only its placement in the header is superseded. The degraded question-state composer hatch (a question with no structured dialog) stays as it was. -
Answerable question dialogs dock above the composer. This covers flat single-select, flat multi-select and multi-question dialogs whose
answerableis true. The panel replaces ADR-0028's interactive in-stream card for them. The stream keeps one lifecycle-style line at the dialog's position: "{agent} is asking a question. Answer below." (or "N questions"). Plan-review dialogs and non-answerable dialogs keep ADR-0028's in-stream card and composer note unchanged, and answered dialogs keep their inert summaries. -
The panel's shape. Each option is a full-width row of at least 44px, a radio for single-select and a checkbox for multi-select. Picking never submits. The synthesized free-text row is not drawn as an option: the composer's text box is that row ("Or type your own answer…"). It is single line because free-text answers are validated single-line, and it is absent when the question has no free-text row. An option whose label ends in "(Recommended)" (case-insensitive) is preselected and shows a "Recommended" tag instead of the suffix. On single-select only the first such option is preselected; on multi-select every one is. Otherwise nothing is preselected. On single-select, typing clears the pick and picking clears the text. On multi-select, text rides alongside the ticks as
other_text. Send becomes a labelled confirm button, "Answer", disabled until the question has a pick or text. Slash autocomplete is off while the panel is open. Drafts survive refetches and reset only when the dialog'stool_idchanges, as before. -
Multi-question dialogs show one question at a time. A row of chips names each question by its
header, falling back to "Question N", followed by a final Review chip. Chips are tappable in any order. A chip ticks once its question is answered and has been left. Typed text is kept per question. The confirm button reads "Next", and "Review" on the last question. Review lists every answer and marks unanswered ones "Not answered yet"; tapping a row returns to that question. A full-width "Send N answers" submits once with the same positionalanswersADR-0028's form sent. -
ADR-0028's "no nested scrollboxes" rule is relaxed for this panel only. ADR-0028 pulled the picker out of the composer because stacked questions in nested half-viewport scrollboxes laid over the conversation on phones. The dock avoids that failure differently. It shows one question at a time, it folds to its header line with a chevron, and below 640px only the option area scrolls, once the panel would exceed about half the viewport. The panel header and the composer never leave the screen. Everything else in the chat keeps a single scroll container.
-
"Chat about this" is modelled, as one tap with no text. The panel offers it below the options of the question on screen. It is hidden on Review and is never offered for plan reviews or non-answerable dialogs. Tapping it makes the same choice the provider's own picker offers: it sends no message. The agent then asks what the operator wants to know, and the operator replies in the ordinary composer once the dialog is gone. On a multi-question dialog the action belongs to the question on screen, so it stays off, with the reason in words, until every earlier question has an answer. The issue brief and the mockup describe a different design, a "question on hold" mode with a quoted reply box whose Send dismissed the dialog and delivered the text. The maintainer replaced that on PR #60.
-
One server action for "Chat about this", inside the answer guard.
POST /api/v1/runs/{id}/answeraccepts it as one more answer shape. A single-question dialog sendschat: true. A multi-question dialog sendsanswersholding the operator's answers to the questions before the chat, in order, closed by one{chat: true}entry. These becomeprovider.DialogAnswer.Chatandprovider.QuestionAnswer.Chat. The request goes throughchat.Service.AnswerDialoglike any answer, so a staletool_idis refused before any key plays and the whole recipe runs under the per-session lock. A provider without answerable dialogs keeps returningErrDialogNotAnswerable; codex does exactly that, and its dialogs never dock, so the UI never offers the action there. -
The adapter replays the operator's path, then selects the picker's own row. Every Claude Code question picker ends in a "Chat about this" row, and each question of a form has its own. The Claude Code adapter enters the earlier answers exactly as the operator gave them, which advances the form to the question they chose to chat about, then walks down onto that picker's row and presses Enter. "Second option on the first question, chat about the second" is played as exactly that. Without the earlier answers the row would be chosen on the first question, and the agent could not tell what the operator wants to talk about. Nothing else is sent: no Escape, no text, no extra wait. The row's navigation index comes from the row models in compat §7: after the modelled rows on a single-select picker, one further on a multi-select picker (past Submit). The recipe is not driven live yet, so a chat answer records a backstop intent: if the blind walk lands on an option and answers the question, the chat shows a warning naming the question and the recorded answer. Every other resolution renders through the existing dismissed summary. The row indices and the transcript shape are flagged in compat §7 for the next live sweep.
-
The tool-run summary describes a run by kind. The collapsed line reads "Edited N files, ran N commands, read N files", in that fixed order with zero counts omitted. Edits count distinct paths of diff and write views; commands count command views; reads count distinct paths of read views plus one per search. A run with no recognised tool keeps "N tool calls", and the failed count and running marker are unchanged. Classification stays provider-blind, by
ToolView.Kindalone. Search tools carried no view, so asearchkind is added. It is a classification tag rather than a rendering: the detail views draw it through the raw input/output fallback, exactly as if it had no view. Claude Code mapsGrepandGlobto it. -
A
/button opens the slash-command list. It sits left of the text box whenever the run has slash commands and the box is empty or already starts with/. It opens the existing popover with the full catalog and focuses the box. Selecting an entry behaves exactly like a click in today's popover (ADR-0041's gestures are unchanged).
Status¶
Accepted. Resolves issue #58.
- ADR-0029: supersedes its placement of the turn Interrupt in the header, both the inline desktop button and the header-only framing. Always-Send, the liveness gating and the one-tap contract stay in force.
- ADR-0061: supersedes the sub-640px hiding of the context meter and the meter riding the model chip. The occupancy semantics, the raw-limit denominator and the tint bands stand.
- ADR-0028: supersedes the in-stream interactive card for answerable question dialogs, and relaxes its single-scroll-container rule for the docked panel's option area. Placement for plan reviews and non-answerable dialogs, answered summaries and full plan markdown stand.
- ADR-0020: amends its "Chat about this (not modelled)" note. The action is now modelled and drives the picker row by its navigation index. The row is still not a
Dialogoption. - Issue #146 rule: extends its "each kind names a rendering the client already draws" rule with the classification-only
searchkind.
Compat §7 gains the "Chat about this" subsection, and §8's Interrupt placement is rewritten. docs/agents/provider-authoring.md documents DialogAnswer.Chat and QuestionAnswer.Chat.
Amended by issue #92 (2026-10-09): the composer's reply text is now a draft kept per run in the browser's localStorage (key lab.draft.chat.<run id>, saved on every keystroke, entries older than about seven days dropped on read). It is restored when that run's chat opens, also after a reload, and swapped when the run id changes under a reused route component, so one run's text never shows in another run's box. It is cleared on a successful send, when the box is emptied, and when the run ends; a failed send keeps it. Where storage is unavailable (private mode, quota, disabled) the draft silently does not persist. The question dock's answer drafts are unchanged: still held per dialog tool_id, in memory. Decided for the case of answering a quick question in one run mid-way through a long reply to another.
Considered options¶
- Keep the in-stream card and add a jump-to-question pill. Rejected. The card still sits away from the composer, and multi-question dialogs still stack every question into one long card. The issue's core ask is answering in thumb reach.
- Decline the picker with Escape, then send a typed message (the first cut). Rejected by the maintainer on PR #60: the picker has its own "Chat about this" row, and the action must select that row and press Enter, send no Escape and no text, and leave the conversation to the agent's follow-up question. The first cut used only keys whose behaviour was already pinned. The price of the row is a blind walk whose geometry is inferred until the live sweep runs; the backstop intent covers the harmful miss.
- Choose the row on the first question of a form, whatever question is on screen. Rejected by the maintainer on PR #60. Each question has its own row, and the agent learns what the operator wants to talk about from where the row was chosen and what was answered before it.
- Let Chat about this skip unanswered earlier questions. Rejected for now. The provider's form may allow moving between questions without answering, but that navigation has never been captured. The only path lab has driven live is answering a question to advance.
- Classify search tools by tool name in the client. Rejected. The SPA renders by
ToolView.Kindalone and never knows tool names (issue #146), and a name list would be provider-specific. The adapter already owns that mapping. - A provider capability flag for Chat about this. Rejected for now. Only answerable question dialogs dock, and only a provider that answers dialogs produces them, so the action is gated by construction. A future provider with answerable questions but no way to set them aside returns
ErrDialogNotAnswerable, and the operator sees the error.
Consequences¶
- Phones always show model, effort and context, and every action (answer, interrupt, pull base, slash commands) sits at the bottom edge or in the header's
•••sheet. - The state badge is gone from the header. The runs rail keeps its state dot (out of scope here), and the Chat now states its state in words.
- A docked question can take up to about half a phone screen. The fold chevron and Chat about this are the ways to read the stream behind it.
- Chat about this rests on an undriven row index until the live sweep runs
TestCompat_Live_chatAboutThisRow. A walk that lands one row long wraps to the first option and answers the question; the backstop warning is how the operator finds out. Whatever the row records, history renders as dismissed, because any denial, unreadable result or empty answers map collapses toDismissed. - Answers drafted for the questions after the one chatted about are not sent. The agent asks again after the conversation.
- If an AFK run's picker times out between the
tool_idre-read and the first key, the recipe's keys reach the composer of a working turn, where they are expected to do nothing. Nothing is interrupted and nothing is sent. - Tool runs made only of tools without a recognised view (MCP tools, skills) still read "N tool calls".