Skip to content

The interface stands on shadcn - #622

Merged
WaylandYang merged 71 commits into
devfrom
feat/the-interface-stands-on-shadcn
Sep 12, 2026
Merged

WaylandYang merged 71 commits into
devfrom
feat/the-interface-stands-on-shadcn

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor

The hand-written component layer becomes a thin shell over shadcn/ui (radix base,
nova preset). src/ui/index.tsx keeps our vocabulary — four button weights, two
sizes, the token set, the radius roles — and hands the looks to shadcn. Pages did
not learn a new API: they still call Button variant="ghost" size="sm".

React 18 → 19.3.0. Not optional. shadcn v4 components are plain function
components that take ref as a prop; under React 18 the ref is silently dropped,
which breaks every asChild trigger — menus that open on nothing, popovers with no
anchor. The upgrade is what makes the rest work.

What changed

  • Overlays: Dropdown, SearchSelect, Popover, DropdownMenu, Select, Command.
    The hand-rolled "panel grows out of its own pill" overlays are gone, along with
    their focus traps, outside-click layers and u-pop-in transitions. The user menu,
    alert bell, KB switcher, graph legend and ontology scope pills are all one anatomy now.
  • Docs typography moves from the Tailwind prose plugin to shadcn/typeset.
  • A status is a coloured dot and plain words (Status), not a filled pill.
    Chip stays for things that are not statuses: counts, base names, marks.
  • Every review card decides in the same corner. Seven card kinds had three
    different action placements and inconsistent button order. One rule now:
    CARD_ACTIONS — bottom-left, wrapping, destructive action last.
  • Filter bars are one row and one width across Members, Rules, Data mapping and
    My bases; the audit filter row no longer stacks.
  • A new base starts with its engines on (migration 0050). materialize_inferences
    and governance now default to on, with dated revisions to decision records 0002
    and 0025 explaining why the original reasons expired.

Two bugs the light theme was hiding

Both were latent and covered for each other, so neither showed until one was fixed.

  • hexToRgb only accepted six-digit hex, and Lightning CSS shortens #ffffff to
    #fff at build time. Every white token in the light theme silently read back as
    mid grey 128,128,128, which is why nodes on paper rendered as grey blobs. Dev
    builds do not minify, so only the bundle was affected.
  • flattenOnLight matched only the rgba(...) spelling, and the minifier writes
    rgba(176,120,20,0.6) as #b0781499. Sigma's edge shader blends additively
    without premultiplying, so an unflattened alpha is added to the paper: derived
    edges came out bright yellow. The grey fallback above had been masking it.

Both now go through one parser that takes #rgb, #rgba, #rrggbb and
#rrggbbaa, with regression tests for the exact spellings a minifier produces.

Validation

  • pnpm test: 28 passed. pnpm build: style guard, tsc --noEmit and vite build all pass.
  • cargo fmt --all --check and cargo clippy --workspace --all-targets: clean.
  • Driven by hand in the browser across both themes: graph, ontology, chat, library,
    review, data mapping, settings, account.

🤖 Generated with Claude Code

WaylandYang and others added 30 commits September 11, 2026 10:05
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
…uard

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
… only

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
WaylandYang and others added 27 commits September 11, 2026 18:59
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
This reverts commit 2d72d17.

Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
…nds-on-shadcn

Signed-off-by: WaylandYang <wayland0916@gmail.com>

# Conflicts:
#	web/src/pages/AlertBell.tsx
#	web/src/pages/Chat.tsx
#	web/src/pages/Docs.tsx
#	web/src/pages/Graph.tsx
#	web/src/pages/KbSwitcher.tsx
#	web/src/pages/OntologySchemaGraph.tsx
#	web/src/pages/UserMenu.tsx
#	web/src/pages/graphVisuals.test.ts
#	web/src/styles.css
#	web/src/ui/index.tsx
@WaylandYang
WaylandYang merged commit 71a6d18 into dev Sep 12, 2026
4 checks passed
@WaylandYang
WaylandYang deleted the feat/the-interface-stands-on-shadcn branch September 12, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant