0028: A labeled rail beside a site's pages

On this page

Status: accepted

Context

A site's work was spread over the app: its settings and processes in an expanding row on Sites, its requests, dumps, mail and logs on screens that each needed the site picked again. Adding terminals, tasks and an overview per site made that worse, and people keep around a hundred sites, so anything that lists sites in the navigation itself can't hold them. The Design canvas tried three shapes: a rail of site tiles, one sidebar that turns into a site's pages, and a rail of sections with a second column for a site.

Decision

  • A labeled rail of sections replaces the sidebar: each icon with its name under it (shell/NavRail.tsx). Inside a site, Sites stays current.
  • Opening a site adds a column of its pages (shell/SiteNav.tsx): Overview, Processes, Terminals, Tasks, then Requests, Dumps, Mail and Logs for that site, then Site settings. Routes are #/site/<name>/<page>?… (route.ts); every earlier route still reads the same.
  • Requests, Dumps, Mail and Logs inside a site are the same screens with a site prop: the site is a removable pill, and their filters stay. Processes reuses the existing processes list. Nothing is forked per site.
  • The column's header is the site switcher (pinned, running and recent sites, and search across all of them; Cmd+O anywhere). Go to (Cmd+K) finds sites, pages and actions. Pins live in preferences.pinnedSites; recent sites in the window's storage.
  • The Sites list opens a site instead of expanding a row, and draws only the rows in view (ADR 0025).
  • The notification bell sits in the power rail beside the running count; notifications themselves come from leashd (ADR 0027), and terminals live there too (ADR 0026).

Consequences

  • Every section is one click away from inside a site, and a site's pages are one click from each other, at the cost of a second column (228 px, 184 px below 860 px) beside the rail. Under 640 px the rail becomes a strip and the site's pages wrap under it.
  • Navigation no longer scales with the number of sites: the switcher and Go to search them, and only the rows in view are drawn.
  • A site's settings moved from its row on Sites to its Site settings page; docs that said "in the site's row" now name the page.
  • The rail of site tiles was dropped (it can't hold a hundred sites), and so was one sidebar that changes meaning inside a site (it hides the other sections there).