Skip to main content

0020 — Portal content card

Status: Accepted · Date: 2026-11-25

Context​

The portal's desktop shell drew the sidebar as a floating rounded card (surface="card" on the shared @enode/ui Sidebar, a 16 px gutter, and rounded-[25px] border bg-surface-base shadow-sidebar on the nav content). The main content sat flush on --background, with no edge of its own.

That framed the navigation rather than the work. Coaches spend their time in the content (tables, charts, drawers), and the content panels inside it already use a card language (LOOK.panel), so the page read as loose cards next to a framed menu.

Decision​

On desktop (≥ 1024 px) the shell is inverted: the sidebar is flush chrome and the main content column is the card.

  • Window colour: the shell row paints --surface-base (lg:bg-surface-base in app-shell.tsx). No new token.
  • Sidebar: surface="bare" on the shared Sidebar (packages/ui/src/sidebar.tsx): a transparent column with no divider, no gutter and no shadow. Its width is 240 px, the old card's inner width, so the nav content keeps its size. The nav content (components/sidebar.tsx) has no card classes of its own.
  • Content card: <main id={SHELL_MAIN_ID}> is bg-background with lg:rounded-2xl lg:border lg:border-surface-stroke. It is flat, border only, per 0005, and uses the same 16 px corner as LOOK.panel.
  • Gutter: 8 px on top, right and bottom, and on the left too while the sidebar is collapsed, so the card never touches the window edge.
  • Below 1024 px: unchanged in effect. The content is full-bleed on --background, and the sidebar is the overlay drawer. "bare" renders its overlay like "flush" (a surface and a right border), since a drawer over the page needs a surface of its own.
  • Drawers (session, user and action drawers, slide-overs) stay full window height from the window edge. They are overlays above the card, not part of it. The session drawer still starts at <main>'s left edge, which is now the card's edge.

Consequences​

  • Every page gets the card with no per-page change, because all pages render inside the one <main> (0004), including the planner and performance pages that don't use PageShell.
  • The card must never get a transform, filter or backdrop-filter. Any of those makes it the containing block of fixed descendants. The live displays (present-mode.tsx, display-waiting.tsx, wall-result.tsx) and the drawers rendered inside <main> would then be trapped in the card instead of covering the window.
  • The Insights chart focus (insights-chart-focus.tsx) mounts absolute inset-0 inside <main>, so it fills the card and takes its rounded corners.
  • The floating "open navigation" fallback (for pages without PageShell) moved inside <main>, so it sits on the card rather than on the gutter.
  • The tracking app is unaffected: only the portal uses the shared Sidebar, and "card" / "flush" keep their meaning.
  • Not part of this decision: a team switcher, a breadcrumb header bar with the notification bell, a plain search row and a tinted active nav item. They were seen in the reference and left out on purpose. The portal's nav keeps its wordmark, boxed search field and footer bell.