Skip to content

Navigation: a bottom tab bar on the phone, the Runs page at / and the New run composer at /new

ADR-0025 made the runs rail the app's spine and opened the phone's version of it as a left drawer: a hamburger in a top strip, a left-edge swipe, a scrim, and (issue #140) a drawer that followed the finger. The composer was the home page at /. On a phone that meant every destination but the current page sat behind a gesture or a hamburger tap, the first screen after launch was an empty text box rather than the runs that might be waiting for you, and a run that needed input was visible only as a badge on the hamburger. ADR-0019 had rejected a bottom tab bar because it collided with the Chat's pinned composer; the Chat has since gained its own docked surface (ADR-0072), which makes the collision easy to avoid by leaving the bar off that one page.

The maintainer reviewed the navigation in a design session and approved direction A, revision 2 (issue #76; the mockup is docs/reference/tab-bar-mockup.html, whose toolbar and URL hash select each state, and screenshots of the built views at 390px and 1280px are in docs/reference/tab-bar-screenshots/). This ADR records what that supersedes, the route map and tab bar rules, and the decisions the build added where the issue was silent. It needed no server change: GET /api/v1/instances carries everything the Runs page shows.

The decisions, pinned:

  • The route map is the same at every width. / is the Runs page, the launch page. /history keeps its URL and is the Runs page's Ended view. /new is the New run composer (its content is ADR-0075's, unchanged). /more is the More page on the phone and redirects to /settings from 1024px, live, should the viewport grow while it is open. /runs redirects to / (it redirected to /history before), and /runs/:id is still the Chat. An unknown path lands on /. /repos…, /credentials, /tokens and /settings… are unchanged.

  • A bottom tab bar replaces the drawer below 1024px. Four tabs: Runs, New, Repos, More. It shows on every authenticated page except the Chat (/runs/:id) and the Schedule editor (/repos/:id/settings/schedules/new and …/schedules/:scheduleId), which are immersive and own their back control. The schedules section (/repos/:id/settings/schedules) is an ordinary settings page and keeps the bar. From 1024px the rail replaces the bar, as it replaced the drawer. /login and /setup never get the shell, so never get the bar.

  • The lit tab comes from the path prefix. / and /history light Runs; /new lights New; /repos… lights Repos; /credentials, /tokens, /settings… and /more light More. A sub-page keeps its section's tab lit; a path that belongs to no tab (the Chat) lights none. Tapping the lit tab goes to the section root and scrolls to the top; on the root it only scrolls. Modified clicks (Ctrl, Cmd, Shift, middle) are left to the browser. There is no per-tab navigation memory in this slice.

  • Two things carry badges, and only two. Runs shows the count of live runs in needs_input or question state, hidden at zero. More shows a dot for exactly one condition: the default agent provider is logged out (the provider a new run uses unless a repo or a per-spawn pick overrides it, and the only setup fault that silently breaks every new run). The count is read from the shell's single instances resource through a Solid context (ShellInstancesContext), never a second fetch: AppShell owns the one listInstances resource, refetched on run.changed and patched in place by run.messages.changed (issue #175's rule, unchanged), and the rail, the Runs page, the badge, the document title and the app badge all read it. The provider's login state refetches on provider.auth.changed. Both marks are mirrored in the tab's accessible name ("Runs, 2 need you", "More, provider logged out") and are aria-hidden themselves.

  • Anatomy. 49px plus env(safe-area-inset-bottom), four equal columns, a translucent --card with a blur and a 1px top border, a 24px icon over an 11px label, the lit tab in --link, and the New tab's icon drawn in an accent circle. The shell publishes the room the bar takes as --tabbar-space (0px unless the bar renders below 1024px); the content column pads by it, and everything fixed to the bottom of a tab-bar page sits at bottom: var(--tabbar-space, 0px) instead of 0: the toast, the repo settings save bar and the New run page's docked composer. The bar's layer sits above page content and below the toast, the schedule editor, sheets and dialogs.

  • The Runs page at /: live runs grouped by what needs you. Groups are Needs you, Working and Idle, in the rail's attention-first order (orderRail), each with its count, the Needs you count in the accent. On the phone a row is 56px: the state dot, the title with the "N behind" chip (issue #149), a second line repo · state phrase · AFK budget, and the age on the right. At 1024px and wider / is a table (Run, Repository, State, Model, Branch, Base, Last) in the same groups. A row opens the Chat and carries no destructive action; Stop stays in the Chat header and on the repo's Overview. The head holds a Live / Ended switch of two links, so each side keeps its own URL; on the phone it also holds the brand and the live dot, since the top strip that carried them is gone. The Live link carries the live run count.

  • History is the Ended view. /history keeps its URL, its ?repo= and ?outcome= filters and its Re-arm action, under the same head with Ended selected. Rows take the same shape as Live rows, grouped by the local day the run ended (Today, Yesterday, then dates), newest first. Each carries the outcome chip the run earned. Live runs are excluded (active is the Live side's, and is no filter option).

  • The desktop rail changes in two places only. Its ACTIVE list becomes the same grouped run list (labels, attention count), and a Runs link joins the section nav above Repos. Anatomy and widths, Ctrl/Cmd+B collapse and the footer are unchanged, and + New run now opens /new. The History link leaves the rail: History is the Runs page's Ended side, and the Runs link stays lit on both / and /history.

  • Attention outside the page. document.title reads (N) lab while N runs need you, so a backgrounded tab still reports it. The installed PWA's icon badge mirrors the same count through the Badging API where the platform has it (feature-detected, rejections swallowed, cleared on logout). The manifest's start_url is /, and its shortcuts are New run (/new) and Repos (/repos).

  • More is the phone's fourth tab. Rows: Credentials (hint: the provider's login state), Tokens (how many are active), Settings (today's category index, one level down) and Install app (only when the PWA is installable). Then the account block: username, the live dot and Log out, which moved here from the drawer. While the default provider is logged out an error banner with Reconnect (to /credentials) sits above the rows, and the Credentials row carries a logged out chip in place of its hint. From 1024px the rail holds all of it, so the route redirects to /settings.

  • Chat Back pops the in-app history, else goes to Runs. The Chat header is otherwise unchanged. Its back arrow goes back one entry when the app has one below the current entry, and otherwise to / (replacing the entry), so a chat opened cold from a deep link, a PWA shortcut or a notification never sends Back out of the app. "The app has one" is decided from @solidjs/router's history.state._depth stamp against the depth of the app's first entry, recorded once at boot: the router stamps a deep link opened in a tab that already has history at a depth above 0, so depth alone cannot say whether an entry is the app's own. So a chat opened from a repo's Overview goes back to that Overview.

  • Retired. The mobile top strip (brand, live dot, hamburger), the drawer, the scrim, the follow-finger drag (lib/drawerGesture.ts, issue #140) and the hamburger's attention badge. Nothing of them remains in the code; the brand and the live dot live in the Runs page head on the phone.

  • Decisions the build made where the issue was silent.

  • The outcome chip names the run's own outcome. The words are done, died, timed out, stopped and escalated, and a row's second line shows PR #n when the run has a pull number (the branch otherwise). The issue's sketch said "merged, PR open", but a run row carries no PR state, so those words would need an API change, which is out of scope. The chip keeps its outcome-<outcome> colour classes, and the outcome filter lists the same words.
  • A row's age is measured from started_at (live) or ended_at (ended). The issue asks for "last activity", and the API has no such field; a last-message time is the same API change. The Runs table's Last column is the same age. The age is compact ("now", "4m", "2h", "3d").
  • There is no version line on More. The issue lists one, but no API reports lab's version (it is only logged at startup), and the issue adds no API.
  • Rail rows drop the state phrase and the age. The 260px rail keeps the dot, the title, the "N behind" chip and the repo · AFK budget line, as the mockup's rail does; the state word rides the row's accessible name, because the dot is colour-only.
  • More's Install app row reuses the Settings gate. It shows when the Settings page's Install app card would, and reopens the same install sheet.
  • The New tab's page gets a "New run" header on the phone only. The desktop's centred column has none; the rail's + New run names it.
  • The Back floor lives in memory. See the consequences.

Status

Accepted 2026-10-09. Resolves issue #76, the GitHub issue.

  • ADR-0025: supersedes the drawer ("below that the SAME component as a left overlay drawer (hamburger + left-edge swipe to open; scrim / leftward swipe / Esc / route change to close)"), the hamburger's attention badge, and "/ is the New-run composer" with its place as the start page. The runs rail on desktop, its anatomy and attention-first ordering, the rule that rows carry no destructive action, the warm reskin and the Chat restyle stand. ADR-0025's consequence about the left-edge swipe being best-effort on iOS no longer applies, as the swipe is gone.
  • ADR-0019: supersedes the hamburger below 640px (already replaced by ADR-0025's drawer) and its rejection of a bottom tab bar, which rested on the Chat's pinned composer; the Chat shows no bar. The spacing scale, the 44px touch targets and the vendored icons stand.
  • ADR-0075: the New run page moves from / to /new; its content and behaviour are unchanged, and the "(/)" in its title is now /new. The phone gets a page header, and the docked composer sits above the tab bar. That ADR is not rewritten.
  • ADR-0072: unchanged. The Chat dock owns the bottom edge because the tab bar is not there.
  • ADR-0073: unchanged. The repo home and Repositories keep their routes; the Repos tab lands on /repos.

Amended by issue #97 (2026-10-10, ADR-0083): the anatomy gains the keyboard case. On New run only, while the on-screen keyboard is open, the shell carries .tabbar-out. The bar slides down out of view (200ms ease-out, instant under reduced motion) but stays mounted, and --tabbar-space collapses to 0px. "Keyboard open" is read from the visual viewport shrinking more than 120px below its per-width baseline, never from focus. tabBarHidden is still the one route rule, and tabBarSlidesOut only moves a bar that exists. Every other tab-bar page keeps the bar while typing. The New run page's docked composer no longer sits at bottom: var(--tabbar-space, 0px). The page is bounded and subtracts --tabbar-space from its height instead, and its AFK toast is anchored to the page. The toast elsewhere and the repo settings save bar still sit at bottom: var(--tabbar-space, 0px).

The user-facing docs follow in the same change (the update-docs skill).

Considered options

  • Keep the drawer and add a Runs home. Rejected by the design session: the first screen would fix, but every other destination would stay behind a hamburger, and a run needing input would still show as a badge on a control, not as a row one tap away.
  • A bottom tab bar on every page, the Chat included. Rejected: the Chat's docked composer, status line and question panel own the bottom edge (ADR-0072), and ADR-0019 had rejected the bar for exactly that collision. The Chat and the Schedule editor are immersive and carry their own back control.
  • A fifth tab for History, or for Credentials and Tokens. Rejected: five tabs crowd a 390px bar, and History is the Ended side of the Runs page, so it needs a switch, not a destination. Credentials, Tokens and Settings sit behind More.
  • Per-tab navigation memory (each tab restoring the page it was last on). Out of scope for this slice; a re-tap on the lit tab returns to the section root.
  • Show the outcome as "merged" or "PR open". Rejected for now: it needs the run row to carry PR state, which is an API change. A later change that adds it can swap the words.
  • Add a last-activity field for the row age. Rejected for now for the same reason; the age from started_at or ended_at is honest about what the API knows.
  • Persist the Back floor in sessionStorage. Rejected: after a reload deep in the app, Back would pop correctly, but when the same tab later re-enters lab by a fresh navigation a stale floor could pop the user out to another site. Falling back to / errs toward staying in the app.
  • A separate /runs route for the Runs table on desktop. Rejected: the same page at / serves every width, with a table where the width allows it, so the launch URL and the PWA start_url are the same everywhere.

Consequences

  • The phone launches into the runs, with the ones that need you first. Every top-level destination is one visible tap away from every tab page, and no gesture is needed or lost. At 390px nothing overflows.
  • Every consumer of the instance list reads one resource: a page that fetches GET /api/v1/instances itself is a regression against this ADR. The Runs badge, (N) lab, the app badge and the rail all agree because they are one number.
  • A reload deep in the app makes the reloaded entry the new Back floor, so Back from a Chat after a reload goes to / instead of popping. This is a known limit, accepted for the reason above.
  • Anything fixed to the bottom of a page below 1024px must sit at bottom: var(--tabbar-space, 0px) or it will be covered by the bar; pages that are immersive must be added to tabBarHidden (web/src/lib/tabBar.ts), the one place the rule lives.
  • Bookmarks and notification links to / now land on Runs, not the composer; the composer is /new, and /runs redirects to /. The Playwright smoke, which asserted the composer's zero-repositories empty state on / and Log out in the rail, follows the new routes: the empty state is on /new, and on the phone Log out is on More.
  • The README's start screenshot (docs/assets/start.png) now shows the Runs page, and the retired drawer's side-menu screenshot is replaced by the New run page (docs/assets/new-run.png), both from the 390px shots in docs/reference/tab-bar-screenshots/.
  • The route map, the pure tab rules (web/src/lib/tabBar.ts), the grouping and wording helpers (web/src/lib/runGroups.ts) and the Back floor (web/src/lib/navHistory.ts) are covered by unit tests; the tab bar, Runs, History, More and the shell by component tests.