Repository navigation
Description
Parent: #1774. Design review: #1779.
Status (2026-10-14)
Primitives: done. Every primitive in scope item 1 now exists in apps/web/src/components/ui/:
- Label, Checkbox, RadioGroup, Popover, Tabs, Accordion, Toggle/ToggleGroup, Command (cmdk), Skeleton, Alert, Avatar, Empty, InputSearch, Select and sonner, from feat(studio): add shadcn primitives from the prototype and upstream shadcn #2211;
- ScrollArea and Separator, from feat(studio): add the @/ alias and port the prototype's foundation primitives and utilities #2225.
Global search runs on cmdk (#2228), and Badge ink matches the prototype (#2212). The native checkboxes, the native radios and the schedule-form selects are gone.
Remaining call sites (scope item 2):
- Native
<select>inchat/chat-composer.tsx(the Execution picker from feat: add execution templates with platform-managed identity #2219) → Select. On hold: whether and how the Execution control is shown is being redesigned (whether to show it at all, and plain-language copy), so it isn't swapped until that's decided. - Native
<select>insettings/settings-workspace.tsx(the phone section picker). Studio settings: replace the phone section select with the prototype's section index #2261 removes it. -
<details>inmemory/consolidate-memory-card.tsx→ Accordion/Collapsible. refactor(studio): move the last two hand-rolled disclosures to Collapsible #2367 - Hand-rolled
role="tablist"inchat/delegation-panel.tsx→ Tabs. refactor(studio): use the Tabs and Toggle primitives in two hand-rolled controls #2334 -
aria-pressedtoggles → Toggle/ToggleGroup. There are 8 in 6 files:chat-composer,composer-options-sheet,content-preview-panel,delegation-panel,model-effort-menuandside-thread-panel.side-thread-panelwaits for Large batch of tiny follow-up fixes #2303.content-preview-panelanddelegation-panelare done in refactor(studio): use the Tabs and Toggle primitives in two hand-rolled controls #2334. -
animate-pulsein 7 chat files → Skeleton, only where it marks loading. Status pulses stay. -
MessageAvatarinchat/message-bubble.tsx→ Avatar. The Avatar primitive has no call sites yet. - The local
EmptyStateinschedules/schedules-workspace.tsx→ Empty. It waits for Large batch of tiny follow-up fixes #2303, whose schedules section touches that file. - Review 1 native
<label>, 6aria-expandeddisclosures and 19 ad-hocrole="alert"uses. Use Label, Accordion or Alert where they are disclosures or banners; leave inline field errors alone. - Native
title=tooltips → Tooltip. This hasn't been re-audited. - Card has no call sites: use it or remove it.
Still open, as decisions rather than code:
- scope item 4: the Button API (Studio's
action/pill vs SEP'sbrand/cta/rounded-md); - scope item 5: the SEP data-table pattern.
Order:
- First, independent of other open work: Accordion in
consolidate-memory-card, Tabs and Toggle indelegation-panel, and Toggle incontent-preview-panel. - Then the composer toggles, after Studio settings: show provider display names ("OpenAI", not "Openai") #2260. The Execution picker waits for its redesign.
- Last, the items in files that Large batch of tiny follow-up fixes #2303 is changing.
Outcome
Studio builds its UI from the same shadcn/ui primitives (Radix-based) that the design prototype (stacklok/mecatl-prototypes, stack/08-tooling) and SEP's cloud UI (stacklok-enterprise-platform, enterprise/toolhive-cloud-ui) use. Features stop hand-rolling controls with native elements, <details> tricks, or ad-hoc ARIA.
Rule going forward: don't create custom components or hand-roll a control that shadcn/ui provides. Port the shadcn primitive into apps/web/src/components/ui/ (matching the prototype and SEP, with Studio's tokens) and use it. This keeps Studio aligned with the prototype and makes a later move of Studio into SEP a copy rather than a rewrite.
Current state (as of 2026-10-08; see Status above)
Studio has 16 primitives in apps/web/src/components/ui/: alert-dialog, badge, button, card, dialog, dropdown-menu, input, kbd, option-field, sheet, sortable-head, switch, table, textarea, tooltip, and select (being added in the #1854 work). SEP has no shared Stacklok UI package; it is a plain shadcn app (components.json: new-york, zinc) with local copies in src/components/ui/.
✅ present · ❌ missing · ✋ hand-rolled in features
| Component | Studio | SEP cloud UI | Prototype | Gap |
|---|---|---|---|---|
| Inputs and forms | ||||
| Button | ✅ variants action, …; all pill-shaped |
✅ variants brand, sizes incl. cta; base rounded-md |
✅ like Studio | API and shape differ; call sites need mapping before convergence |
| Input / Textarea | ✅ | ✅ | ✅ | aligned |
| Search input | ❌ | ✅ input-search |
✅ | add |
| Select | ❌ → being added (#1854); 9 native <select> remain in schedule-form.tsx (6), chat-composer.tsx, learning-review.tsx, settings-workspace.tsx |
✅ @radix-ui/react-select |
✅ | migrate remaining native selects |
| Label | ❌ 13 native <label> |
✅ Radix | ✅ Radix | add |
| Checkbox | ❌ native in schedule-form.tsx |
✅ Radix | ✅ Radix | add |
| Radio group | ❌ native in session-inspection.tsx |
✅ | ❌ | add |
| Switch | ✅ | ✅ | ✅ | aligned |
| Combobox / Command (cmdk) | ✋ global-search.tsx hand-rolls combobox/listbox |
✅ command.tsx, async-select |
✅ command.tsx |
add cmdk Command |
| Form (react-hook-form + zod) | ❌ | ✅ form.tsx |
❌ | evaluate |
| Toggle / ToggleGroup | ✋ aria-pressed in 4 files |
✅ Radix | ✅ Radix | add |
| Date picker / Calendar | ❌ | ✅ react-day-picker | ❌ | when needed |
| Overlays | ||||
| Dialog / AlertDialog | ✅ | ✅ (+ reusable delete-confirm) | ✅ | aligned |
| Sheet | ✅ (drag-to-dismiss) | ✅ stock | ✅ like Studio | aligned enough |
| Dropdown menu | ✅ | ✅ | ✅ | aligned |
| Popover | ✋ <details> + absolute div in session-sidebar.tsx |
✅ Radix | ✅ Radix | add |
| Tooltip | ✅ but 1 use vs 42 native title= |
✅ (truncation-aware) | ✅ | adopt consistently |
| Feedback and notifications | ||||
| Toast | ❌ only OS notifications | ✅ sonner + themed <Toaster> |
✅ sonner | add sonner |
| Alert / banner | ✋ ad-hoc role="alert" |
✅ alert.tsx |
❌ | add |
| Skeleton | ✋ ad-hoc animate-pulse |
✅ | ✅ | add |
| Progress | ❌ | ✅ Radix | ❌ | when needed |
| Empty state | ✋ local in schedules-workspace.tsx |
✅ empty-state.tsx |
❌ | add |
| Data display | ||||
| Badge | ✅ status ink text-foreground, extra muted |
✅ status ink text-<status> |
✅ SEP-style ink | align ink colour |
| Card | ✅ but unused | ✅ | ✅ | use or remove |
| Avatar | ✋ MessageAvatar in chat-workspace.tsx |
✅ Radix | ✅ Radix | add |
| Table / data table | stock table + sortable-head only |
✅ full dataview: sort, filters, column toggle, responsive columns, pagination, URL state | stock + nested rows | adopt SEP's data-table pattern |
| Pagination | ❌ | ✅ | ❌ | add with data table |
| Navigation and layout | ||||
| Tabs | ✋ role="tablist" in delegation-panel.tsx |
✅ Radix | ✅ Radix | add |
| Accordion / Collapsible | ✋ 4 <details> + 5 aria-expanded toggles |
✅ Radix | ❌ | add |
| Separator / Scroll area | ❌ | ❌ | ✅ Radix | optional |
| Studio-only (keep, and bring to SEP later) | Kbd, Markdown renderer (react-markdown), shiki code highlighting | ❌ | ✅ | — |
Dependency gap (Radix and friends)
Studio pins only: react-alert-dialog, react-dialog, react-dropdown-menu, react-slot, react-switch, react-tooltip (plus react-select from #1854). SEP additionally uses react-accordion, react-avatar, react-checkbox, react-label, react-popover, react-progress, react-tabs, react-toggle, react-toggle-group, sonner, cmdk, react-day-picker, react-hook-form, zod. Tokens are already compatible across the three apps (same CSS variable family: --btn-primary, --badge-outline-*, --input, …), so ports are mostly a matter of variant API, not tokens.
Scope
- Add the missing primitives as shadcn ports (prototype/SEP versions, Studio tokens), each with a focused test: Label, Checkbox, RadioGroup, Popover, Tabs, Accordion, Toggle/ToggleGroup, Command (cmdk), Skeleton, Alert, Avatar, EmptyState, InputSearch, and sonner + a themed
Toaster. - Replace the hand-rolled patterns listed above with those primitives (native selects/checkboxes/labels, the
<details>popover, the hand-rolled tablist and disclosures,aria-pressedtoggles, the global-search combobox, ad-hoc banners/skeletons/avatars). - Align Badge status ink with SEP and the prototype.
- Record the Button API difference (Studio
actionvs SEPbrand/cta, pill vsrounded-md) and agree on the target before changing call sites. - The data table is larger: track adopting SEP's data-table pattern (filters, column toggle, pagination) as its own follow-up.
Work can land incrementally, one primitive (plus its call sites) per PR. Feature work in progress should use the shadcn primitive as soon as it exists rather than adding another native or custom control.
Acceptance
- No new custom component or hand-rolled control where shadcn/ui provides one; reviewers check this on Studio PRs.
- Each listed primitive exists in
apps/web/src/components/ui/as a shadcn port with a test, and the call sites listed above use it. - Before/after screenshots (desktop and mobile, light and dark) for changed surfaces, reviewed in Studio design review and parity tracking #1779.
task studio:checkandtask studio:browserpass.
References
- Prototype primitives:
stacklok/mecatl-prototypesstack/08-tooling:apps/web/src/components/ui/ - SEP primitives:
stacklok-enterprise-platformenterprise/toolhive-cloud-ui/src/components/ui/(components.json) - Studio primitives:
apps/web/src/components/ui/
Activity
chore: screenshots for the badge and primitives PRs (#2201)
refactor(studio): build the worktree picker and pill switches from sh…
refactor(studio): build the worktree picker and pill switches from sh…
refactor(studio): build the worktree picker and pill switches from sh…
refactor(studio): build the worktree picker and pill switches from sh…
refactor(studio): build the worktree picker and pill switches from sh…
refactor(studio): build the worktree picker and pill switches from sh…
refactor(studio): build the worktree picker and pill switches from sh…
refactor(studio): build the worktree picker and pill switches from sh…
refactor(studio): build the worktree picker and pill switches from sh…
25 remaining items
refactor(studio): make the tool panel's Raw switch a ghost Toggle
refactor(studio): use Label for the settings switch labels (#2201 gro…
test(studio): pin the Memory and tool-call disclosures before Collaps…
feat(studio): let Collapsible content stay findable while closed
refactor(studio): show a change's current values in a Collapsible
refactor(studio): build a turn's tool-call disclosure on Collapsible
test(studio): keep native title tooltips off schedule controls
test(studio): keep native title tooltips off schedule controls
test(studio): keep native title tooltips off schedule controls
test(studio): keep native title tooltips off schedule controls
test(studio): keep native title tooltips off schedule controls
test(studio): keep native title tooltips off schedule controls
test(studio): keep native title tooltips off schedule controls