Shell nav
To build in the appThe app shell's sidebar, built from the handoff bundle's sidebar tree mock (page-layouts/mock/index-tree.html), which supersedes the catalog's rt-shell-nav.js (conflict 2). One tree, three renderings by width, driven by the width rather than a default: expanded, a 220px column with labels, from 1440 (it was 1920 until 2026-10-05: a laptop is where the app is used, and the labels are worth more than a list's last columns); the 56px icon rail from lg to 1439, as the same column, its areas opening Popover flyouts; and below lg (1024) a drawer over a backdrop. The band's handle overrides the width until the window crosses the threshold again, and the expanded/rail switch is a matchMedia listener in AppShell, not a CSS breakpoint (the two states are different markup). From lg the sidebar is not in a container (2026-10-01): it sits directly on the stone-100 backdrop with no fill, hairline or radius, so it reads as furniture and the page card is the only card on screen; the drawer takes its own surface-muted surface back, because an overlay has to be a surface to be legible. Resting rows are stone-600, not stone-light (2026-10-06): #78716C measures 4.40:1 on the backdrop, under AA. The tree fades into the backdrop above the account footer rather than stopping at a rule. It carries no handle of its own since 2026-10-05: the App band's one handle collapses the column from lg and opens the drawer below it, and the column's width animates 220 ⇄ 56 over 200ms while the two renderings crossfade, both pinned to its left edge so neither reflows. What stays in the sidebar is the drawer's close, because below lg the backdrop covers the band. Below lg there is no header bar of its own either (2026-10-07): the brand sits in a 48px logo bar at the top of the page that scrolls away, and the App band is pinned under it. It opens with the brand lockup (the round mark plus the wordmark, mark only on the rail). The accordion opens one area at a time; Home and Reports are pages; Workflows are pinned to the foot of the tree as quick actions, and the footer's account menu rounds it out. Takeover levels (2026-10-02): a Settings or entity level (NavLevel) replaces the tree from lg with a Back link (navy, semibold and underlined like the Overview's links since 2026-10-28, the one coloured row, so the way out is easy to find), the level's name and its sections, each its own page, URL and save; a level forces the sidebar expanded, so the rail never shows one. Below lg there are no slide-outs (2026-10-07): the drawer keeps the global tree and the page carries the level's sections as a select list under its header (SettingsPageHeader's SectionPicker, optgroups for the level's groups); level_in_drawer restores the 2026-10-02 drawer. Respellings from the mock: px and rem values are Tailwind steps; stone-500 → stone-light (now stone-600 for resting rows, above); gray-200 → stone-200; 10px / 9px / 8px text → text-ui-xs; brand font-bold → font-semibold; the mock's box-shadow is shadow-xs here, tw-shadow-sm in the app; its single --area hex is the text-{area}-deep tokens through a static map; rt-shell-nav's md: breakpoint is lg: (conflict 10), its Quick Create menu is dropped for the mock's Workflows group, and its sidebar icon is the band's handle (conflict 15), the real FA7 glyph since the kit landed on 2026-10-05. Watch for the slash opacities (bg-white/50, bg-white/60, bg-stone-dark/40) and lg:w-[220px] when translating. The logo files are plain <img> tags on /logos/rt-icon.png and /logos/rt-wordmark.svg, so they become image_tag.
App: shell-nav (Stimulus: class_toggle for the drawer and accordion, popover for the rail flyouts)
Expanded sidebar
#expandedInvoicing › Transactions is the visited page: Invoicing is open, Transactions is the current row — a white card with a shadow, in invoicing-deep. The frame repeats AppShell's workspace frame (2026-10-01): the sidebar sits directly on the stone-100 backdrop with no fill, hairline or radius; the 48px App band above the page holds the handle, the trail and the utilities; and the page is the only card, white with a 1px stone-300 hairline, inset 6px from the right and bottom. The tree fades into the backdrop above the account footer rather than stopping at a rule. Below 1024 the sidebar is a fixed drawer opened from the band's handle, which escapes this frame and covers the viewport, as it does the real page.
Another area open, account menu open
#sales-openThe accordion opens one area at a time: Sales is open while the visited page (Invoicing › Transactions) stays folded. The user button has expanded the account menu above it; Sign out is last.
Collapsed rail
#collapsedcollapsed swaps the sidebar for the 56px icon rail (1024 and up only; the shell shows it from lg to 1439 and expands from 1440). Invoicing is current. Click Invoicing to open its flyout: the button takes a mustard ring while the Popover is open, and Transactions is washed warm with a rust check. The brand mark drops its wordmark. The rail has no handle of its own: since 2026-10-05 the one handle is the band's, at the left of the strip — click it to expand, and the column's width animates 56 ⇄ 220 over 200ms while the tree and the rail crossfade, both pinned to the left edge so nothing reflows.
Home active
#homeactive="dashboard" marks the Home row (stone-dark, not an area colour). Every area starts closed.
Controlled collapse
#togglecollapsed is driven entirely from outside: the nav renders the state and never sets it, because the handle lives in the App band. Press the band's handle and watch the value above the frame and the column's width change together. Below 1024 the same handle opens the drawer instead, whose own close stays in the sidebar because the backdrop covers the band.
Takeover level: Invoicing Settings
#levelA level (NavLevel, rendered since 2026-10-02) replaces the tree from lg with a Back link, the level's name and its sections, grouped (Payments, Tax); each section is its own page, URL and save. A level forces the sidebar expanded, so the rail never shows one, and the band's handle stays where it is, dimmed, with a tooltip saying why (P8). Below 1024 there are no slide-outs (2026-10-07): the drawer keeps the global tree, and the page carries the sections as a select list under its header (level_in_drawer restores the old drawer).
Optional items shown
#optionalshow_optional reveals the pages and items flagged optional in the data (Deals, Price Levels, Locations, RoasterPay), the mock's ?opt=1.
Props
| Name | Type | Default | Notes |
|---|---|---|---|
| active | dashboard | sales | inventory | production | invoicing | reports | account | — | Required (ShellNavActive). The area the visited page belongs to; dashboard marks the Home row (NavAreaKey home), account lights the footer's account menu rather than a tree row. reports and account are additions to the canon's five (the mock's tree has a Reports page and an account menu) |
| active_page | string | — | Key of the current page inside the active area (children[].key, or account_items[].key for account). Without it an active area lights its header row |
| level | NavLevel | — | A takeover level (Settings, a customer, an integration): { key, back, crumb, ident?, form?, groups: { label?, items: NavPage[] }[] }. Its sections replace the tree from lg, with a Back link out; passing one forces the sidebar expanded. A section can carry a tag (NavPage tag, 2026-10-28): a neutral Badge after its label, "Later" for a planned section, and a tagged label wraps rather than push the tag out of the 220px column; the narrow-screen select appends it in brackets. A section sold as part of a plan or as an add-on (NavPage entitlement, keyed into the entitlements prop) ends on a gem or a puzzle piece, whether or not the account has it. Mock data: NAV_LEVELS |
| entitlements | Record<string, Entitlement> | — | What the account's plan includes, by key (2026-10-28): a level section with an entitlement ends on a gem (plan feature) or a puzzle piece (add-on). Mock: the Plan preview panel's state |
| level_href | string | — | The current pathname, so the level marks the section you are on |
| level_back_href | string | "/" | Where the level's Back link goes (the area it belongs to) |
| level_in_drawer | boolean | false | Below lg, whether the drawer carries the level. False since 2026-10-07 (no slide-outs: the page's select list carries the sections); true is the 2026-10-02 behaviour |
| collapsed | boolean | — | lg and up only: swaps the sidebar for the icon rail. Read-only in the nav since 2026-10-05 — the App band's handle drives it; omitted, the sidebar stays expanded. A level overrides it |
| drawer_open | boolean | — | Below lg: the drawer's open state. Controlled so the band's handle can open it; internal state when omitted |
| onDrawerOpenChange | (open: boolean) => void | — | Fired by the drawer's close, its backdrop and a navigation inside it |
| user_initials | string | — | Required. Avatar text |
| user_name | string | — | Required |
| user_email | string | — | Second line of the account menu header; the footer row shows account_name |
| account_name | string | — | Required |
| areas | NavArea[] | — | Required. { key: home | sales | inventory | production | invoicing | reports, label, icon, href?, children?: NavPage[] }. A row without children is a page link; NavPage is { key, label, href?, optional?, level? }. Mock data: NAV_AREAS |
| workflows | NavItem[] | — | Required. { key, label, icon?, href?, optional? }, listed under the Workflows label and as rail icons. Mock data: NAV_WORKFLOWS |
| account_items | NavItem[] | — | Required. The footer's account menu and the rail's Account flyout; Sign out last. Mock data: NAV_ACCOUNT |
| setup_steps | OnboardingStep[] | — | Onboarding::Checklist#steps. Given, the SetupGuide sits above the account row (above the avatar on the rail); omitted, nothing renders — account.show_onboarding false |
| onSetupDismiss | () => void | — | Mock behaviour: patches account.show_onboarding; AppShell hides the guide and offers Undo |
| brand | string | RoasterTools | |
| show_optional | boolean | false | Shows pages and items flagged optional (the mock's ?opt=1: Deals, Price Levels, Locations, RoasterPay) |
| default_open_area | NavAreaKey | null | the active area | Initial accordion state; null starts closed. A Stimulus value in the app |
| default_account_open | boolean | false | Initial state of the footer's account menu |
| className | string | — | Extra classes on the sidebar and the rail |