chore(ui): re-sync UI components with the @nebari registry - #22
Merged
Conversation
Issue nebari-dev/nebari-design#143 calls out the `ui` alias drift in this repo: components.json pointed `ui` at `@/ui`, so registry components lived in src/ui/ instead of the conventional src/components/ui/. Move them, point the alias at `@/components/ui`, and rewrite every import. Also give the solution-style tsconfig.json the `@/*` path mapping, since `shadcn add` reads aliases from it and otherwise writes files to a literal `@/` directory. While here, separate app-owned code from registry-owned files so the registry files can be byte-identical: - avatar.tsx is not a registry item (there is no @nebari/avatar); move it to src/components/avatar.tsx. - copyText() lived in src/lib/utils.ts on top of the registry cn() helper; move it to src/lib/clipboard.ts. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Re-add every installed registry item with `shadcn add --overwrite` so the files match the published @Nebari registry: alert, badge, button, card, checkbox, code-block, dialog, dropdown-menu, field, input, label, navigation-menu, radio-group, select, slider, spinner, switch, table, tabs, textarea, toast, tooltip, utils and use-theme-preference. Install the @nebari/claude-skill so .claude/skills/nebari-ui/SKILL.md ships with the frontend. The registry toast no longer wraps the Base UI manager in success()/error() helpers; it exports the manager itself, with priority derived from the toast type. Update every caller to `toast.add({ type, title, description })`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Bring src/index.css up to date with the registry theme: the canvas → header → card/popover → muted surface stack (`--canvas`, `--header`), the `--info` feedback pair, the zinc-975 primitive, the skeleton pulse animation and the registry's current dark popover/muted values. The file is rebuilt from the registry globals.css with only two documented departures: the branding-driven derivations of --primary-hover and the sidebar tokens (guarded by tests/lib/index-css.test.ts), and the app-defined header tokens from the nebari-ui skill's header token contract (--header-border, --header-action-hover, --notification-badge, --sign-out-foreground). The header now paints with `bg-header` and the page body with `bg-canvas`. The public branding keys `headerBackground` / `bodyBackground` keep their names and are mapped onto `--header` / `--canvas` in lib/branding.ts, so existing /config.json overrides keep working. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Sep 4, 2026
jbouder
added a commit
that referenced
this pull request
Sep 4, 2026
The body used `bg-background`, which the @Nebari theme now resolves to zinc-50 (the header layer), so the page rendered light gray. The registry's page layer is `--canvas` (white in light, zinc-975 in dark), and the skill documents `--background` as a legacy alias to avoid for page shells. Follow-up to #22 / nebari-dev/nebari-design#143. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-syncs
ui/with the published @nebari registry as part of the cross-repo audit.Part of nebari-dev/nebari-design#143
Closes #21
What changed
Alias drift (
chore(ui): move components to the src/components/ui alias)components.jsonuialias@/ui→@/components/ui;src/ui/moved tosrc/components/ui/and every import rewritten (tests included).tsconfig.jsongains the@/*path mapping.shadcn addreads aliases from it and, without the mapping, wrote the installed files to a literal@/directory instead ofsrc/.avatar.tsxis not a registry item (there is no@nebari/avatar), so it moved out ofcomponents/ui/to the app-ownedsrc/components/avatar.tsx.copyText()was appended to the registry'ssrc/lib/utils.ts; it now lives insrc/lib/clipboard.tssoutils.tsis registry-identical.Registry re-sync (
chore(ui): re-sync @nebari registry components)--overwrite: alert, badge, button, card, checkbox, code-block, dialog, dropdown-menu, field, input, label, navigation-menu, radio-group, select, slider, spinner, switch, table, tabs, textarea, toast, tooltip, utils, use-theme-preference (hook + theme provider).@nebari/claude-skill→ui/.claude/skills/nebari-ui/SKILL.md.toast.success()/toast.error()wrappers; all 20 call sites now usetoast.add({ type, title, description }).Theme (
chore(ui): adopt the @nebari/theme surface tokens)src/index.cssis rebuilt from the registryglobals.css: adds--canvas/--headersurface tokens, the--infopair,--zinc-975,--duration-loadingand the skeleton pulse animation, and takes the registry's current dark--popover/--mutedvalues.--primary-hoverand the sidebar tokens (guarded bytests/lib/index-css.test.ts), and the skill's app-defined header tokens (--header-border,--header-action-hover,--notification-badge,--sign-out-foreground) with their@theme inlinemappings.bg-header text-header-foreground; the page body withbg-canvas.--header-borderdefaults tovar(--border)so the bar renders as the canonicalborder-borderwhile theheaderBorderbranding override still works./config.jsonkeysheaderBackground/bodyBackgroundkeep their names and are mapped to--header/--canvasinlib/branding.ts, so existing operator branding keeps working. Chart values and docs are unchanged.Verification
Every registry-owned file was compared byte-for-byte against
registry/nebari/at the time of the sync:lib/utils.ts,hooks/use-theme-preference.ts,hooks/theme-provider.tsx,.claude/skills/nebari-ui/SKILL.md.@/ui/…→@/components/ui/…): button, dialog, dropdown-menu, navigation-menu, toast.Gates:
npm run build(tsc -b + vite) passes;npm testpasses (5 files, 51 tests).Note for future syncs: any
shadcn addof a@nebariitem also re-applies thethemeitem, which appends flattened tokens intosrc/index.cssand duplicates the keyframes inside@theme inline. Revertsrc/index.cssafter adding components and merge theme changes by hand (orgit checkout src/index.css).#143 checklist for this repo
components.jsondeclares the@nebariregistry andstyle: base-vegauialias points at@/components/ui; components live insrc/components/ui/--overwriteand verified against the registry@nebari/utilsis unmodified (app helpers live outside it)@nebari/use-theme-preferenceinstalled and used for theme state@nebari/claude-skillinstalled at the frontend root@nebari/themetokens adopted (--canvas,--header,--info, …), with app departures documented in the file headercomponents/ui/(avatar moved tosrc/components/)components/ui/(the onlyrgba(...)is the theme picker'sdata-checkedshadow, verbatim from the skill's header recipe)h-14 pl-4,h-8 w-autologo witharia-label="Go to homepage",MenuBarActions gap-2,DropdownMenu modal={false}, 248px profile menu,menuitemradiotheme picker wired touseTheme,text-sign-out-foregroundsign-out). No follow-up issue needed.@base-ui/reactat^1.7.0(satisfies the registry's^1.6.0; unchanged)🤖 Generated with Claude Code