Skip to content

ADR-0087: A command-first layout: a top bar, a palette, a table and a split view

Status: Accepted, amended by ADR-0092 (the composer's dock holds the tray of what waits; the field starts one line tall on a phone) Date: 2026-10-28 Deciders: Alex Nodeland Amends: ADR-0029 (one width rule, the phone's drawer), ADR-0081 (the rail's current area, in the app), ADR-0085 (the threads' search, the page header's places above, a provider's error, the layout pass it promised)

Context

After the polish pass the owner wrote: the threads' search should collapse to an icon, a big plain field that isn't used is poor design; much is superfluous or should be tucked away; the layout is elements stacked one on another; the next pass should use the corners and the whole screen. Three directions were drawn as mockups (a quiet split, command-first, a corner dock) and the owner chose B, command-first, with borrows from the other two.

Decision

In the app; admin keeps its rail (RailShell, the old AppShell), whose classes now live in rail.css, which admin imports, so the app's stylesheet doesn't carry them.

  • One bar along the top (AppShell), pinned at every width: the mark (from 1024 pixels; a phone's bar has none), the switcher, the workspace's areas as a track (Tracks, the current one raised as a chosen segment; open proposals counted on Proposals), and in its end corner the magnifier, what waits for the reader ("2 need you", a link to the threads that wait) and the account. At 360 pixels and under the switcher names the workspace alone (the tenant is in its menu), and on a phone what waits is its count alone, named in full. Below 1024 pixels the areas are the page's first row, in its flow; on a phone (the kit's phone variant: 48rem or narrower with a coarse pointer) they are a tab bar along the window's foot instead, see below. There is no drawer and no left rail. The bar's current area is the way back up, so the app's pages carry no breadcrumb; PageHeader takes a Breadcrumbs element where a page has one (admin's trace).
  • Search is a palette (app/src/on-demand/palette.tsx, an add-on of about 1.9 KB loaded the first time it opens, behind the kit's PaletteFrame): one field over the workspace's threads and artifacts by title, its areas and New thread, a combobox over one list, opened by the magnifier (its aria-expanded says whether it is open), by ⌘K anywhere, a field too, by Ctrl+K outside a field (in one too, but not on a Mac, where Ctrl+K in a field kills to the line's end), and by "/" outside a field; no key opens it with another modifier held or over a dialog or a menu already open. Its groups are named (fieldsets labelled by their headings), and a choice is followed by a click, a tap, Enter, or an assistive technology's activation; a press keeps the focus in the field. Escape gives the focus back to what opened it (the magnifier, for a key); following a result goes to that page's heading (ADR-0068). The threads page's own search field, its chip and its q in the URL are gone; SearchField with them. The magnifier is the kit's search glyph: the set keeps its 54 glyphs.
  • The threads are a table from 1024 pixels: Thread, Last message, Status, Active, the unread mark in the row's start padding, Mark as read on hover or focus, and the arrows moving from one thread's link to the next's; rows below 1024. The filter sits in the title's corner (on a phone, the row under it). The Needs you section is folded into the bar's count and the filter. The page is at most 1200 pixels wide, centred, the last message taking the table's spare width. The composer that starts a thread is docked at the page's foot; on a phone it waits until the title row's New (a plus and the word, named New thread) opens it, as the palette's New thread does (#new); a mouse at the same width keeps the composer.
  • A phone's tab bar (amended after the owner read the phone; "a phone" is the kit's phone variant, 48rem or narrower where any pointer is coarse, so a touch laptop or an iPad at that width, a mouse beside the finger, takes the phone's layout too): the five areas, each its glyph over its word, the current one raised as a chosen segment, open proposals counted, and the magnifier at the bar's end, pinned to the window's foot, its home indicator kept clear; it replaces the areas' row at the page's top. The magnifier turns the whole bar into the search: the palette, docked, its field where the bar was, what it finds above it, a Close beside the field; Close, Escape or following a result gives the bar back, and the focus to the magnifier; it sits on the on-screen keyboard, as the composer's dock does (--keyboard-inset), and closes if the window stops being a phone's. The current area is raised and set heavier, so it is told without colour, in forced colours too. With the keyboard up, or a thread being written on the Threads page, the bar gives way to the composer. A thread is a task of its own: on a phone it has no tab bar and no areas' row, its composer, strip and pinned approval hold the foot, and its way back is a chevron at the top bar's start (All threads). The top bar keeps what waits and the account, and its magnifier where the tab bar isn't.
  • A thread beside its artifact from 1100 pixels: the thread's latest inline artifact, and any approval waiting, sit in a pane of their own on the right, the approval's card, with Deny and Approve, floating in the pane's bottom corner; that artifact isn't drawn again in the log. Narrower, the thread is one column, and a waiting approval's card holds the window's foot (sticky) with the composer's dock in the flow under it, so Deny and Approve are never off screen or covered; approval-reach.test.tsx holds this from 320 to 1440 pixels. A phone's thumb bar still mirrors a question's Answer and Next; for a plain approval it gives way, as it always did to a card in view, since the card is now always in view.
  • A phone's composer (amended after the owner's model of a composer, 2026-10-28; it supersedes, on a phone, ADR-0085's toggle in the composer's row): the field, and one quiet footer beneath it: a round "+" at its start, the model's pill where the workspace offers more than one model, the agent's mode said beside it when it isn't the default ("Mode: Ask"), and the primary action at its end. "+" opens an Add sheet: Add files (the uploader's own checks), and Mode with its value and a chevron, whose view, behind a Back (Escape goes back first), is a radio group of Auto and Ask, each with its one line, the arrows choosing. The pill opens a Select model sheet: a radio group of the models the workspace allows, each with a line only where one is known for sure (the list carries no description: "The workspace's default", "Small and quick" for fast, "Thinks before it answers" for one that thinks first, and nothing otherwise); while a turn runs the choices are fixed, and the sheet says so ("Fixed for this turn"). Each sheet is the kit's dialog, a sheet on a phone, named, modal, closed by Close or Escape, giving the focus back to "+" or the pill; its Close is at its end, as every kit dialog's. A choice takes effect at once (the kit's ChoiceList, a radio group drawn as a question's options). While the thumb bar mirrors a question's Answer or Next and nothing is written, it stands where Send would, so the footer never has more than three controls; Send comes back with the first word. The pill appears once the composer has had the focus, as the models are read then (ADR-0086). On a desktop the composer keeps its row: Attach, the mode's toggle, the model's select and Send. The agent's modes are named Auto and Ask in the UI (were Edits and Proposes); the wire's edit and suggest are unchanged.
  • The turn's strip above the composer while the turn works, with Stop, in the composer's dock; while it waits on a question the strip stays above what it asks, where a phone's thumb bar answers it, so the dock keeps its quarter of a small phone's window (ADR-0082).
  • Full width. ADR-0029's width rule changes: a collection uses the window's width less the gutters (16, 24, then 32 pixels), not the page width; a reading page alone keeps the 760-pixel measure, centred; a thread beside its artifact takes the whole width, in two halves.
  • Session replay. A page that may be recorded marks itself as a direct child of main (no wrapping div any more), and every dialog is blocked: the drawer it excepted is gone, and the palette holds the workspace's titles.

