shadcn/ui migration (spec, 2026-11-04)
Purpose
Records the decision that the whole system UI moves from HeroUI to shadcn/ui components on Base UI, with the rules of delivery, build, CSP and language. All phases landed on 2026-11-04.
Requirements
Requirement: System UI is React with shadcn/ui on Base UI
The whole system UI (chat, composer, bars, settings, panels, overview, approval dialogs, change review card, recovery, wallpaper page and lock screen) SHALL be React with shadcn/ui components on Base UI. Generated HTML and isolated plugin panels are not system UI and SHALL stay in their opaque iframes. Full text: section Binding contract (from AGENTS.md).
Scenario: Generated HTML
- WHEN an interactive response renders
- THEN it stays in its opaque iframe and not in the shadcn/ui system UI
Requirement: Delivery by phases with no setting and no fallback
The migration SHALL ship in phases with no setting and no safeguard: each phase replaces the old surface in the same commit, the rollback is a git revert, the composer goes first, the lock screen moves last, and there MUST be no plain HTML fallback for any surface. Full text: section Binding contract (from AGENTS.md).
Scenario: Phase lands
- WHEN a phase publishes
- THEN the old surface is replaced in the same commit and no setting or fallback is added
Requirement: Lock form never keeps the password in state
The React lock form MUST never keep the password in React state. Full text: section Binding contract (from AGENTS.md).
Scenario: Lock form typing
- WHEN the user types the password in the lock form
- THEN the value is read from an uncontrolled input and is not held in React state
Requirement: New UI work uses shadcn/ui
New UI work SHALL use shadcn/ui on Base UI, and a surface that is still HeroUI moves in its phase. New plain DOM components or a CSS-only imitation MUST NOT be added. Full text: section Binding contract (from AGENTS.md).
Scenario: New control needed
- WHEN a new system control is built
- THEN it uses a shadcn/ui component and not plain DOM or a CSS-only imitation
Requirement: Glass look and design tokens
Every panel SHALL be glass with the chat and the composer as the reference, except the lock screen, the approval dialogs, the change review card and the panel confirmations, which keep their fixed palette. System CSS MUST use only the semantic design tokens of host/theme.css, and web-shell/test/design-tokens.test.js refuses new literals. Full text: section Binding contract (from AGENTS.md).
Scenario: Literal color in system CSS
- WHEN a change adds a literal color to system CSS
- THEN
design-tokens.test.jsrefuses it
Requirement: Icons from lucide-react
Icons SHALL come from lucide-react, replacing Gravity UI Icons surface by surface, and an own SVG in the same style fills a gap. The CPU and RAM indicators of the top bar show icons, and each button keeps its full accessible name and title. Full text: section Decisions.
Scenario: CPU indicator
- WHEN the top bar shows the CPU indicator
- THEN it shows an icon and the value as text, with its full accessible name and title
Requirement: Approval dialogs stay native
The approval dialogs SHALL stay native <dialog> elements and only the parts inside them move to shadcn/ui. Full text: section Component map.
Scenario: Approval dialog parts
- WHEN an approval dialog is migrated
- THEN it remains a native
<dialog>with shadcn/ui parts inside
Requirement: Prefixed Tailwind build with committed output
shadcn components SHALL be compiled into a second stylesheet with the Tailwind prefix ui, taking candidates only from the ui: classes of the sources, and @property rules MUST be moved to the outer document stylesheet. Every output stays committed and a login runs no Tailwind build. Full text: section How it meets the contracts.
Scenario: Tailwind utility emits @property
- WHEN a utility emits a
--tw-*@propertyrule - THEN the build moves it to the outer document stylesheet
Requirement: Copied components
The copied components SHALL live in vendor/interface/ui-src/host/ui/ as .jsx, versions MUST be pinned exactly, and an arbitrary value with a literal color or size is refused there. The shadcn CLI is not a dependency of the project. Full text: section How it meets the contracts.
Scenario: Arbitrary literal value
- WHEN a copied component uses an arbitrary value with a literal color or size
- THEN
design-tokens.test.jsrefuses it
Requirement: Overlays in the ShadowRoot
Overlays SHALL use the container prop of each Base UI Portal instead of UNSAFE_PortalProvider, in the conversation, the settings and inside the approval dialogs. Full text: section How it meets the contracts.
Scenario: Popup in the chat
- WHEN a popup opens in the conversation
- THEN its portal container is in the same ShadowRoot
Requirement: CSP of the lock and wallpaper pages
The lock and wallpaper pages SHALL keep style-src 'self' with no nonce, and the Select Popup and Scroll Area, which add a style element, MUST NOT enter them. No CSP changes, and a test on each page fails on any CSP violation. Full text: section How it meets the contracts.
Scenario: CSP violation on a page
- WHEN a page raises a CSP violation
- THEN its test fails
Requirement: Portuguese accessible names
Each phase SHALL check every control for a Portuguese accessible name and pass the pt-BR locale to number formatting, because Base UI does not supply pt-BR strings. Full text: section How it meets the contracts.
Scenario: Phase checks a control
- WHEN a phase migrates a surface
- THEN every control has a Portuguese accessible name
Requirement: Authority and separate bundles unchanged
No boundary SHALL change: generated HTML, agent tools, plugins and scheduled turns reach nothing new, and window.AgentNativeReact and window.AgentNativePanel stay frozen and change only their component lists. The lock, recovery and wallpaper bundles keep their own React with no shared runtime. Full text: section How it meets the contracts.
Scenario: Frozen globals
- WHEN a phase adds copied components
- THEN only the component lists of the frozen globals change
Requirement: Size cap of the profile app.js
The 512 KB cap SHALL apply only to the profile app.js: copied components live in the host bundle and reach app.js through the frozen global and MUST never be inlined. Full text: section How it meets the contracts.
Scenario: Profile app uses a copied component
- WHEN
app.jsneeds a copied component - THEN it reaches it through the frozen global and not inline
Requirement: Compositor visuals in a final phase
The system SHALL bring the compositor visuals to the unified style in a final phase, as the user asked on 2026-11-03 together with the unified glass style of the whole system. Full text: section Binding contract (from AGENTS.md).
Scenario: Unification request
- WHEN the style of the whole system is unified
- THEN the compositor visuals come in a final phase
Status
Doc status: current contract. shadcn/ui on Base UI is the system UI library. All phases landed on 2026-11-04 (HeroUI removed in c544e214, phase 9 notes); the header paragraph saying other surfaces are still HeroUI is stale. Checked 2026-11-10.
Introduction
Status: decided by the user. Phase 1 landed on 2026-11-04: the foundation, the composer and the conversation controls. Phase 2 landed the same day: the model picker. Phase 3 followed: the cards above the composer. Phase 4 followed: the settings. Phase 5 followed: the bars and the workspace overview. Phase 6 followed: the protected panels. Phase 7 followed: the approval dialogs and the system inspector. The other surfaces are still HeroUI. This spec supersedes the choice of library in heroui-migration.md. That document stays as the history of how the surfaces moved to React, and its inventory and contracts still apply.
The user, on 2026-11-04, after seeing the settings tabs in a nested run: "vi aqui, o shadcn é bem melhor que o heroui, foi uma decisão meio rapida e agora vamos ter que refazer ela", and then "pode seguir com base ui". The same message also asked: "quando for fazer a migração de UI, aproveita para colocar icones em vez de texto nos indicadores de ram e cpu".
Decisions
- Every system UI surface moves from HeroUI to shadcn/ui components on Base
UI (
@base-ui/react). Generated HTML and isolated plugin panels stay out, as before. - Same delivery rules as the HeroUI migration: phases, no setting, no fallback, each phase replaces the old surface in the same commit, the rollback is a git revert, the composer goes first and the lock screen last. The React lock form never keeps the password in React state.
- The look does not come from the library. Every panel is glass with the
chat and the composer as the reference, except the lock screen, the
approval dialogs, the change review card and the panel confirmations, which
keep their fixed palette; the review card and the panel confirmations are
manual popovers in the top layer over a slot (naaando/galaxy-shell#17). System CSS keeps using only
the tokens of
host/theme.css. shadcn tokens map to the--color-*roles. - Icons:
lucide-react, the default icon set of shadcn, replaces Gravity UI Icons surface by surface. An own SVG in the same style fills a gap. - The CPU and RAM indicators of the top bar show icons instead of the words CPU and RAM (phase 5). Each button keeps its full accessible name and title, and the value stays as text.
- New UI work uses shadcn/ui once phase 1 lands. Until then the rule of HeroUI stays, so that no surface is built twice.
Why Base UI
shadcn made Base UI the default for new projects in July 2026 and still supports Radix (changelog). Its reasons are maturity, active development, its own use and adoption; that entry names no technical defect of Radix. Base UI also has a Number Field, which the settings need.
Phase 0 result (2026-11-04, isolated spike)
@base-ui/react 1.9.0 and React 19.3.1, built with esbuild, in headless Chrome,
inside a ShadowRoot with a portal container in the same root:
| Check | Result |
|---|---|
| Menu, tooltip, dialog and select open in the root | pass |
| Arrow keys, Escape returns the focus | pass |
| Dialog keeps the focus inside | pass |
| Tabs, switch and number field by keyboard | pass |
| Tooltip on keyboard focus, with no global flag | pass |
style-src 'self' 'nonce-…' with CSPProvider nonce |
no violation |
Same CSP without CSPProvider |
1 violation |
Button, Input and Field label under the lock CSP (style-src 'self', no nonce) |
no violation, no style element |
| Button reads and clears an uncontrolled password input | pass |
| Slider by keyboard, in a plain document | pass |
The slider and lock checks ran in a plain document, not a ShadowRoot; phase 4
repeats the slider in the root. In @base-ui/react 1.9.0 only Select Popup and
Scroll Area read the CSP context to add a style element, so the lock page needs
no CSPProvider. None of this ran in Electron or in a nested session yet; phase
1 does. The spike bundle with
React and eight components is 503 KB, 164 KB with gzip. It is not comparable with
the current HeroUI bundles, because it holds fewer parts.
Component map
| HeroUI today | Imports | Replacement |
|---|---|---|
| Button, ToggleButton | 18 | shadcn Button, Toggle |
| Menu | 5 | ui/panel-menu.jsx in the panels (phase 6 notes) |
| Switch, Slider, Separator, Label | 9 | shadcn parts of the same name |
| Disclosure | 3 | shadcn Collapsible |
| Tooltip, Popover | 3 | shadcn parts of the same name |
| Card, Kbd, Textarea, Input, Tabs | 6 | shadcn parts of the same name |
| Select, RadioGroup | 3 | shadcn parts of the same name |
| Meter | 2 | Base UI Meter, styled here; shadcn has none |
| ListBox with React Aria Autocomplete (model picker) | 2 | shadcn Command, or Base UI Combobox, keeping search and filter |
| React Aria Dialog (settings) | 1 | shadcn Dialog |
| React Aria Text (panel menu items) | 4 | plain elements in the shadcn item parts |
| SearchField | 1 | shadcn Input Group |
| NumberField | 1 | Base UI Number Field, styled here |
| ColorArea, ColorField, ColorSlider, ColorSwatch, ColorPicker | 5 | react-aria-components parts, unstyled, styled here |
The color parts and parseColor are the one exception to Base UI: neither shadcn
nor Base UI lists a color picker. They stay only in the settings code, so
react-aria-components stays a dependency after phase 9. The approval dialogs stay
native <dialog> elements; only the parts inside them move.
How it meets the contracts
- Build. shadcn components are written with Tailwind utilities, and
build-heroui-host.jscompiles no utilities on purpose, because.hiddenor.sr-onlywould also match host elements. Each bundle gets a second stylesheet (phase 1:host/shadcn-host.css), compiled apart from the HeroUI one with the Tailwind prefixui, so a generated class cannot match a host class and the HeroUI CSS keeps its unprefixed theme during the migration. The build takes its candidates only from theui:classes of the sources. Preflight stays out. Utilities can emit--tw-*@propertyrules, which a ShadowRoot ignores, so the build moves them to the outer document stylesheet. The selector allowlists of the CSS tests accept onlyui\:selectors for this stylesheet, and a new test checks that every@propertyrule is in the outer document. Every output stays committed, and a login runs no Tailwind build. - Copied code. The components live in
vendor/interface/ui-src/host/ui/, as.jsx, edited here.design-tokens.test.jscovers that folder, and an arbitrary value with a literal color or size is refused there. Versions are pinned exactly. The parts come from the shadcn CLI 4.23.0 withstyle: base-nova,tsx: false,prefix: ui, which writes thecnpackage import that the phase 0 run confirmed. The CLI is not a dependency of the project. - Network. Each new asset still needs the asset map of
core/server.js, the Electron list andtrusted-ui-assets.test.js. No request leaves the machine. - ShadowRoot. Overlays use the
containerprop of each Base UI Portal instead ofUNSAFE_PortalProvider, in the conversation, the settings and inside the approval dialogs.enableShadowDOM()and thereact-arianonce global leave the shared runtime only if phase 4 proves that the color parts work without them; otherwise they stay for that code. The existing answer for@propertystays: registrations in the outer document, with no selector. - CSP. In
@base-ui/react1.9.0 only Select Popup and Scroll Area add a style element, so only a root that uses them sits underCSPProviderwith the nonce of its page. The lock and wallpaper pages keepstyle-src 'self'with no nonce, and those two parts do not enter them. No CSP changes. A test on each page fails on any CSP violation. - Language. React Aria supplied pt-BR strings by itself; Base UI does not. Each
phase checks every control for a Portuguese accessible name and passes the
pt-BRlocale to number formatting. This is the easiest regression to miss. ThechatLocalesbuild plugin andI18nProviderstay only around the color parts. - Separate bundles. The lock, recovery and wallpaper bundles keep their own React
and their own build of each copied component, with no shared runtime. The bars keep
the
titleattribute where a window is too small for a tooltip. - Authority. No boundary changes. Generated HTML, agent tools, plugins and
scheduled turns reach nothing new.
window.AgentNativeReactandwindow.AgentNativePanelstay frozen and change only their component lists.AgentNativeReactreplaced Button, Tooltip andPortalProviderin phase 1, and the panel module map of the build gains the copied components andcnin the phase that first needs them. - Size. Both libraries ship during the migration. The budget of the HeroUI spec
applies to the end state, measured in phase 9. The 512 KB cap is only for the
profile
app.js: copied components live in the host bundle and reachapp.jsthrough the frozen global, never inlined. - Tests. Eight
heroui-*.test.jsfiles lead the 33 files of test, core and scripts that mention HeroUI, and many select by BEM classes such as.button. A phase moves the tests of its surface in the same commit, selecting by role and name wherever it can.
Phases
Each phase publishes alone, after the gates, a review and a nested QA with screenshots of each state.
- This spec and the spike.
- Foundation, the composer and the conversation Button and Tooltip (
ui-src/app.jsx), because they share the frozen runtime and move together: dependencies, build, tokens,CSPProvider, runtime. Proves portals, focus,@propertyand CSP in Electron. - Conversation controls and the model picker.
- Cards above the composer, the change review card and the memory notice.
- Settings, rebuilt on the tabs, in real glass and with the width that the panel needs. This fixes what the QA of 2026-11-04 found: an opaque light panel, a dark rectangle behind it and unstyled tabs.
- Bars and the workspace overview, with the CPU and RAM icons.
- Protected panels: volume, notifications, tray, quick settings, workspace menu, window size and desktop actions.
- Approval dialogs and system inspector, with their fixed palette.
- Recovery and the wallpaper page, then the lock screen, after a live check with the user.
- Removal:
@heroui/*,@gravity-ui/icons, the React Aria packages that the color parts do not need, the HeroUI build code and CSS. Rename theheroui-*assets and measure the budget.
Open items
Phase 4 closed the three open items of the QA of 2026-11-04; see its notes.
Phase 1 notes (2026-11-04)
- Each Base UI part mounts its popup after the open state changes, so code that measures a popup uses a callback ref in state, and a test waits for the position.
- The Base UI tooltip has no
roleand noaria-describedby. The copied part setsrole="tooltip", and the message marker sets the description itself. - A Base UI trigger passes its own
data-slot, so the copied Button sets its slot last: host.css finds the buttons by it. npm run test:uiserves a page and does not exit. Open the printed URL and read the PASS and FAIL lines; Chrome headless needs no other setup.- The "Ações" button of the bottom bar had none of the bar button rules, so it fell back to its light default and overflowed the bar. It is now a labelled bar button, fixed outside the phase order because the user reported it.
- In a light color scheme the message marker preview draws light glass over a dark wallpaper while the bubbles stay dark. It is legible and older than this phase, and it stays open.
- The desktop actions panel opens at the bottom left (
anchor: bottom-left,core/web-panels.cjs), far from its button in the centered bar. Phase 6 moves it, with a migration step for the savedweb-panels.jsonof an existing profile.
Phase 2 notes (2026-11-04)
- The model picker is a shadcn Popover with an inline Base UI Combobox. The nested run
cannot open it, because the trigger stays disabled with no provider, so its look was
checked in headless Chrome with a synthetic catalog, and its behavior in
heroui-settings.test.js. Not checked with a real catalog. - A popup taller than the free space flips or shifts by default, so the picker sets
collisionAvoidanceto keep its side and lets the list scroll.
Phase 3 notes (2026-11-04)
- The memory notice, the first-run color card, the change review card and the onboarding
tips use the copied Button, Collapsible and Kbd. No root of this phase needs
CSPProvider, because none uses Select or Scroll Area, so it left the composer, the picker, the conversation and the shared runtime. Phase 4 brings it back for the root that uses Select. - HeroUI buttons also carry
data-slot="button". A rule on that slot that restorespointer-eventsmust exclude.button: React Aria starts a press from pointer events, and the approval dialogs, still on HeroUI, stopped answering when it did not. - With both cards above the composer on a short window, each card shrinks and scrolls
(
flex: 0 1 auto,overflow: auto). This is older than this phase. - The look of the cards was checked in headless Chrome with synthetic state
(
10-cards.pngin the local QA folder), because a nested run has no change proposal or memory pressure. The behavior is in the tests. Not checked in Electron. - Pressing Super in the first seconds after a host start showed the chat as an opaque light rectangle. Phase 4 fixed it; see its notes.
Phase 4 notes (2026-11-04)
- The settings use the copied Tabs, Switch, Select, Radio Group, Popover and Button, and
a Number Field on Base UI. The color parts stay on
react-aria-components, unstyled and styled in host.css, withI18nProvider. The settings root is the first that sits underCSPProvider, for the Select popup. - The settings dialog is in the outer document, not the ShadowRoot, so the plan to repeat the slider in the root has no case here. Phase 6 has the sliders of the panels.
- What the QA of 2026-11-04 found, with its causes:
- The dark rectangle was the
::backdropscrim, which fills the chat window. On the desktop the scrim is off. - The light opaque panel had no region in the compositor. The open panel now reports its own region and takes the same tint as the composer. The rest of the chat hides while it is open, so that it does not show through.
- The first-run card never showed on the floating chat, in two ways: the host required
no
canvas-dock, and the CSS hid it underbody.chat-sidebar, which the floating chat also has. It is older than the migration, and it also broke "Ver o onboarding de novo".
- The dark rectangle was the
- The panel has a fixed height, so it does not jump between tabs.
- A closed Base UI Select keeps its list mounted and hidden, so a test waits for hidden, not detached. Tab out of a color popover closes it, where the HeroUI one stayed open.
- The chat window starts transparent in Electron, before the first state, which fixes the opaque light frame of a Super press in the first seconds. Not reproduced after the fix: the first frame depends on timing.
- Checked in a nested run, in the light scheme only, with no provider. Not checked: the dark scheme, the login buttons of the Conta tab with a real provider, and a compositor with no chat regions, which falls back to the translucent CSS material.
Phase 5 notes (2026-11-04)
- The bars and the workspace overview use the copied Button and lucide.
CpuandMemoryStickreplace the words CPU and RAM; each button keeps its accessible name, its title and the value as text. - The reset rule of host.css now has
[data-slot="button"]as its only hook for the bar buttons, so a bar button no longer depends on a HeroUI class. system-icons.jsxkeeps the Gravity volume icons until phase 6, because the panels share it.- Checked in a nested run, light scheme, one output. The top bar is dark in that run. Not checked: extra monitor bars and a battery or tray in the bar, which a nested run has not.
Phase 6 notes (2026-11-04)
- The panel runtime
host/heroui-panel.jsnow holds React, the copied parts and the Base UI Meter, and shrank from 462 KB to about 318 KB. The panel pages link/shadcn-host.css, andheroui-panel.cssis gone. The asset keeps its name until phase 9. - The panels have no popup menu part. The shadcn Dropdown Menu and the Base UI Menu always
position a popup from a trigger, but the panel window is itself the popup and the host fits
it to
<main>. Soui/panel-menu.jsxis a small part of this project with role=menu, one tab stop, the arrows, Home, End, the wrap and typeahead. - The desktop actions panel and the workspace menu sit above the centered bar, with the
anchor
bottom. The user reported the actions panel as badly placed: it opened at the bottom left, far from its button.migrateLegacyProtectedmoves only the exact old declaration, on each start; any other value is the user's. A compositor withoutcapabilities.hudPluginshas no edge anchors, so it keeps them at the bottom left, and a default file does not fail there. - Things that React Aria did and a native button does not:
- It stopped the click from bubbling, so on the HeroUI page a press on another control left a
quick settings submenu open. The document click closes the submenu again, as the plain page
did, and reads
composedPath(): the confirmation removes its button during the press. - It refused key repeats. The copied Button and Toggle now ignore a repeated Enter or Space, so a held key does not run the control that takes the focus next. This replaces the guard of the change review card, and it also covers the overview. The composer send ignores a repeat too.
- A press on a disabled item kept the focus;
MenuItemprevents the mouse down there.
- It stopped the click from bubbling, so on the HeroUI page a press on another control left a
quick settings submenu open. The document click closes the submenu again, as the plain page
did, and reads
- The copied parts bring
ui:transition-all, sopanel-base.cssturns it off for reduced motion. A contrast test read a color in the middle of that transition. - The
idof a Base UI Switch goes to its hidden input, with the role on the span. - Checked in a nested run for the actions panel, quick settings and notifications, one output, no provider, and with synthetic data in headless Chrome for the states that a nested run does not have: the media card, the sliders and tiles with values, the tray menu, the workspace menu and the window size presets. Not checked: real tray icons, a second monitor for the workspace menu, and audio or network services.
Phase 7 notes (2026-11-04)
- The approval dialogs stay native
<dialog>elements with their fixed palette; only the buttons and icons moved. Their unlayered rules inhost.csscarry ids, so they win over the utilities of the copied Button, andbox-shadow: nonedrops the ring of the part, which uses the system tokens. The focus outline stays the fixed accent. - A press keeps its generation without React Aria.
onPressStartbecomes a pointer down or a first key down, and the click reads the generation it recorded. A click with no recorded press anddetail0 comes from assistive technology and answers the current request. Any other click with no press began while the button was disabled and answers nothing. A key held across a new request has its own check now inscripts/test-approval-browser.js. - The inspector uses Collapsible with
keepMounted, as the Disclosure kept its content mounted. The chart gradient used two hex colors from before the design tokens and the line used the metric token, so they did not match;.chart-stopnow follows the line.
Phase 8 notes (2026-11-04)
wallpaper.jsxhas no HeroUI part, so the wallpaper page did not change.- Recovery keeps its own built assets.
heroui-recovery.cssnow compiles from the theme source ofshadcn-host.css, with only the classes ofrecovery.jsxand the two parts it bundles, so a broken chat build still cannot break/recovery. The page buttons repeat their colors inrecovery.csswith fallbacks, because the page must stay readable without/theme.css, and they inherit the font, since there is no preflight. - The lock form keeps a plain
<input>. The copied Input is the Base UI Input, whoseFieldControlcommits the value to its validation state, and the password must never be in React state. The user approved publishing the lock screen and the removal on 2026-11-04 (commit 9b78022) after a nested lock, a headless page check and the live login of the earlier phases. A real unlock with the PAM password is checked by the user at the first login after that commit; it had not happened when this was written.
Phase 9 notes (2026-11-04)
- Removed:
@heroui/react,@heroui/styles,@gravity-ui/icons,@react-aria/ssr,@react-aria/utils, the stylesheetheroui-host.csswith its route and Electron entry, the HeroUI tokens oftheme.cssandpanel-base.css, anddata-nonceon the panel pages and recovery. - Stay for the color parts of the settings:
react-aria-components,react-aria,react-stately,@internationalized/date, andenableShadowDOM(). The chat document keepsbody[data-nonce]for the inline surfaces, the profile style andCSPProvider; the built bundle has no reader ofwindow.__webpack_nonce__, so that global went too. - The protected panels and recovery get
protectedPageCspofcore/server.js(script-src 'self'; style-src 'self'), because generated HTML can read the core nonce and these pages add no inline script or style. A style element added on them is blocked, which is cosmetic. Update the core and the pages together: a page from before the removal on this CSP needs no nonce either. - The
heroui-*assets were renamed in two steps, with a login between them. The running core holds its route table in memory, while a sync replaces the HTML on disk, so one commit would give a blank chat if the host reloaded before the next login. Commit 738462e made the core and the host accept both names and read either file. The next commit, published after a login on it, moved the files, the pages, the build script and the tests toshadcn-*, and removed the old URLs. Older names above in this document are history.
Binding contract (from AGENTS.md)
This section holds, word for word, the rule that AGENTS.md kept for this feature until 2026-11-10,
when AGENTS.md was reduced to the short invariants (openspec/changes/audit-2026-11-10/design.md, F10). It binds
exactly as AGENTS.md does; AGENTS.md keeps the short invariant and points here. Change both in
the same commit.
On 2026-11-02 the user decided that the whole system UI uses React with the HeroUI library (https://heroui.com/, v3 on React Aria and Tailwind CSS v4), including the surfaces that are plain HTML/JS today: "não, eu quero toda a UI do sistema com essa lib, mesmo as que hoje não usam react, esse era o objetivo desde o começo que tudo usasse react, e agora essa lib". The icons change too ("troque os icones também"). This covers the chat, the composer, the bars, settings, the panels, the overview, the approval dialogs, the change review card, recovery, the wallpaper page and the lock screen. Generated HTML and isolated plugin panels are not system UI and stay in their opaque iframes. The migration is a proposal until phase 1 lands; it ships in phases with no setting and no safeguard ("heroui não tem settings, só deve existir ela implementada", "sem safeguard, só seguir"): each phase replaces the old surface in the same commit, the rollback is a git revert, the composer goes first, and there is no plain HTML fallback for any surface (the user called it overengineering on 2026-11-02); the lock screen moves last and the React lock form never keeps the password in React state. Once phase 1 lands, new UI work uses React and HeroUI; do not add new plain DOM components or a CSS-only imitation. On 2026-11-03 the user asked to unify the style of the whole system with the chat and the composer as the reference, every panel in glass (except the lock screen and the approval dialogs, which keep their fixed palette), and the compositor visuals in a final phase. System CSS uses only the semantic design tokens of host/theme.css (openspec/specs/css-structure/spec.md, section Design tokens); web-shell/test/design-tokens.test.js refuses new literals. See openspec/changes/archive/2026-11-02-heroui-migration/design.md and docs/architecture-decisions.md.
On 2026-11-04 the user replaced HeroUI with shadcn/ui on Base UI for the whole system UI ("o shadcn é bem melhor que o heroui, foi uma decisão meio rapida e agora vamos ter que refazer ela", "pode seguir com base ui"). This supersedes the choice of library above; the rules of phases, no setting, no fallback, glass and design tokens stay. Icons move to lucide-react. Phase 1 of openspec/specs/shadcn-migration/spec.md landed: new UI work uses shadcn/ui, and a surface that is still HeroUI moves in its phase. See openspec/specs/shadcn-migration/spec.md.
The frame part (2026-11-13)
ui-src/host/ui/frame.jsx (Frame) and the ui:frame, ui:frame-control, ui:frame-tab and
ui:frame-hatch rules of ui-src/host/shadcn-host.css are a shared part of the library: the
cut corners, the ring along the cut, the focus inside the shape, the title tab and the hatch of
the window theme Ninja, from the semantic tokens only (--chamfer*, --frame-*,
--theme-accent-1..3). The tokens are 0 in the base theme, so the part is an ordinary box in
Office and Galaxy, and the protected roots pin them. The Button, the popups of Popover and
Select, the panel surfaces (host/panel-base.css), the settings sheet and the composer use it
(openspec/changes/theme-packs/design.md, section 6, The chamfer and the frame part).