Skip to content

RFC-007 — Atlas UI primitives seam

Atlas keeps src/primitives/ as the only place that may import @radix-ui/* and @base-ui/*. @alexbayerl/djed-ui-primitives may be imported only from files under src/primitives/ — including src/primitives/index.ts (barrel re-export) and thin adapters (Form, Tooltip, Tabs, etc.).

All feature code (surfaces/, shell/, components/, entities/) imports @/primitives only, never the Djéd package path directly. This is enforced by lint:import-boundary in the UI package.json.

  • One Radix/Base seam preserves WAI-ARIA and focus behaviour without scattering headless imports.
  • Djéd ui-primitives is the source for Dialog, Form, and shared layout/widgets; Atlas adds Combobox (Base UI) and Overlay (modal/drawer/bottom-sheet) where the product needs cell-specific behaviour.
  • Token bridge: global.css maps Djéd semantic colours (--color-surface, etc.) to Atlas tier-2 tokens so Djéd components match the celestial theme.
  • Legacy compound Dialog.Content / Dialog.Footer (Atlas-only) was replaced by Djéd Dialog + DialogHeader + DialogTitle + DialogDescription + DialogFooter.
  • components/brand/Tooltip was removed; Tooltip / TooltipProvider are re-exported from primitives (wrapper + Djéd).
  • npm run lint:import-boundary — must pass in CI.
  • RFC supersedes ad-hoc decisions documented only in inline comments.
  • lib/djedUiPrimitives.ts removed — the former side-door re-export is folded into src/primitives/ (index.ts, adapters, NativeSelect).
  • Workbench shell — direct @alexbayerl/djed-workbench-shell imports are forbidden outside lib/djedWorkbenchShell.ts (ESLint no-restricted-imports).
  • Command palette “Recent” — Atlas uses RegisterCommandPaletteRecents and pushRecentStringToLocalStorage from @alexbayerl/djed-app-shell with a cell-specific storage key.