Skip to content

feat(studio): add shadcn primitives from the prototype and upstream shadcn - #2211

Merged
kantord merged 2 commits into
mainfrom
feat/studio-shadcn-primitives
Oct 8, 2026
Merged

kantord merged 2 commits into
mainfrom
feat/studio-shadcn-primitives

Conversation

@peppescg

@peppescg peppescg commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Refs #2201

Summary

This PR adds the shadcn/ui primitives Studio lacked, so features can stop hand-rolling controls with native elements, <details> menus and ad-hoc ARIA. No feature call sites change here. Migrations follow per area, as listed in #2201.

Sources (OSS only, nothing from SEP):

Primitive Source Licence
label, checkbox, select, popover, tabs, toggle, toggle-group, command (cmdk), skeleton, avatar, input-search, input, sonner Toaster design prototype stacklok/mecatl-prototypes stack/08-tooling:apps/web/src/components/ui/ Apache-2.0
accordion, alert, radio-group, empty upstream shadcn/ui new-york-v4 (shadcn-ui/ui@0132174), used where the prototype has no equivalent MIT
  • Class strings are identical to the source. Only import paths, SPDX headers, Biome formatting and data-slot attributes differ.
  • Dependencies: exact-pinned Radix packages (label, checkbox, radio-group, select 2.3.8, popover, tabs, accordion, toggle, toggle-group, avatar), cmdk 1.1.1 and sonner 2.0.8. All new packages are MIT.
  • Toaster: a themed sonner Toaster is mounted once in main.tsx. It follows Studio's light/dark theme and has no visible effect until something calls toast().
  • input.tsx now matches the prototype: border-input, the ring-[3px] ring-ring/50 focus ring, and the aria-invalid, file and selection styles. Its border is lighter than Studio's old control-border, in both themes.

Licence and provenance audit

  • No Proprietary, "all rights reserved", SEP, or Next-only references appear in the diff.
  • Every new file is SPDX-License-Identifier: Apache-2.0 and traces to the prototype (Apache-2.0) or upstream shadcn (MIT).
  • No assets, illustrations, fonts or copy come from SEP.
  • pnpm licenses list --prod shows no new non-MIT packages.

Screenshots

Input (before | after)

settings profile
schedules form
chat dialog rename

Light and dark shots for all 7 surfaces are here.

Primitives (Studio vs prototype)

Studio Prototype
select
checkbox
tabs
popover
command
toggle-group
avatar
input-search
accordion (upstream shadcn) —
alert (upstream shadcn) —
radio-group (upstream shadcn) —
empty (upstream shadcn) —

Light and dark shots for every primitive are here.

Verification

Node 26.10.0, pnpm 12.4.2:

  • task studio:lint, task studio:typecheck, task studio:generated-check and task studio:audit pass; pnpm install --frozen-lockfile passes.
  • task studio:test: web 681 tests, server 182. Each primitive has a focused behavior test.
  • task studio:browser: 54 Playwright journeys.

Notes

  • Accordion open/close animations are inert, because Studio doesn't load tw-animate-css. The same is true in the prototype.
  • Toasts use sonner's default dark/light surfaces, like the prototype.

🤖 Generated with Claude Code

…hadcn

Studio lacked most shadcn/ui primitives, so features hand-rolled
controls with native elements, <details> menus and ad-hoc ARIA. Add the
missing primitives, each with a focused test:

- From the design prototype (stacklok/mecatl-prototypes, stack/08-tooling,
  Apache-2.0): label, checkbox, select, popover, tabs, toggle,
  toggle-group, command (cmdk), skeleton, avatar, input-search, and
  sonner with a themed Toaster mounted once at the app root.
- From upstream shadcn/ui new-york-v4 (MIT), for primitives the
  prototype lacks: accordion, alert, radio-group, empty.

input.tsx now matches the prototype (border-input and its focus ring).
No feature call sites change yet; migrations follow per area.

Refs #2201

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@kantord
kantord merged commit 5cecfab into main Oct 8, 2026
31 checks passed
@kantord
kantord deleted the feat/studio-shadcn-primitives branch October 8, 2026 17:21
peppescg added a commit that referenced this pull request Oct 9, 2026
#2211 replaced the input with the prototype's verbatim, which brought
the prototype's aria-invalid, file:, and selection: states but also
swapped Studio's border-control-border and solid ring-2 ring-ring focus
ring for the prototype's border-input and translucent 3px ring. Those
fall below 3:1 non-text contrast, which #1873 had fixed.

Keep the prototype's states and restore Studio's border and focus ring.
An invalid field focuses with a solid destructive ring rather than the
prototype's translucent one, for the same reason. Inputs look as they
did before #2211: a darker border at rest and a solid ring on focus.

Refs #2204

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 13, 2026
2 tasks
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.

2 participants