And the polish review's follow-ups:

  1. The touch message actions' trigger, for a screen reader alone, shows once the keyboard reaches it (has-focus-visible:not-sr-only), never an invisible stop.
  2. Search gives the focus back on Escape, and "/" ignores Ctrl, ⌘ and Alt and an open dialog (above).
  3. styles.test.ts scans stylesheets and MDX as well as scripts, and finds a class beside a template's placeholder or in an @apply; a class behind a variant is another class, which Tailwind keeps, and isn't counted (fine:opacity-0 is built while opacity-0 is left out).
  4. A provider's error is said no firmer than its cause: "Nothing was lost" is gone, since what the turn did before it failed stays done; a timeout is the provider's only where the error doesn't name a tool.

Bytes

The app's initial ceiling isn't raised, and the first load is about 600 bytes under it: the rail's and drawer's classes, and those of the kit's parts only admin draws (its breadcrumbs, tabs, integration list, log list, trace view, tracker, error state and ANSI text), leave the app's stylesheet for rail.css (about 1,100 bytes), as do the rail's scroll padding and the drawer's safe areas; the threads' search, chip and Needs you section go, and PageHeader no longer imports Breadcrumbs. The palette is the one new add-on, palette, with a ceiling of 2,100 bytes (1,864 at the time).

Not done

  • On the smallest phones (320 pixels) a workspace's row on the tenant's home cuts its areas' words ("Thre…"); each link keeps its whole name, in its aria-label.
  • A phone's approval as tabs of thread and artifact, which mockup B drew, isn't in the decision.
  • The tenant's home has no search (it has no workspace stream to search).
  • A 55th glyph: the set's magnifier already serves.

Consequences

  • Every screenshot baseline with the frame moves; admin's do not.
  • The app's frame is simpler to test: no drawer, one bar.
  • Pull requests open at the same time that add ADR-0086 or touch the thread's page (#828) will meet this one in the queue.