Navigation & layout
The page-scaffolding primitives. PageHeader, Eyebrow, Breadcrumbs, and Divider are
presentational (render server-side). Tabs and Pagination are interactive islands. Astro layout
twins are also exported at @repo/ui/PageHeader.astro, @repo/ui/PageShell.astro, and
@repo/ui/Logo.
PageHeader
Section titled βPageHeaderβInbox
Order intake
Triage incoming purchase orders and route them for review.
import { PageHeader } from '@repo/ui/nav';
<PageHeader eyebrow="Inbox" title="Order intake" description="β¦" actions={<Button>New</Button>} />Orange Eyebrow, ink title, muted description, optional right-aligned actions. Use Eyebrow
on its own for the all-caps tracked label anywhere.
Breadcrumbs
Section titled βBreadcrumbsβitems: { label, href? }[] β the last is the current page (aria-current="page"); earlier items
link.
Tabs & Pagination
Section titled βTabs & Paginationβ12 orders in progress.
Tabsβtabs: { id, label, content }[], controlled (value) or uncontrolled (defaultValue). Radix-backed: roving tabindex, arrow-key nav, ARIA tablist/tab/tabpanel. Active tab carries the orange underline.Paginationβpage,totalPages,onPageChange,siblingCount?. Ellipsis gaps, disabled ends,aria-currenton the active page.
AppShell & RailNav
Section titled βAppShell & RailNavβThe cockpit frame: a dark RailNav (icon strip, tooltips when collapsed, orange active state) on
the left, a bright workspace on the right via AppShell. Click a rail icon to switch.
import { AppShell, RailNav } from '@repo/ui/nav';
<AppShell sidebar={ <RailNav activeId={route} logo={<Logo/>} footer={<UserMenu/>} items={[ { id: 'inbox', label: 'Inbox', href: '/inbox', icon: <InboxIcon className="h-5 w-5" /> }, ]} />}> {pageContent}</AppShell>RailNav is always a dark surface; pass expanded to show labels (224px) instead of the 56px
icon strip. Icon-only items get an aria-label + a Tooltip.
How apps/webapp Wires AppShell, CockpitShell, and the 3-Pane Surfaces
Section titled βHow apps/webapp Wires AppShell, CockpitShell, and the 3-Pane SurfacesβIn apps/webapp, the legacy Sidebar.astro and unified_shell_v2 feature flag have been retired. Every authenticated route renders inside ShellFrame.astro (apps/webapp/src/components/layout/ShellFrame.astro), which mounts the dark 56px AppRail.astro (RailNav.tsx wrapping @repo/uiβs RailNav, seeded from Astro.locals with capability-gated and Flagsmith-gated items plus the account/org switcher) on the left and the workspace <slot /> on the right:
- Standard Scrollable Pages (
Layout.astroβcomponents/navigation/AppShell.astro):- Uses
<ShellFrame scroll="auto">(<main id="main-content" class="flex-1 overflow-y-auto bg-[var(--om-bg)]">) plusToastContainer,HelpDrawer,NotificationsDrawer, and theβKCommandPalette. - Used by
/settings,/customers,/analytics,/team,/admin/*, etc.
- Uses
- Full-Bleed 3-Pane Cockpit Pages (
CockpitShell.astro):- Uses
<ShellFrame scroll="hidden">(<main id="main-content" class="flex flex-1 flex-col overflow-hidden bg-[var(--om-bg)]">) with AstroClientRoutersoft navigation and independent per-pane scrolling:- Unified Inbox (
/inboxβInboxCockpit.tsx):- Left Rail (
56px):AppRail.astro/RailNav.tsx - Center Queue List Pane: Virtualized/paginated
CockpitRowlist with queue tabs (Mine,Available,Branch), lifecycle views (active | archived | deleted), status filters (needs_review,needs_fix,processing,ready,failed), bulk actions, and Superhuman-style keyboard navigation (j/k,e,Enter,/). - Right Detail & Preview Pane (
CockpitDetail.tsx+CockpitItemPreview.tsx): Inline PDF/spreadsheet/email preview, PO metadata,AuroraRoutingCard, and state-awareSubmitButton/ βFull reviewβ action.
- Left Rail (
- Order Review Workbench (
/orders/pdf/[documentId]/reviewβReviewResponsiveBody.tsx):- Desktop (
>= 768px) renders a 3-pane CSS Grid (grid-template-columns: 280px minmax(320px, 1fr) minmax(0, 1.5fr)) aboveReadinessFooter.tsx(auto 1fr autogrid; phones< 768pxswitch panes viaReviewMobileTabs):
- Pane 1 (
280pxleft) βReviewIssuesRail.tsx: Order header metadata, customer & ship-to resolution cards,PoNumberInput/PoHistoryStrip, and the prioritized issue/revision list (Needs attention,Changes,Unchanged). - Pane 2 (
minmax(320px, 1fr)center) βReviewCenterPane.tsx+RevisionPanel.tsx: Line-item table,MismatchDecisionCard,LineOverrideEditor,DiscountMatchPanel,QuoteSplitPanel, andERPSearchModal. - Pane 3 (
minmax(0, 1.5fr)right) βReviewDocViewer.tsx: Synchronized source document viewer (PDFViewerWithHighlightswith bounding-box highlights,SpreadsheetFullView,CSVPreview,ImageViewerWithHighlights,EmailPreview,TextPreview,AudioPreview).
- Desktop (
- Unified Inbox (
- Uses
Divider
Section titled βDividerβAbove
Below
orientation (horizontal|vertical), decorative (default true). On Radix Separator.
Accessibility
Section titled βAccessibilityβ- Breadcrumbs/Pagination are landmark
navs with labels; Tabs uses the full ARIA tab pattern via Radix. Verified withjest-axe; the pagination ellipsis algorithm is unit-tested.