HeroUI migration (spec, 2026-11-02)
Doc status: history. Superseded on 2026-11-04 by shadcn-migration.md (shadcn/ui on Base UI); kept as the surface inventory. Checked 2026-11-10.
Superseded on 2026-11-04: the user replaced HeroUI with shadcn/ui on Base UI. See shadcn-migration.md. This document stays as history and as the inventory of the surfaces.
Status: phase 1 (foundation and the composer) is published on 2026-11-02; see "Phase 1 result" below. Phase 2 (the conversation controls), phase 3 (the volume indicator and the notification panels), phase 4 (the tray menu), phase 5 (quick settings), phase 6 (the settings dialog, then the model picker), phase 7 (the cards above the composer), phase 8 (the approval dialogs), phase 9 (the bars and the workspace overview) and phase 10 (recovery, then the wallpaper page) and phase 11 (the lock screen) are implemented on 2026-11-02; see their results. Phase 11 waits for a live check with the user before publish.
The user asked on 2026-11-02: "https://heroui.com/ quero que reimplemente todos os componentes do sistema usando essa lib". The first version of this spec kept the lock screen, recovery, the approval dialogs, the change review card and the wallpaper outside HeroUI. The user rejected that the same day: "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", and then "troque os icones também". The direction is now: every surface of the system UI is React with HeroUI, and the icons change too. This document checks HeroUI against the contracts of the project, lists every visual component, says how each one moves, and splits the work into phases that ship one at a time.
Summary
- HeroUI v3 (
@heroui/react3.2.7) is a React library on React Aria Components and Tailwind CSS v4. It needs a Tailwind build step, a separate vendor asset (it does not fit the 512 KBapp.jscap), and explicit work for the ShadowRoot: overlay portals, focus management and the@propertyrules of Tailwind. - Today only the conversation is React. The composer, the bars, the dialogs, settings, quick settings, notifications and the tray menu are plain DOM in the protected host. "Every component" therefore means a rewrite of most of the protected host, not a change of the React UI.
- Every surface of the system UI moves to React and HeroUI, including the lock screen, recovery, the approval dialogs, the change review card and the wallpaper page. No surface keeps a plain HTML fallback (the user called it overengineering on 2026-11-02); nested QA and a live check of the lock screen stand in for it. The icons change to Gravity UI Icons, the set that the HeroUI docs use.
- Generated HTML and isolated plugin panels are not system UI: the model and the user own them, and they stay in their opaque iframes without HeroUI.
- There is no setting and no safeguard: each phase replaces the old surface in the same commit ("sem safeguard, só seguir", 2026-11-02). The composer goes first, because the user asked for it on 2026-11-02.
HeroUI facts (checked 2026-11-02)
Source: the npm registry and the packed @heroui/react 3.2.7 and
@heroui/styles 3.2.7 packages (published 2026-10-28), and heroui.com.
| Item | Value |
|---|---|
| Packages | @heroui/react 3.2.7, @heroui/styles 3.2.7. @heroui/theme 2.x is the old v2 line; do not use it. |
| Peer dependencies | react and react-dom >= 19 (the project has 19.3.1), tailwindcss >= 4 (latest 4.3.3), react-aria-components ^1.22.1, react-aria ^3.53.1, @react-aria/utils, @react-aria/ssr, @internationalized/date |
| Own dependencies | tailwind-variants, input-otp, @radix-ui/react-avatar, tw-animate-css |
| Provider | v3 needs no HeroUIProvider |
| CSS entry | @import "tailwindcss"; @import "@heroui/styles"; in a stylesheet that Tailwind compiles |
| Prebuilt CSS | dist/heroui.min.css, 456 KB, with every component |
| Tokens | --accent, --accent-foreground, --background, --foreground, --surface, --muted, --danger, --radius, --field-radius, and more. OKLCH values; hover and surface levels come from color-mix(). |
| Theme selectors | :root,:host for the default tokens; .dark, [data-theme=dark], [data-theme=light], [data-theme=default] for modes |
| Cascade layers | theme, base (Tailwind preflight), components, utilities, properties |
@property rules |
92 (Tailwind --tw-* values, scroll shadow, animation) |
| Styling | Compound components (Card.Header, Switch.Thumb), BEM classes (button, button--secondary) and data-slot attributes. The FAQ says the CSS also applies to plain HTML. |
| Accessibility | React Aria: focus management, keyboard navigation, ARIA roles, screen reader strings per locale |
| Components | Accordion, Alert, AlertDialog, Avatar, Badge, Button, ButtonGroup, Card, Checkbox, Chip, CloseButton, ColorPicker, ComboBox, Disclosure, Drawer, Dropdown, Input, Kbd, ListBox, Meter, Modal, Popover, ProgressBar, Radio, ScrollShadow, SearchField, Select, Separator, Sheet, Skeleton, Slider, Spinner, Surface, Switch, Tabs, TextArea, TextField, Toast, Toolbar, Tooltip, and date and table components |
React Aria exports UNSAFE_PortalProvider (a container for overlays) and the
experimental flag enableShadowDOM() in @react-stately/flags, which changes
focus, interact-outside and typeahead code to look through shadow roots.
Inventory of visual components
Paths are relative to the repository. web-shell/host, web-shell/ui-src and
web-shell/ui are links to vendor/interface.
Trusted React UI (ShadowRoot of #surface)
vendor/interface/ui-src/app.jsx (536 lines), compiled by
web-shell/scripts/build-ui.js to vendor/interface/ui/app.js. The core serves
it as /trusted-ui.js and ui/style.css as /trusted-ui.css
(web-shell/core/server.js, asset map). host.js loadTrustedUI adds the
stylesheet link inside the ShadowRoot and the script to the outer document.
| Component | Controls | Notes |
|---|---|---|
Conversation |
message articles, scroll anchor | Articles are created by hand and filled through createPortal; scroll anchoring uses ResizeObserver and rectangles |
MessageMarkdown |
links, tables, task list checkboxes | react-markdown and remark-gfm; urlTransform allows only http, https and mailto |
MessageMarker |
one button per user message, a tooltip | Portaled to a marker host, positioned by JavaScript |
InlineSurface |
title, pin button (.surface-pin, aria-pressed) |
The generated HTML runs in SurfaceFrame, an opaque iframe |
PinnedSurfaces |
pinned frames | Portaled to #pinned |
Protected host, chat document (vendor/interface/host/index.html, host.js)
One document serves /, /desktop-sessions (bottom bar) and
/desktop-topbar (top bar). Until phase 10 it also served /recovery.
| Component | Controls | Source |
|---|---|---|
| Composer | textarea #trusted-input, send, stop, voice, show to the agent, account, capture chip |
index.html, host.js, voice.js |
| Model picker | button, popover, search field, listbox (HeroUI since phase 6) | ui-src/host/model-picker.jsx, model-picker.js |
| App launcher | listbox | host.js |
| First-run color card | swatch group, Done (HeroUI since phase 7) | #profile-color-onboarding, ui-src/host/first-run-color.jsx, settings-state.js |
| Memory notice | text, buttons (HeroUI since phase 7) | #memory-notice, ui-src/host/memory-notice.jsx, memory-notice-state.js |
| Change review card | file list, diff, approve, reject (HeroUI since phase 7) | ui-src/host/change-review.jsx, change-review.js |
| Bottom bar | conversation tabs, new chat, app icons per tab | #conversation-bar, host.js |
| Top bar | workspace dots, CPU and memory buttons, clock and date with a badge, tray icons, panel buttons, quick settings button, radio, battery and volume icons | #top-bar, status-bar.js, tray.js, metrics.js |
| System inspector | SVG charts, quota windows | #system-inspector, metrics.js |
| Approval dialogs | schedule, theme, tool; Allow and Deny (HeroUI content since phase 8) | native <dialog>, showModal(), ui-src/host/approvals.jsx, approval-state.js |
| Workspace overview | close button, workspace cards with live planes | native <dialog>, workspace-previews.js, workspace-zoom.js |
| Settings (account dialog) | ChatGPT login, Disclosure sections, color pickers, selects, number field, switches (overview planes, chat blur, canvas, sharp zoom), dock side, window controls, profile colors (HeroUI since phase 6) | #account-dialog, ui-src/host/settings.jsx, settings-state.js |
| Recovery | change list, history, restore (HeroUI since phase 10) | own document recovery.html, ui-src/host/recovery.jsx, recovery-client.js |
Protected panel pages (own documents, web-panels.json kind protected)
The core builds the defaults in web-shell/core/web-panels.cjs.
| Panel | Controls | Source |
|---|---|---|
quick-settings |
four range sliders, toggle buttons (aria-pressed), submenus with back buttons (Wi-Fi, wired, VPN, sound, Bluetooth, schedules, power), power menu, confirm bar, SVG icons |
quick-settings.html/.css, ui-src/host/quick-settings.jsx and system-icons.jsx (React and HeroUI since phase 5) |
notifications, notification-center |
toasts, Do Not Disturb toggle, clear all, list | notifications.html/.css, ui-src/host/notifications.jsx (React and HeroUI since phase 3) |
tray-menu |
role=menu list with inline submenus |
tray-menu.html/.css, ui-src/host/tray-menu.jsx (React and HeroUI since phase 4) |
volume-indicator |
icon, track, value; no input | volume-indicator.html/.css, ui-src/host/volume-indicator.jsx (React and HeroUI since phase 3) |
Other pages
| Page | Controls | Source |
|---|---|---|
| Lock screen | clock, date, password field, submit | lock-screen.html/.css/.js, own window, partition and CSP |
| Wallpaper | canvas only | wallpaper.html/.js, core/desktop-visuals.js; React root since phase 10 |
| Isolated plugin panels | user-owned | source_root of web-panels.json, opaque iframe |
| Generated HTML | model-owned | opaque iframes (host/surface.js) |
Constraints and how HeroUI meets them
1. Local build and the Electron network rules
The Electron host cancels every request outside a loopback allowlist. Each new
asset needs three edits: the asset map of core/server.js, the list of
desktop.cjs (or isTrustedUiAsset in core/trusted-ui-assets.cjs), and the
tests of trusted-ui-assets.test.js. The panel pages load shared assets by
route (/theme.css), so a shared HeroUI asset needs the same entries. The lock
screen loads none of the chat or panel assets; its own bundle and CSS (section
4a) need their own entries, served under the lock CSP and partition. Rules for the build:
- Pin exact versions of
@heroui/react,@heroui/styles, the React Aria packages,tailwindcssand@tailwindcss/cli(or@tailwindcss/node) inweb-shell/package.json. The shared dependency cache ofscripts/prepare-project.pyinstalls them; Tailwind v4 has a native@tailwindcss/oxidepackage per platform, which the cache must carry. build-ui.jscompiles the Tailwind entry with source scanning of the React sources and writes a CSS file.build:checkcovers the new outputs.- No font, icon or CSS request leaves the machine. HeroUI ships no fonts; the
UI keeps
--font-family-uifromsystem-typography.js. The default CSP has nofont-src, so a web font would fail anyway.
2. Bundle size and startup
ui/app.jswas 407 KB before phase 1 (205 KB after phase 2, which takes React from the HeroUI runtime).core/store.jsvalidatecapsapp.jsat 512,000 bytes andstyle.cssat 100,000 bytes. HeroUI, React Aria Components and the locale strings do not fit in the 105 KB that is left. The prebuilt HeroUI CSS is 456 KB.- Proposal: the HeroUI runtime and its CSS become separate checkout assets
(for example
/trusted-heroui.jsand/trusted-heroui.css), built bybuild-ui.jsand never part of the three profile files. The profile contract (index.html,style.css,app.js) does not change. - The build output of
vendor/interface/uiis committed today, andbuild:checkcompares it with the sources. Committing the HeroUI output too adds about 1 MB of generated JavaScript and CSS, and large diffs at each update. Building it at install instead puts the Tailwind nativeoxidebinary on the path of "prepare the build before the next login". Proposal: commit the output, likeui/app.js, so a login never depends on a Tailwind build (open question 9). - The first phase that loads HeroUI records the size of each asset (raw and gzip), the parse and first
render time of the chat in Electron, and the memory of the host renderer,
against the numbers of
docs/performance.md. Budget proposal: at most +150 KB gzip JavaScript and +80 KB CSS for the chat document, and at most +100 ms to the first render of the conversation. Each panel page has its own budget, because each panel is its own document.
3. CSS inside a ShadowRoot
The React UI mounts in a ShadowRoot. Tailwind and HeroUI assume document-level CSS. Findings and rules:
- Tokens: HeroUI declares them on
:root,:host, so they apply inside the ShadowRoot. @property: Chromium ignores@propertyrules inside a shadow tree, and Tailwind v4 uses them to give--tw-*properties their initial values. The fallback block of Tailwind (@layer properties) is behind an@supportstest that Chromium does not match. Risk: shadows, rings, transforms and gradients of the utilities fail silently in the ShadowRoot. The first phase that meets it checks this in Electron 45. Mitigations, in order: (a) a build step that also emits the--tw-*initial values on:host; (b) a small outer-document stylesheet that holds only the@propertyregistrations, with no selector, so it cannot change a host control. Option (b) is an exception to the rule that the chat CSS never loads in the outer document, so it needs the user's approval (open question 5).- Preflight: the Tailwind
baselayer resets headings, lists and tables. In the ShadowRoot it changes the markdown of the messages. Keep preflight out, or load it in a layer belowui-src/style.css. - Overlays: React Aria portals
Popover,Tooltip,Modal,Dropdown,SelectandToasttodocument.bodyby default. That is outside the ShadowRoot: the overlay loses its styles and lands in the outer document, where it can cover the protected composer. Every React root wraps its tree inUNSAFE_PortalProviderwith a container inside the same ShadowRoot. - Focus: React Aria focus scopes, interact-outside and typeahead need
enableShadowDOM()inside a shadow root. The flag is experimental. The first phase that meets it tests focus trap, Escape, Tab order and outside click inside the ShadowRoot. - Overlays inside the top layer: the settings dialog and the approval dialogs
are native
<dialog>elements opened withshowModal(), and the model picker is a nativepopover. A modal dialog makes the rest of the document inert, so an overlay portaled todocument.bodyshows below the dialog and takes no input. A HeroUI overlay inside a native dialog uses a portal container inside that dialog. The first phase that meets it tests this case as well as the ShadowRoot case. - Cascade: HeroUI uses cascade layers, and unlayered rules beat every layer.
The profile
style.cssarrives as an unlayered<style id="profile-ui-style">, so it still wins over HeroUI, as it wins today.ui-src/style.cssis unlayered too, and it has element rules (h3,.message-markers button) that override the HeroUIcomponentslayer. Phase 1 audits these rules and moves them to a named layer, or scopes them to the elements that have not moved yet.
4. Plain HTML and JavaScript host pages
Before this migration the protected host does not use React. HeroUI offers two paths:
- React path: a React root per host page, with HeroUI components. The panel
pages (
quick-settings, notifications, tray menu, volume indicator) are separate documents with no ShadowRoot, so HeroUI works there as designed. The chat document is harder: its controls must stay in the outer document (the composer is the only send field and must stay out of the reach of the profile CSS, which acts in the ShadowRoot). A React root there needs the HeroUI CSS in the outer document, without preflight and in a layer belowhost.css, so it does not change controls that have not moved yet. - CSS-only path: the existing DOM and JavaScript keep their logic and get the HeroUI BEM classes and tokens. This gives the look of HeroUI without its behavior or React Aria accessibility.
Decision of the user (2026-11-02): the React path for every surface, one surface per phase. The CSS-only path is not used. The protected logic (tokens, approvals, typed routes) stays in plain modules that the React components call; the rewrite changes markup, not authority.
Recovery shares the chat document (/recovery serves index.html with
data-recovery=true). Recovery moves to React and HeroUI too, with these
rules, so a broken chat UI does not break it:
- Change of phase 1 (2026-11-02): the composer bundle
heroui-host.jsloads in every route ofindex.html, recovery included, becausehost.jsbinds the composer elements by ID when it starts and the composer has no plain fallback. A broken composer bundle therefore also breaks/recoveryuntil the recovery phase gives recovery its own document or bundle. The rules below still hold for the chat bundle of the conversation (phase 2). Resolved in phase 10:/recoveryis its own document and loads neitherheroui-host.jsnorhost.js. - Recovery has its own bundle, separate from the chat and host bundles, and it
shares no code path with
loadTrustedUI.host.jsnever imports the chat HeroUI bundle statically; it loads it by a guarded dynamic load, only whendata-recoveryis nottrue. host.jsruns in recovery today and holds the recovery logic (therecover-changehandler). The recovery phase moves this handler and the#recoverymarkup to the React recovery root and removes them fromhost.jsandindex.html; there is no plain fallback. The#change-recoverylink to/recoveryin the chat composer area stays with the chat.- A failed load of the chat HeroUI assets shows an error with a link to recovery, so the user can still reach recovery.
4a. Lock screen
The lock screen moves to React and HeroUI. A failure there locks the user out of the session, so these rules apply:
- Its own small bundle (React, a few HeroUI parts, its icons) and its own CSS,
served under the lock CSP (
script-src 'self'; style-src 'self') and the lock partition. It loads nothing from the chat or the host bundles. - The React form replaces the plain form and
lock-screen.js; there is no plain fallback. It posts to the same PAM route (/api/lock/unlock) with the same lock token. A broken lock bundle means no unlock in that login: the way out is a VT switch and the end of the session. Nested QA and a live check with the user before publish stand in for a fallback. - The React form owns the keyboard focus: it focuses the password field at mount, on window focus and on a click, as the plain page does, because only the lock content gets the keyboard in the lock scene (docs/lock-screen.md).
- The password rule of
lock-screen.jsstays: the page never stores the password. The React form uses an uncontrolled input read once through a ref, never React state, then clears the field and sends and zeroes the raw bytes the same way. - Fixed colors stay: the lock tokens map HeroUI to a fixed palette, never to the profile color.
- The tests of docs/lock-screen.md (unlock, refusal, several outputs) run against the React form.
4b. Approval dialogs and the change review card
- The schedule, theme and tool approvals keep the native
<dialog>andshowModal(), because the top layer and the inert rest of the document are part of the approval contract. The content inside the dialog becomes HeroUI (AlertDialog parts or Card, Button), with the portal container inside the dialog. Fixed colors stay. - The IDs that the approval tests use (
#tool-approval,#allow,#denyand the rest oftest-approval-browser.js) stay on the new elements. - No plain fallback. A broken host bundle leaves a pending approval with no answer until a fix; the turn waits, as it waits for any unanswered approval.
- The change review card becomes HeroUI with the other cards above the
composer. Its glass region (
#change-review) keeps its identity.
4c. Wallpaper
The wallpaper page has no controls; it draws on a canvas. It gets a React root
that owns the canvas element, so every page of the system is React, and the
drawing code of wallpaper.js stays. Its CSP (style-src 'self',
connect-src 'none') and its background throttling rule stay. The wallpaper
process runs for the whole session, so a React runtime there is a permanent
memory cost. The first phase that meets it measures it against the memory policy of
docs/web-shell-development.md; if the cost is not small, the user decides
whether the wallpaper keeps its plain page.
4d. Icons
The user asked to change the icons too. Today they are inline SVG paths in the
host pages and 54 SVG files from Yaru in host/quick-settings-icons (with
their COPYRIGHT). HeroUI itself ships no icon set; its docs import icons from
@gravity-ui/icons (MIT, React components, version 2.23.0 on 2026-11-02).
- Proposal: Gravity UI Icons for every system icon, imported one by one so the bundle carries only the icons in use.
- The first phase that meets it maps every current icon to a Gravity icon and lists the gaps. The levels of Wi-Fi signal, battery charge and volume need one icon per level; where Gravity has no match, the project draws its own SVG in the same grid and stroke, under the project license.
- Icons that come from applications stay as they are: tray icons (StatusNotifier pixmaps and theme names), application icons in the bar tabs and the launcher. They belong to the applications, not to the system UI.
- The Yaru files and their
COPYRIGHTleave the repository in the cleanup phase, when no page uses them, together with the/quick-settings-icon/route and its map incore/server.js, its allowlist entry and its use inscripts/test-palette-browser.js. Done in phase 9 (the top bar was the last user).
5. Profile style.css customization
replace_ui edits only the profile style.css, which applies inside the chat
ShadowRoot. Rules:
- The React components keep the documented classes and IDs of
docs/css-structure.md(.chat-message,.message-markdown,.inline-surface,.surface-pin,#messages,#pinned,#trusted-ui-body) throughclassNameon the HeroUI parts, so existing profiles keep working. - New HeroUI classes (
button,card,data-slot) are an addition, not a replacement.docs/css-structure.mdlists them when a surface moves. - The legacy aliases (
--accent,--background,--panel,--text,--muted) stay. Note that--accentand--backgroundare also HeroUI token names; the mapping below sets them to the same values, so a profile that sets--accentchanges the HeroUI accent inside the chat as well. That is the current meaning of the alias.
6. Shared palette and profile color
docs/color-palette.md is the contract. HeroUI must take its colors from the
--color-* roles, never from its own defaults:
| HeroUI token | Project role |
|---|---|
--background |
--color-background |
--foreground |
--color-text |
--surface |
--color-surface |
--muted |
--color-muted |
--accent |
--color-accent |
--accent-foreground |
--color-on-accent |
--accent-hover |
--color-accent-hover |
--danger |
--color-error |
| border and separator tokens | --color-border |
| default control and hover tokens | --color-control, --color-hover |
- The mapping lives in
host/theme.css, in a layer above the HeroUIthemelayer, on the same selectors that HeroUI uses (:root,:host,.dark,[data-theme=dark],[data-theme=light]). The panel pages already setbody[data-theme=dark|light], which HeroUI also reads; without the mapping on those selectors, the HeroUI light and dark blocks onbodywould override a mapping on:root. - HeroUI derives hover and surface levels with
color-mix(). Derived tones are not inprofileTones(), so they have no AA guarantee. Map every token that carries text or a focus ring to a generated role, and extendscripts/test-palette-browser.jsto check AA for the HeroUI tokens in both modes and for the preset profile colors. - The lock screen and the approval dialogs keep fixed colors. Their HeroUI tokens map to a fixed palette, never to the profile color or Matugen.
7. Compositor glass regions
The host measures DOM rectangles and border radii and sends them to Smithay
(docs/web-panels.md; workspace-zoom.js measureBarGlass,
measureChatGlassRegions; workspace-previews.js measureOverviewPlanes).
Rules for a moved surface:
- Keep the measured elements and their identities:
#conversation-bar,.composer-shell,#change-review,#profile-color-onboarding, the#messages > articlebubbles,#workspace-overview-list,.workspace-cardand.workspace-card-previewwithdata-workspace-id. A HeroUI component takes these asidandclassNameon its root part. - The measured element must own the visible radius. If a HeroUI
Carddraws the rounded background on an inner slot, the region and the drawing do not match. - HeroUI surfaces draw an opaque
--surfacebackground and shadows by default. On a glass element the background stays the translucent--glass-*value, or the blur behind it is hidden. - The source tests (
workspace-overview-css.test.js,bar-spacing.test.js,overview-planes-host.test.js) move with each surface.
8. Accessibility and language
- React Aria gives keyboard and screen reader support that the hand-written controls lack in places (the model picker combobox, the tray submenus, the settings toggles). This is the main functional gain.
- The UI is in Portuguese. Each React root sets
I18nProvider locale="pt-BR"(or the system locale), so the built-in strings of React Aria (close, dismiss, selected) match. The first phase that meets it checks how many locale strings the bundle carries and whether only pt-BR and en-US can be kept. - Existing labels,
aria-*attributes and live regions stay. The browser tests that assert on them stay green in each phase.
9. Content Security Policy
The host CSP is style-src 'self' 'nonce-...' with no 'unsafe-inline'.
React sets the style prop through the CSSOM, which the CSP allows. A library
that inserts a <style> element without the nonce is blocked. The first phase that loads HeroUI records
securitypolicyviolation events for every component in use; a component that
needs 'unsafe-inline' does not move.
10. Authority boundaries
The migration changes markup and styles only. It does not change:
- the isolation of generated HTML (opaque iframes, no HeroUI, no host tokens);
- the isolated plugin panels (user-owned files, no HeroUI from the checkout);
- the protected routes, approvals, tokens and window declarations;
- the native
<dialog>top layer of the approval dialogs.
What moves and what stays
| Surface | Decision | Reason |
|---|---|---|
| Conversation (React) | Moves: Button, Tooltip, Card for the pin button, message marker and inline surface header | Already React; small and low risk |
| Volume indicator | Moves | Own document, no input, smallest test of the panel path |
| Notifications and notification center | Moves: Card, Button, Switch, ScrollShadow | Own documents |
| Tray menu | Moves: Menu or ListBox with submenus | Own document; React Aria fixes keyboard navigation of submenus |
| Quick settings | Moves: Slider, Switch or ToggleButton, Disclosure, Button | Own document; largest panel |
| Settings dialog | Moves: Switch, Select, Slider, ColorSwatch, Disclosure inside the existing <dialog> |
Many form controls |
| Model picker | Moves: ComboBox | Keyboard and screen reader gain |
| Composer | Moves last: TextArea, Button, Tooltip | Only send field; touches glass measurement and focus rules |
| Bottom bar and top bar | Moves last: Tabs, Button, Badge, Tooltip | Glass pill measurement and native slide timing |
| Workspace overview | Moves last, cards only | Live planes depend on the exact card rectangles |
| First-run color card, memory notice | Moves with the composer | Measured glass regions |
| Change review card | Moves with the composer: Card, Button, Disclosure | Measured glass region |
| Approval dialogs (schedule, theme, tool) | Moves: HeroUI content inside the native <dialog> |
Fixed colors and the top layer stay (section 4b) |
| Lock screen | Moves | Section 4a |
| Recovery | Moves, own bundle | Section 4 |
| Wallpaper | Moves: React root around the canvas | Section 4c |
| Icons | Move to Gravity UI Icons | Section 4d |
| Generated HTML, isolated plugins | Stay | Not system UI; the model and the user own them |
Migration phases
Decisions of the user on 2026-11-02: no setting ("heroui não tem settings, só
deve existir ela implementada") and no safeguard ("sem safeguard, só seguir").
Each phase replaces the old surface in the same commit and deletes the old
code. The rollback of a phase is a git revert of its commits and a sync of
the active checkout, effective at the next login. Each phase has the gates, the
review rounds and nested QA (scripts/nested-qa.py), then a publish to main
and scripts/sync-active-checkout.py.
The measurements that the first draft gave to a separate spike (sizes, the
@property result in Electron, portals and focus in the ShadowRoot and in a
modal <dialog>, CSP violations, AA contrast, the icon map, the wallpaper
memory) are done in the phase that first meets each one, and recorded in the
work log of that phase.
Phase 1: foundation and the composer
The user asked on 2026-11-02 to move the chat composer first ("usar logo os componentes do heroui"). This phase therefore has:
- the dependencies (
@heroui/react,@heroui/styles, the React Aria peers,tailwindcss,@gravity-ui/icons), pinned; - the Tailwind build in
build-ui.jsand the committed HeroUI assets, with their routes and allowlist entries; - the token mapping in
theme.css; - the first React root in the outer chat document, a classic script that
index.htmlloads beforehost.jsin every route (recovery and the bars too, see section 4), with the outer HeroUI CSS in layers belowhost.css; - the composer in HeroUI (TextArea, Button, Tooltip, the capture chip), with
.composer-shellmeasurable for the glass regions, the same 58 px height and 20 px radius, and the IDs thathost.jsand the tests use.
The dock classes belong to the canvas chat work, which published first and
removed #chat-dock-toggle and the collapsed canvas look on 2026-11-02.
Phase 1 result (2026-11-02)
Done:
- Dependencies, pinned in
web-shell/package.json:@heroui/reactand@heroui/styles3.2.7,react-aria-components1.22.1,react-aria3.53.1,@react-aria/utils3.34.1,@react-aria/ssr3.10.1,@internationalized/date3.12.4,@gravity-ui/icons2.23.0, and for the buildtailwindcssand@tailwindcss/node4.3.3. No@tailwindcss/oxide: the build scans no sources (below). - Build:
web-shell/scripts/build-heroui-host.js, called bybuild-ui.js(npm run build,build:check). esbuild bundlesui-src/host/composer.jsx(IIFE, minified, production, chrome120, license texts of every bundled package in the header) tohost/heroui-host.js.@tailwindcss/nodecompilesui-src/host/heroui-host.csstohost/heroui-host.csswith no utility candidates and no polyfills. Both outputs are committed. Note: the login preparation ofscripts/prepare-project.pyrunsnpm run buildandnpm run check, so it still runs this Tailwind build; the runtime only reads the committed files. - CSS scope: no Tailwind preflight, no HeroUI
base.css(its universalborder-colorrule) and no HeroUIvariables.css(itscolor-schemeon:rootandbody[data-theme]). The output has only:root,:hostcustom properties,.button,.textareaand.tooltiprules, keyframes and 17@propertyrules;test/ui-build.test.jsenforces this. Utilities from a source scan were left out because.sr-only,.hiddenand.contentswould also match host elements. - Tokens:
host/theme.cssmaps the HeroUI tokens to the--color-*roles on:root,:hostinshell-theme. Without the HeroUI theme there is no HeroUI block on[data-theme]to beat, so the other selectors are not needed. - Composer: React renders it into
#composer-rootinside.composer-shellwithflushSyncbeforehost.jsruns. HeroUI TextArea, Buttons, Tooltip on the icon-only buttons, Gravity UI icons,I18nProvider locale="pt-BR".host/composer-state.jsis the store thathost.jsandvoice.jswrite (send, stop, show to the agent, voice, capture chip); the textarea value, focus, height, placeholder and ARIA state of the app search stay withhost.js. React Aria handles Enter and Space without a DOM click, so the plain buttons repeat a keyboard press as a DOM click and theonclickhandlers ofhost.jsandvoice.jskeep working. #chat-dock-toggleis not part of the React composer. The canvas chat work removed it from main on 2026-11-02, and the rebase of phase 1 dropped its plain markup and the dock code in the composer handlers.- Routes
/heroui-host.js,/heroui-host.cssand/composer-state.jsin the core asset map and the Electron allowlist ofdesktop.cjs.
Measured:
| Asset | Raw | gzip -9 |
|---|---|---|
host/heroui-host.js |
372,180 B | 113,932 B |
host/heroui-host.css |
20,847 B | 2,973 B |
Both are inside the budget (+150 KB gzip JavaScript, +80 KB CSS). The bundle
carries its own React, separate from trusted-ui.js. The first render time
and the renderer memory in Electron were not measured.
@property: the 17 registrations sit in the outer document, where Chromium honors them. The composer drops the HeroUI rings, so no visible style of this phase depends on them; the ShadowRoot case stays for phase 2.- CSP: React Aria inserts one
<style>for pressable elements and the CSP blocked it in the first browser run. The bundle now setswindow.__webpack_nonce__frombody[data-nonce], the nonce lookup of React Aria, and the run had nosecuritypolicyviolationevents. - Hover tooltips of React Aria show only after a pointer interaction (a click) has set the input modality; keyboard focus shows them too.
Phase 2: conversation controls
The pin button, the message marker tooltip and the inline surface header in
app.jsx, with the HeroUI assets inside the ShadowRoot. test-ui-browser.js
keeps its selectors. Its harness builds its own ShadowRoot and injects the CSS
as one nonce <style>, without loadTrustedUI, so it also gets the HeroUI CSS,
the portal container, enableShadowDOM() and the @property fix.
Phase 2 result (2026-11-02)
Done:
- The pin button of the inline surface and of the pinned column is a HeroUI
Button (
variant="ghost",size="sm", class.surface-pin). The inline control keepsaria-pressedand is disabled at the limit of four pins; the column control unpins. The labels stay text ("Fixar", "Fixado", "Soltar"), because the plain button had no icon. React Aria does not passtitle, so an effect sets the title with the pin limit on the element. - Each message marker is a HeroUI Button (
.message-marker, icon-only) with a HeroUI Tooltip for the preview (.message-marker-preview,placementright, 10 px offset, no open delay, 120 ms close delay). React Aria places the preview; a layout effect setscrossOffsetso the preview stays insidemain, as the plain code did, becausemainends above the composer and#trusted-ui-bodyclips. A scroll ofmainor of the rail and a resize still close the preview. Moving the pointer onto the preview closes it now (React Aria tooltips are not hoverable); the plain preview stayed open. - The surface heading keeps a plain
h3. A HeroUI Card puts padding, a gap and a surface on its root; even the transparent variant keeps the padding, which would change the measured bubble. - The bubbles,
MessageMarkdown,SurfaceFrameand the IDs and classes of section 5 are unchanged.
One React runtime (the "Also noticed" of phase 1): heroui-host.js now has a
first module, ui-src/host/shared-runtime.js, that exposes React, the JSX
runtime, createRoot, createPortal, flushSync, I18nProvider,
UNSAFE_PortalProvider, Button and Tooltip on a frozen, non-writable
window.AgentNativeReact. build-ui.js resolves react and
react/jsx-runtime of the Markdown bundle to that global, so ui/app.js
carries only react-markdown, remark-gfm and the application. The merge is
needed, not only cleaner: a HeroUI part works only with the React that
renders it. The profile contract and core/store.js validate do not
change; app.js still has the "compiled from ui-src/app.jsx" marker, and the
license header of app.js now lists the packages that its bundle really
carries. composer.jsx renders only when #composer-root exists, so the
browser harness can load the runtime without a composer. Consequence: the
conversation UI depends on heroui-host.js, as the composer already does.
ShadowRoot findings:
- CSS:
loadTrustedUIlinks/heroui-host.cssbefore/trusted-ui.cssin the ShadowRoot. The asset, its route and its allowlist entry already exist, and its rules (.button,.textarea,.tooltip) cover the parts of this phase, so there is no new asset. Its:root,:hostblock declares only Tailwind sizes, radii and easings, none of the mapped tokens ofhost/theme.css, so the:hostrule in the ShadowRoot does not reset the palette mapping, which inherits from the outer:root. @property: Chromium ignores the copy inside the ShadowRoot, but the outer document loads the sameheroui-host.css, and a registration is per document. The--tw-*initial values therefore reach the ShadowRoot (--tw-ring-shadowcomputes to0 0 #0000on a pin). No build step and no extra outer stylesheet are needed while both use the same file.- Overlays: the trusted UI wraps its root in
UNSAFE_PortalProviderwith a.chat-overlayscontainer in#trusted-ui-body. The preview renders there (no tooltip indocument.body), androle=tooltip,aria-describedbyand Escape work. enableShadowDOM()(react-stately/private/flags/flags, now pinned asreact-stately3.51.0) runs once in the shared runtime. Without it, React Aria readsdocument.activeElement(the shadow host) and a keyboard focus on a marker opens no preview; the harness check "keyboard focus opens accessible preview" failed in a build without the flag and passes with it. The flag is global; the composer tests stay green.- Hover tooltips open only when the interaction modality is a pointer, which a
pointermovesets. A real mouse always moves first.test-ui-browser.jsnow sends apointermovebefore the syntheticpointerover, and aTabkeydown before the keyboard focus. - CSP: no
securitypolicyviolationin the host page with the conversation, four pins, the pin limit and the marker previews; the nonce of phase 1 covers the<style>of React Aria in the ShadowRoot too. - Cascade: the unlayered
ui-src/style.csskeeps the plain size and look of.surface-pin(height: auto, so it stays 30.4 px and not the 32 px of a small HeroUI button) and of the markers, and both drop the HeroUI focus ring in favor of the existing:focus-visibleoutline. The bareh3rule is now.surface-heading h3. The disabled pin keepspointer-events: auto, so its title shows. HeroUI behavior remains: flex centering, the press scale and the transitions.
Measured:
| Asset | Before | After | gzip -9 after |
|---|---|---|---|
ui/app.js |
407,484 B | 205,512 B | 56,621 B |
host/heroui-host.js |
372,180 B | 372,723 B | 114,149 B |
host/heroui-host.css |
20,986 B | 20,986 B (unchanged) | 3,041 B |
ui/style.css |
12,369 B | 13,320 B |
The chat document loads about 202 KB less JavaScript and one React copy less. The first render time and the renderer memory in Electron were not measured.
Phase 3: volume indicator, then notifications
The React path for panel pages, proven on the smallest panel first, then the notification panels.
Phase 3 result (2026-11-02)
Done:
volume-indicatorand the two notification panels (notifications,notification-center) are React and HeroUI. The plain markup and the plain scripts are gone; there is no fallback.- Volume indicator: a Gravity UI icon (
VolumeFill,VolumeXmarkFillwhile muted) and a HeroUI Meter (role=meter,aria-valuetext"55%" or "Mudo") with.track,.filland.value. No input, as before. The meter has no width transition, so the first frame of the window shows the new value. - Notifications: each entry is a HeroUI Card rendered as the
li.card(same classes,data-urgency,data-id), with HeroUI Buttons for the close button (Gravity UIXmark, icon-only,aria-labelandtitleas before) and the action buttons. Do Not Disturb is a HeroUI Switch: the iddo-not-disturbis on itsinput[role=switch], the title on its root.dnd. Clear all is a HeroUI Button#clear-all.flatwith the Gravity UITrashBinicon. React renders every notification string as text. No ScrollShadow: it adds a scroll container inside<main>, which would change the height thatPanelWindowsfits; the history scrolls as before. - Behavior: the reads, the actions, the event streams, the polls, the timers,
the theme sync and the
anos-panel:visible|hiddenmarkers are the same code. The changes: Do Not Disturb is a switch, so the keyboard toggles it with Space and not with Enter; a changed notification keeps its element and its focused button (React keeps the element), where the plain code replaced the element and focused the button again.
The panel pattern (for phases 4 and 5):
- Shared runtime.
ui-src/host/panel-runtime.jsbuilds tohost/heroui-panel.js, a classic minified script that sets the frozen, non-writablewindow.AgentNativePanel(React, the JSX runtime,createRoot,flushSync,I18nProviderand the HeroUI parts in use:Button,Card,Meter,Switch). It sets noenableShadowDOM(), because a panel page has no shadow tree. A protected panel page has the CSP thatcore/server.jssends on every response (style-src 'self' 'nonce-...'), so React Aria needs the nonce for its<style>of pressable elements:web-panels.cjsrenderreplaces__NONCE__inbody[data-nonce]with the core nonce, and the runtime setswindow.__webpack_nonce__from it, as the chat document does. Without it the CSP blocks that<style>in the notification panels (review round 1 finding). - Shared CSS.
ui-src/host/heroui-panel.cssbuilds tohost/heroui-panel.css, with the rules ofheroui-host.css: every rule in a layer, no preflight, no HeroUI base layer, no HeroUI default theme, no utility scan. Only the component CSS of the parts in use. - Per-panel entry.
ui-src/host/<panel>.jsxbuilds tohost/<panel>.js, thejavascriptfile of the panel inprotectedPanelsofcore/web-panels.cjs, so the core serves it at/web-panel-assets/<id>/app.jsas before andweb-panels.cjsdoes not change. It is an ES module, not minified, that importsreact,react-dom,react-aria-componentsand@heroui/react/<part>as usual. The build (panelModulesinbuild-heroui-host.js) resolves those imports towindow.AgentNativePanel, so the module carries only its own code and its Gravity UI icons. A named import that the runtime does not expose fails the build. The build puts a guard first in each module: if/heroui-panel.jsdid not load, the module throws an error that names it, and the panel stays empty (no plain fallback)./system-typography.jsand/wallpaper-theme.jsstay imports by route. - Page. The
<body>carriesdata-nonce="__NONCE__"withdata-token. The HTML links/theme.css, then/heroui-panel.css, then its own unlayered CSS, and loads<script src="/heroui-panel.js">before its module. It keeps a static<main>:PanelWindowsmeasuresdocument.querySelector('main')to fit the window, and the glass radius rule targetsbody[data-glass="true"] main. React renders the content of<main>withflushSync, so the DOM is ready before the page writesanos-panel:visible; the plain code keeps the<main>and<body>attributes. - Look. The panel CSS stays unlayered and wins over the HeroUI layers: it
keeps the plain sizes (
height: autoon the text buttons, 24 px close button,display: blockon the Card) and drops the HeroUI focus ring withbox-shadow: none, so the:focus-visibleoutline stays. - Wiring. Routes
/heroui-panel.jsand/heroui-panel.cssin the asset map ofcore/server.js, the same two in the Electron allowlist ofdesktop.cjs,panelEntriesin the build, and the generated files in.prettierignoreand the ESLint ignores.
To move a panel: add its HeroUI parts to panel-runtime.js, panelModules
and heroui-panel.css; write ui-src/host/<panel>.jsx; add the name to
panelEntries; change its HTML as in step 4; delete the plain script.
Measured (raw, gzip -9):
| Asset | Before | After |
|---|---|---|
host/heroui-panel.js (shared) |
none | 352,300 B, 106,474 B |
host/heroui-panel.css (shared) |
none | 20,334 B, 3,328 B |
host/volume-indicator.js |
4,738 B, 1,890 B | 10,305 B, 3,959 B |
host/notifications.js |
10,707 B, 3,764 B | 16,200 B, 5,395 B |
host/volume-indicator.css |
1,760 B | 1,867 B |
host/notifications.css |
5,436 B | 6,137 B |
Each panel document loads about 110 KB gzip more than before (the shared runtime, its CSS and a larger module), within the panel budget of section 2. Memory, headless Chromium (not Electron), median of five fresh loads, JS heap after a forced GC: volume indicator 1,206 KB to 2,607 KB, notification center (three entries) 1,235 KB to 3,188 KB, popups 1,234 KB to 3,010 KB. That is about +1.4 to +2 MB of JS heap per panel renderer, about +5 MB for the three panels of this phase. The renderer RSS and the first render time in Electron were not measured.
Phase 4: tray menu
Phase 4 result (2026-11-02)
Done:
tray-menuis React and HeroUI, with the phase 3 panel pattern: the entryui-src/host/tray-menu.jsxbuilds tohost/tray-menu.js(thejavascriptfile of the panel, served at/web-panel-assets/tray-menu/app.jsas before), the page loads/heroui-panel.cssand/heroui-panel.js,body[data-nonce="__NONCE__"]gives the core nonce, and the module starts with the build guard. The plain script is gone; there is no fallback.- New parts in the shared runtime: the HeroUI
Menu(withMenu.ItemandMenu.Section),Separator, andTextof React Aria Components (the label slot of an item). Their CSS (menu,menu-item,menu-section,separator) is inheroui-panel.css, in the components layer. - The panel is itself the popup, so it renders one HeroUI Menu without a
trigger, without a Dropdown and without popovers. A React Aria submenu is
a popover outside
<main>; it would not fit the 300 px window and the host would not measure it. A submenu therefore still opens inline: an open submenu is aMenu.Section(section.tray-submenu,role=group,aria-labelthe label of its entry) right after its entry, inside the same menu, so one React Aria keyboard navigation covers every entry that shows, nested sections included (depth 8 is the core limit). - Roles: React Aria gives one role to every entry of a menu or section from
its selection mode, and a dbusmenu mixes plain, check and radio entries.
So each entry keeps its React Aria
role=menuitembehavior and sets its real role and state through therenderprop of the HeroUI item, from the menu data:menuitemcheckboxormenuitemradiowitharia-checked, andaria-haspopup="menu"witharia-expandedfor a submenu entry. The core state stays the only source of the check marks; React Aria selection is not used. - Keyboard: React Aria moves the focus with Up and Down (with wrap), Home and
End, skips disabled entries, adds typeahead by label, and runs an entry
with Enter or Space (one
onActionper press). The entry adds Right (open a submenu) and Left (close the submenu around the focus and focus its entry). Escape closes the panel from a capture listener on the document, before React Aria sees it. A new menu (a new serial, or the panel shown again) mounts a new Menu that focuses its first enabled entry; a re-read of the same menu keeps the element and its focus. As in the plain code, after each drawing the focus goes to the first enabled entry when no entry has it: a menu that first shows as loading and fills under the same serial, or a re-read that removes the focused entry (review round 1). - Icons: the check mark is the Gravity UI
Check, the radio markCircleFill(8 px), the submenu arrowsChevronRightandChevronDownin place of the text marks. The tray menu had no back button. The entry icons of the application (img.tray-entry-icon, data URLs from the core) stay as they are. - Unchanged:
<main class="tray-menu">(window fit, glass rule), the IDstray-menu-title,tray-menu-status,tray-menu-list,data-entryon each entry, the typed routes (/api/tray/menu,/menu/click,/menu/expand,/menu/close), the 500 ms poll, the close on hide, the theme sync and the text-only labels. No tray content reaches a model tool or generated HTML: the panel is a protected page with the host token, as before.
Behavior changes:
- An entry is a
div[role=menuitem](React Aria), not abutton; a disabled entry hasaria-disabled="true"and is not focusable, as before. - An open submenu is a labelled
role=groupsection of the one menu, not a nestedul[role=menu]. - A pointer over an entry focuses it (React Aria menus), and typing a letter moves to the next entry with that label.
- The plain code put the focus again on the same entry after each new drawing; React keeps the element, so the focus stays without that step.
Measured (raw, gzip -9):
| Asset | Before | After |
|---|---|---|
host/heroui-panel.js (shared) |
352,355 B, 106,495 B | 437,668 B, 131,005 B |
host/heroui-panel.css (shared) |
20,334 B, 3,311 B | 31,212 B, 4,406 B |
host/tray-menu.js |
8,715 B, 3,071 B (plain) | 13,817 B, 4,588 B |
host/tray-menu.css |
2,594 B, 949 B | 3,264 B, 1,200 B |
The tray menu document loads about 137 KB gzip more than the plain page, inside the panel budget of section 2. The shared runtime grew by about 24.5 KB gzip (the React Aria menu, collection and selection code), and the volume indicator and the notification panels load it too; their modules changed by a few bytes only. JS heap after a forced GC, headless Chromium (not Electron), median of five loads of a 12-entry menu: 1,843 KB plain, 4,808 KB HeroUI (about +3 MB). The renderer RSS and the first render time in Electron were not measured.
Proof: test/heroui-panels.test.js (browser, real CSP) and nested run
f9823461 with the Electron tray client (keyboard and mouse through the
submenu, the check mark, the radio mark, Escape); see the work log. Not
proved: the live session, a second monitor, a screen reader, GTK clients.
Phase 5: quick settings
May split in two: the main grid, then the submenus.
Phase 5 result (2026-11-02)
Done in one commit (the split was not needed; the commit passes the gates alone):
-
quick-settingsis React and HeroUI, with the panel pattern of phases 3 and 4: the entryui-src/host/quick-settings.jsxbuilds tohost/quick-settings.js(served at/web-panel-assets/quick-settings/app.jsas before), the page links/heroui-panel.cssand loads/heroui-panel.jsfirst,body[data-nonce="__NONCE__"]gives the core nonce, and the module starts with the build guard. The plain markup and script are gone; there is no fallback. -
New parts in the shared runtime: the HeroUI
Slider(withTrack,Fill,Thumb) andToggleButton. Their CSS (slider,toggle-button) is inheroui-panel.css, in the components layer. -
The four system sliders (volume, microphone, brightness, keyboard brightness) and the mixer slider of each stream are HeroUI Sliders. A drag keeps its own value (
onChange) and the release sends the typed change (onChangeEnd), as the plaininputandchangeevents did; a key press sends one change. React Aria keeps a realinput[type=range]visually hidden in the thumb. -
Every
aria-pressedcontrol is a HeroUI ToggleButton: the output and microphone mute, the Wi-Fi, wired, VPN and Bluetooth tiles, airplane mode, dark mode, the mute of each stream, and the rows of the audio devices, the VPN profiles and the power profiles. The other controls are HeroUI Buttons: the system row, the media controls, the submenu arrows, the back buttons, the refresh buttons, the network and device rows, the settings rows, the schedule actions, the session actions and the confirmation. -
The page keeps its state in plain variables and draws with
flushSyncthrough onerender(), as before. Unchanged: every typed route and body, the readback check, the one-read-in-flight refresh with the 80 ms burst timer, the event stream, the 15 s poll, the media generation, the list tickets, the stream lock, the lock and screenshot routes, the confirmation of the session actions with its Tab trap, the Escape order (confirmation, submenu, panel), the outside click and the close on hide. Escape and Tab now listen in the capture phase, before React Aria. -
Focus rule after redraws: a mutation disables the controls while it runs, which drops the focus; the page captures the focused control first and focuses it again after the redraw, by element, id or data key (
data-device-id,data-ssid,data-address,data-uuid,data-profile), as the plain code did. Opening a submenu focuses its back button; closing it focuses the control that opened it. -
Window fit:
<main>stays static and the host measures it. The submenu placement and themin-heightof<main>are the plain code (layoutMenu), and it now runs after every drawing, so a list that loads after the submenu opened also grows the window. -
IDs kept: every control ID of the plain page (
battery-toggle,screenshot-open,system-settings,power-toggle,media-*,audio-menu-open,schedules-open,output-muted,input-muted,wifi,wired,vpn,bluetooth,power-profile-toggle,airplane,dark-mode, the*-detaillabels, the submenu IDs and list IDs,confirmation,cancel-action,confirm-action,error,refresh-status), and the classes.quick-toggle,.toggle-main,.toggle-arrow,.icon-button,.extra-toggle,.schedules-open,.submenu,.menu-list,.network-row,.device-row,.stream-row,.schedule-row,.settings-row. A slider ID (volume,microphone,brightness,keyboard-brightness) is now on the slider group (role=group, with thearia-label); its input is#volume-0and the like. React Aria does not passtitle, so a ref sets the title of the screenshot button and of airplane mode.#power-profile-iconis gone (the icon is an SVG chosen by React). -
Look: the panel CSS stays unlayered over the HeroUI layers. Finding: the HeroUI slider sets
flex-direction: columnon a horizontal slider, so the track stretched to the 40 px row in the first nested capture;.quick-slidersetsflex-direction: row, and the browser test checks the 8 px track and the 16 px thumb.
Icons: the Yaru images of the panel are gone; it shows only Gravity UI icons and own SVGs.
| Yaru or inline icon | Now |
|---|---|
settings |
Gravity Gear |
shutdown |
Gravity Power |
| screenshot (inline SVG) | Gravity Camera |
| media previous, play, pause, next (inline SVG) | Gravity BackwardStepFill, PlayFill, PauseFill, ForwardStepFill |
volume (output mute, stream mute) |
Gravity Volume (50% or more), VolumeLow (below 50%), VolumeOff (0%), VolumeXmark (muted) |
microphone |
Gravity Microphone, MicrophoneSlash while muted |
brightness |
Gravity Sun |
keyboard-brightness |
Gravity Keyboard |
wired |
Gravity PlugConnection |
vpn |
Gravity ShieldKeyhole |
power-profile (balanced) |
Gravity ScalesBalanced |
power-profile-performance |
Gravity Speedometer |
airplane |
Gravity Plane |
dark-mode |
Gravity Moon |
| schedules (inline clock) | Gravity Clock |
text marks ›, ‹, ↗, ✓ |
Gravity ChevronRight, ChevronLeft, ArrowUpRightFromSquare, Check |
wifi, wifi-signal-{none,weak,ok,good,excellent}[-secure], wifi-off |
own WifiIcon: levels 0 to 4, a lock badge when secure, a slash when off |
bluetooth, bluetooth-off |
own BluetoothIcon, with a slash when off |
battery, battery-level-{0..100}[-charging] |
own BatteryIcon: one fill per 10%, a bolt cut out while charging or plugged |
power-profile-saver |
own LeafIcon |
Gaps in Gravity UI Icons 2.23.0: Wi-Fi (no icon at all, so no signal
levels), Bluetooth, battery (no icon and no levels) and a leaf for the power
saver profile. The own icons are in ui-src/host/system-icons.jsx, under the
project license, on the Gravity 16 px grid with a 1.5 px line and
currentColor. Phase 9 can reuse them for the top bar.
Not removed: the Yaru files, their COPYRIGHT and LICENSE-GPL-3.0, the
/quick-settings-icon/ route and its map in core/server.js, its Electron
allowlist entry and its use in scripts/test-palette-browser.js. The top bar
still uses them (host/index.html: notifications, wifi-off, bluetooth-off,
battery-level-100, volume, shutdown; host/status-bar.js: the battery
levels, the Wi-Fi and Bluetooth states and the volume). They leave in phase
9, with the top bar.
Behavior changes:
- The tile icons show state: Wi-Fi and Bluetooth show the off variant while off, the output and stream mute buttons show the volume level or the muted speaker, the microphone mute shows the slashed microphone, and the battery icon shows the charge in steps of 10% and the charging bolt. The plain icons were fixed images.
- Hidden parts (the battery button, the microphone and keyboard rows, the
wired and VPN tiles, the media card and its buttons, the submenus and the
confirmation) are not rendered, instead of
hidden.#errorkeeps thehiddenattribute and#refresh-statusstays hidden, as before. - The wired submenu and the power profile list draw from the snapshot on every redraw, not only when they open.
- The submenu layout runs after every drawing (above).
- A slider is a React Aria slider: Page Up, Page Down, Home and End also move it, and its focus ring is on the thumb.
- A mixer row that changes place in the list moves with the React reconciliation; the plain code moved a row only when its index changed.
- The Wi-Fi submenu shows one row per SSID: the active access point, else the one with the strongest signal. The core returns one row per access point, and the plain list showed each of them. A connect still uses the first match by SSID in the core.
- A slider that ends on its applied value (a press and release on the
thumb, or an arrow key at a bound) sends no change. React Aria calls
onChangeEndalso when the value did not change. - The battery icon shows the empty outline when the charge is unknown, as the label shows "--%".
Measured (raw, gzip -9):
| Asset | Before | After |
|---|---|---|
host/heroui-panel.js (shared) |
437,668 B, 131,005 B | 462,128 B, 137,881 B |
host/heroui-panel.css (shared) |
31,212 B, 4,406 B | 45,350 B, 5,778 B |
host/quick-settings.js |
36,472 B, 9,534 B (plain) | 83,462 B, 18,353 B |
host/quick-settings.css |
16,285 B, 3,344 B | 16,763 B, 3,637 B |
The quick settings document loads about 150 KB gzip more than the plain page (the shared runtime, its CSS and a larger module with about 25 icons), at the edge of the panel budget of section 2. The shared runtime grew by about 6.9 KB gzip and its CSS by 1.4 KB gzip (the slider and toggle button), which the other panel pages load too. The JS heap, the renderer RSS and the first render time in Electron were not measured in this phase.
Phase 6: settings dialog controls, then the model picker
With the portal container inside the settings dialog.
Phase 6 result (2026-11-02), settings dialog
Done:
- The controls of
#account-dialogare React with HeroUI, in two roots ofhost/heroui-host.js(ui-src/host/settings.jsx): the header (the title and the close button) in#account-header-root, and the sections in#account-root. The native<dialog>,showModal(), theprofile-notice-buttonandaccount-buttonhandlers and the MutationObserver on the dialog stay inhost.js. - The state is in
host/settings-state.js, a store shared throughglobalThis[Symbol.for("agent-native.settings-state")], likecomposer-state.js.host.jswrites the parts (account,profileColor,windowReading,windowStyle,windowControl,overviewPlanes,chatBlur,canvas), and React flushes each change withflushSync. A control calls one action by name (settingsStore.act(name, ...)), andhost.jsregisters the actions once. The protected routes, the tokens and the checks stay inhost.js:/api/profile-color,/api/overview-planes-enabled,/api/chat-blur-enabled,/api/canvas-enabled,/api/canvas-sharp-zoom-enabled,/api/workspace-outputs-enabled,/api/chat-dock-side, the window style, window reading and window control routes, and the ChatGPT login. The routes and their bodies did not change. - The
workspaceOutputssetting of output workspaces phase 4 (docs/multi-output-workspaces.md,/api/workspace-outputs-enabled) came in on the rebase as a plain<details>. It is now a Switch section with the same IDs (workspace-outputs-setting,workspace-outputs-enabled,workspace-outputs-feedback), the same hidden rule (both capabilitiesworkspaceOutputsandoutputChats) and the same route and body. (History: the setting, its route and this Switch were removed on 2026-11-03; workspaces on several outputs are always on.) - A generic
toggleSettinginhost.jsruns the five switches: it marks the part busy, shows "Aplicando…", calls the route, reverts the value on an error and then polls. - The controls: HeroUI Disclosure for the sections, Switch for overview planes, chat blur, canvas and sharp zoom, ColorPicker (a swatch trigger and a popover with ColorArea, a hue ColorSlider and a hex ColorField) for each color input, Select with ListBox for the selects, NumberField for the window height, and HeroUI Button for login, apply, reset, the window rows and the profile color swatches.
- Every ID that tests and browser harnesses use is kept:
account-*,profile-color-*,window-*,overview-planes-*,chat-blur-*,canvas-*,chat-dock-side. A switch carries its ID on itsinput[role=switch].profile-color-inputis now on the color trigger button. - Icons: Gravity
Xmark(close and remove),ChevronDown(section indicator),Check(selected option),MinusandPlus(number field). - The new asset
/settings-state.jsis incore/server.js, in thedesktop.cjsallowlist and intest/http.test.js. - Tests:
web-shell/test/heroui-settings.test.js(the realindex.htmlunder the core CSP, with a driver in place ofhost.js) and the canvas tests oftest/host-script.test.js, which now runrenderCanvasSetting,settledValueandtoggleSettingagainst a stub store.
Findings:
- Portal:
UNSAFE_PortalProvidersends every overlay of the dialog (the Select popovers and the color picker popovers) to#account-overlays, a child of the<dialog>outside the scroller.account-scroll. The dialog now haspadding: 0andoverflow: visible, and.account-scrollholds the old padding, the scroll and the maximum height, so a popover is in the top layer of the dialog and is not clipped. The test checks that the Select popover is in#account-overlaysand that it passes a hit test. - Escape in an open popover closes only the popover. The dialog stays open and the focus goes back to the trigger. Escape with no popover closes the dialog, as before.
- React Aria Disclosure does not put its
idon the DOM (it is the key in a DisclosureGroup), so a<section id class>wraps each Disclosure. - React Aria drops
title; a ref effect sets it on the swatches. - ColorSlider with
channel="hue"needscolorSpace="hsb". Without it the render throws "Unknown color channel: hue" and React unmounts the whole settings root. - Each color picker keeps its own color and writes only the hex to the store, so the hue stays at saturation 0 or brightness 0. It writes the store after the hex field commits: the store flushes React at once, and inside the commit the field would write its old text back.
- A cleared window height field sends nothing; the last valid height stays. The height field also writes the store after its commit, for the same reason as the color pickers.
- The HeroUI button
box-shadowis turned off inside the dialog, except on the profile color swatch, which draws its pressed ring withbox-shadow. - The locale strings: React Aria imports the strings of about 34 locales.
The build plugin
chatLocales(build-heroui-host.js, only forheroui-host.js) keeps pt-BR and en-US and resolves every other/intl/<dir>/<locale>.mjsfile to en-US. The settings roots useI18nProvider locale="pt-BR". - The profile color does not add HeroUI tokens: the tokens already map to
the
--color-*roles oftheme.css. The palette check (scripts/test-palette-browser.js,#check) passes in dark, light, matugen-dark and matugen-light.
Behavior changes:
- The sections are HeroUI Disclosures. A press on the heading opens or
closes a section, as the
<summary>did; the indicator is the Gravity chevron. - A hidden section (overview planes, chat blur, canvas, sharp zoom) is not
rendered, instead of
hidden. - A color input is a swatch button that opens a popover with an area, a hue slider and a hex field, in place of the native color input of the system.
- The window height is a NumberField from 24 to 56 with minus and plus buttons; it clamps a typed value to the bounds.
- The window style draft lives in the store until "Aplicar". The profile color draft lives in the store until "Salvar".
- The remove button of a saved profile color shows the Gravity
Xmark. - The dock side select (
chat-dock-side) is not rendered: the side setting is hidden since the floating chat (docs/canvas-windows.md, phase 5), as before. - A switch toggles with Space and with a press on the control.
Measured (raw, gzip -9):
| Asset | Before | After |
|---|---|---|
host/heroui-host.js |
372,723 B, 114,134 B | 611,568 B, 182,825 B |
host/heroui-host.css |
20,986 B, 3,025 B | 95,141 B, 9,507 B |
host/settings-state.js |
none | 3,072 B (new) |
host/host.js |
114,932 B | 112,265 B |
host/host.css |
85,982 B | 88,155 B |
host/index.html |
28,637 B | 21,028 B |
Without the locale plugin, heroui-host.js was 673,262 B (198,295 B gzip).
The chat document now loads about 115 KB gzip more JavaScript than the
pre-migration app.js, inside the +150 KB budget of section 2. The raw CSS
grew by about 74 KB in this phase (6.5 KB gzip): the color, select, number
field, disclosure and switch styles of HeroUI. The raw CSS of the chat
document is now above the +80 KB note of section 2; the gzip size is
9.5 KB. The first render time and the renderer memory in Electron were not
measured in this phase.
Phase 6 result (2026-11-02), model picker
Done:
- The model picker is React with HeroUI (
ui-src/host/model-picker.jsx, inhost/heroui-host.js). It renders into#model-picker-root, adisplay: contentschild of the plain.model-row: a HeroUI Button#model-selectwith#model-labeland the GravityChevronUp, and a HeroUI Popover with the dialog#model-picker. The dialog holds a React Aria Autocomplete with a HeroUI SearchField (#model-search, GravityMagnifier), the count#model-countand a HeroUI ListBox#model-optionswith.model-optionitems (the name, the id insmall, and the GravityCheckon the current model). host/model-picker.jsis now the state: a store shared throughglobalThis[Symbol.for("agent-native.model-picker-state")]. host.js keepscreateModelPicker(select)andupdate(models, selected, disabled), and the select callback still calls the protected routemodeland shows the feedback in the plain#model-feedback. The route, the asset/model-picker.js, the Electron allowlist and the HTTP test did not change.- The search keeps its contract: combined terms on the name and the id, without case or accents, with the count and the empty state.
- Tests: a third browser test in
web-shell/test/heroui-settings.test.js(80 synthetic models): the label and title, the focus in the search field, the count, the selected option, the popover inside the viewport, the accent-free combined search, ArrowDown and Enter, the trigger disabled until the next poll, the empty state, Escape, a press on the current model, a click outside, a disabled update that closes the list, and an empty catalog.
Findings:
- A React Aria popover in
document.bodyis enough here: the model row is hidden in the workspace overview (host.css), so the picker never opens inside a modal dialog. The plain picker used a nativepopoverin the top layer. - React Aria positions the popover (
placement="top start", flip, 8 px container padding) and sets its maximum height from the free space. It replaces the plainposition()code and its resize and scroll listeners. - A search field clears its text on Escape. The plain picker closed at once, so an Escape key handler closes the list.
- React Aria acts on Enter only with a focused option. On open, or after the text is cleared, no option is focused, so the key handler takes the current model, else the first match, as the plain picker did.
- A disabled trigger also closes the list and clears the query; the list does not open again by itself when the trigger is enabled again.
Popover.Contentpasses itsidto the dialog inside it, so the dialog carries#model-pickerand.model-pickerand draws the panel, and.model-picker-popoveris a plain wrapper.- Chromium takes the focus from a focused button that becomes disabled. After a pick the trigger is disabled until the next poll, so the focus leaves it, as with the plain picker.
Behavior changes:
- The list uses virtual focus: the arrows, Home, End and Enter act on the list while the focus stays in the search field, as before. The arrows do not wrap from the last item to the first; the plain list wrapped.
- The pointer hover shows the HeroUI hover tone; the plain list moved the keyboard highlight on pointer move.
- The option ids are React Aria ids, not
model-option-<index>. - The open list filters the catalog of each poll; the store keeps the old array while the catalog is the same, so a poll does not render the list again.
Measured (raw, gzip -9; "before" is the settings commit of this phase):
| Asset | Before | After |
|---|---|---|
host/heroui-host.js |
611,568 B, 182,825 B | 629,046 B, 187,671 B |
host/heroui-host.css |
95,141 B, 9,507 B | 106,645 B, 10,293 B |
host/model-picker.js |
5,375 B, 1,833 B | 2,448 B, 1,046 B |
host/host.css |
88,155 B, 17,111 B | 89,055 B, 17,301 B |
host/index.html |
21,028 B, 4,863 B | 19,839 B, 4,642 B |
The chat document now loads about 119 KB gzip more JavaScript than the
pre-migration app.js, inside the +150 KB budget of section 2. The raw
HeroUI CSS grew by 11.5 KB for the search field; the raw CSS of the chat
document stays above the +80 KB note of section 2.
Phase 7: first-run card, memory notice and change review card
With the glass region checks.
Phase 7 result (2026-11-02)
Done:
- The first-run color card, the memory notice and the change review card
are React with HeroUI, in three roots of
host/heroui-host.js(ui-src/host/first-run-color.jsx,memory-notice.jsx,change-review.jsx). Each root renders into its plainsectioninindex.html(#profile-color-onboarding,#memory-notice,#change-review). The sections stay in the HTML with their IDs, classes, ARIA labels andhidden: the host measures two of them for the chat glass, andhost.jsshows and hides them, as before. - First-run card: it reads the
profileColorpart ofhost/settings-state.jsand uses theSwatchof the settings dialog (now exported, with anactionprop). The part has a new fieldfirstRunFeedback.host.jsregisters two actions,firstRunColor(onlyset) andfirstRunDone(onlydone, then the focus goes to the message field). The route/api/profile-colorand its bodies did not change. "Pronto" is a HeroUI Button with the GravityCheck. - Memory notice: a new store
host/memory-notice-state.js(summary, candidates, error, closing), shared throughglobalThis[Symbol.for("agent-native.memory-notice-state")].host.jsbuilds the rows (title and meta text) and registerscloseanddismiss, which callmemory/close {windowId, identifier}andmemory/dismiss {}as before. The rows are HeroUI Buttons with the GravityXmark("Fechar") andClock("Dispensar por 10 minutos"). The new asset/memory-notice-state.jsis incore/server.js, in thedesktop.cjsallowlist and intest/http.test.js. - Change review card:
host/change-review.jskeepscreateChangeReviewandupdate, the reads, the routes and the diff cache, and now writes a store (changeReviewStore,Symbol.for("agent-native.change-review-state")) instead of DOM nodes. React calls its actions:approve,askDiscard,cancelDiscard,discard,dismissOutcomeandloadDiff. The diff and each gate log are HeroUI Disclosures (.change-diff,.change-gate-log) with the GravityChevronDown; approve and discard show the GravityCheckandTrashBin. The section is the card: a HeroUI Card would draw the radius and the surface on an inner element, so it is not used. - Authority: every proposal string (title, summary, paths, diff, logs,
refusal and block reasons) is a React text child; the card has no
dangerouslySetInnerHTML. Approve and discard run only from a press on the card buttons.change-review.jsalso refuses an approval of a blocked card and a discard without the first press, as a second check behind the disabled button. - Tests:
test/change-review-host.test.jsnow tests the controller and the store (no DOM), with two new cases: a failed diff read, and a late diff answer for an older submission. The new browser testtest/heroui-composer-cards.test.jsruns the realindex.htmlunder the core CSP with a driver in place ofhost.js: the first-run IDs, swatches and actions; the memory rows, labels and actions; the review card with hostile markup in every field (no element is created), a blocked and a ready approval, the two-step discard, the focus and the open diff and log across a revision; and the chat glass regions. - Glass regions: the browser test measures
#change-review,#profile-color-onboardingand.composer-shellwith the realmeasureChatGlassRegions. It checks the order, that the measured elements are the same nodes after a new revision, the fields{x, y, width, height, radius}, that each region is the box of its element, and the radii 16, 16 and 20.
Findings:
- The HeroUI Disclosure body puts its
classNameon the inner element; the outer.disclosure__bodyhas the padding, sohost.csssets.change-review .disclosure__body { padding: 0 }. - The Disclosure trigger is a
buttonand takes the hostbuttonrule;.change-section-triggermakes it read like the oldsummary(transparent, no padding, inherited size), with the chevron at the end, as in the settings dialog. - The diff read writes the store, which flushes React with
flushSync. The read starts in aqueueMicrotaskafter the effect that sees an open diff, not inside the effect (the lesson of phase 6). - The store holds one diff, so
change-review.jsdrops a late answer for an older submission; it cannot replace the diff of a newer one.
Behavior changes:
- The diff and the gate logs open with a press on a HeroUI Disclosure
trigger (Enter or Space with the keyboard), with a chevron at the end of
the line, in place of
detailsandsummarywith the marker at the start. - A new revision renders into the same elements, so the focus, the scroll and the open sections stay without the plain code that saved and restored them. An open diff or log closes when the card closes (no proposal), as before.
- A failed diff read is read again when the diff opens again, or when a new revision arrives while the diff is open (as the plain card did).
- The buttons of the three cards carry Gravity icons.
- While a memory close runs, every button of the notice is disabled, as before; the rows are keyed by the window identifier.
Measured (raw, gzip -9; "before" is 5072cca):
| Asset | Before | After |
|---|---|---|
host/heroui-host.js |
630,246 B, 188,023 B | 640,841 B, 190,663 B |
host/heroui-host.css |
106,645 B, 10,293 B | 106,645 B, 10,293 B |
host/change-review.js |
10,822 B, 3,477 B | 6,776 B, 2,585 B |
host/memory-notice-state.js |
none | 1,855 B, 883 B (new) |
host/settings-state.js |
3,184 B, 1,250 B | 3,276 B, 1,294 B |
host/host.js |
116,452 B, 32,192 B | 114,019 B, 31,518 B |
host/host.css |
90,414 B, 17,564 B | 91,207 B, 17,746 B |
host/index.html |
19,839 B, 4,642 B | 18,794 B, 4,406 B |
No new HeroUI CSS: Button and Disclosure were already in the build. The
chat document now loads about 121 KB gzip more JavaScript than the
pre-migration app.js, inside the +150 KB budget of section 2.
Phase 8: approval dialogs
HeroUI content inside the native dialogs, with test-approval-browser.js
green on the same IDs (section 4b).
Phase 8 result (2026-11-02)
Done:
- The content of the tool, schedule and theme approvals is React with
HeroUI, in three roots of
host/heroui-host.js(ui-src/host/approvals.jsx). Each root renders into its native<dialog>inindex.html(#tool-approval,#schedule-approval,#theme-approval). The dialogs stay in the HTML with their IDs, classes and ARIA attributes, andhost.jsstill opens them withshowModal(), so they stay in the top layer and the rest of the document is inert. Each root has anUNSAFE_PortalProviderwith the dialog as the container; no part uses an overlay today. - A new store,
host/approval-state.js(Symbol.for("agent-native.approval-state")), holds one part per kind: the count, the error, the disabled state of the two buttons and the content.host.jskeepsapprovalDialog: the dialog, the 1.5 s arm delay, the focus on Recusar, the Esc refusal (thecancelevent of the dialog) and the answer. It registers one action per kind; a button calls only the answer of its own kind. The routesapprove,schedule-approvalandtheme/approveand their bodies did not change. The new asset/approval-state.jsis incore/server.js, in thedesktop.cjsallowlist and intest/http.test.js. - Permitir and Recusar are HeroUI Buttons with the Gravity
CheckandXmark. The tool name, the arguments, the message, the schedule text and prompt, and the theme name are React text children; the theme colors are validated#rrggbbvalues set through thestyleprop (CSSOM). A static test rejects HTML from a string inapprovals.jsx. - No HeroUI Card or AlertDialog part: the native dialog owns the surface, the radius and the fixed colors, and AlertDialog would open its own modal outside the native dialog.
- Fixed colors: the
--approval-*light and dark pairs ofhost.cssstay; no HeroUI token or profile color reaches the dialogs. scripts/test-approval-browser.jsexpected the theme answer{id, allow}. Since the output workspaces work (9ac3efb, 5c7a4b2) the host sends{id, allow, conversation}, and the core route/api/theme/approveaccepts it (it takesconversationandoutputout and checks the rest isallow,id). The harness now expectsconversation: 1.- Tests:
test/heroui-host.test.jsmounts the committed bundle in the realindex.htmland checks every approval ID inside its native dialog, theautofocuson each Recusar, the disabled Permitir at mount, hostile markup in every text field (no element is created) and that each button calls only its own kind.
Findings:
- HeroUI sets
pointer-events: noneon a disabled.button, so a click on a disarmed Permitir lands on.approval-actions, inside the modal dialog. The first commit turned the pointer events on again; review round 1 found that a press on the disabled button then left React Aria in a pressed state, and Permitir did not answer after it armed. The HeroUI rule stays, and the hit tests of the harness turn the pointer events on only for the measure. - React Aria does not pass
autoFocusto the element; a ref sets theautofocusattribute on each Recusar, soshowModal()picks it first, as before.host.jsstill focuses Recusar for each new request. - React Aria calls
onPressfor a pointer press, for Enter or Space on the focused button and for a DOMclick(), so no extra click binding is needed. - The answer stays bound to the request that shows: the content is written only for a new key (the tool id, the schedule id with its text, the theme id), together with the key, and a new key disarms Permitir for 1.5 s. The tool answer sends the id and the conversation of that request; the schedule and theme answers send the conversation of the chat, as before.
- Review round 1: each new request gets a generation in the store. A button
records the generation when its press starts, and
host.jsrefuses a press that ends after another request showed. React Aria also cancels a press when the button turns disabled, so the generation is a second guard. - Review round 1: after an answer succeeds, both buttons and Esc stay disabled for that request until the core state drops it. Before, the buttons came back between the answer and the next poll, and a fast second press answered the same id again (the plain dialog had this too).
Behavior changes:
- The buttons carry Gravity icons and are 36 px high (the HeroUI medium height) instead of about 38 px. At 409x520 with a long message the arguments box is 114 px high instead of 109 px.
- One answer per request (above), and a press held across a new request answers nothing.
- No other change: the focus, Enter, Esc, the arm delay, the count and the
overview raise behave as before.
test-approval-browser.jshas 21 checks and runs innpm test(test/approval-browser.test.js).
Measured (raw, gzip -9; "before" is b7437b1):
| Asset | Before | After |
|---|---|---|
host/heroui-host.js |
640,852 B, 190,670 B | 646,344 B, 192,026 B |
host/heroui-host.css |
106,645 B, 10,293 B | 106,645 B, 10,293 B |
host/approval-state.js |
none | 2,618 B, 1,170 B (new) |
host/host.js |
114,019 B, 31,518 B | 113,487 B, 31,588 B |
host/host.css |
91,207 B, 17,746 B | 91,765 B, 17,892 B |
host/index.html |
18,794 B, 4,406 B | 15,552 B, 3,777 B |
No new HeroUI CSS: Button was already in the build. The chat document now
loads about 123 KB gzip more JavaScript than the pre-migration app.js,
inside the +150 KB budget of section 2.
Nested QA: not run. A nested run has no provider, and every approval needs
one: a tool approval needs an OpenCode request, a schedule proposal lives
only in the memory of the core (not in the seeded state.json), and a theme
card needs an agent call and a shader compile. The browser harness with the
real core and host.js is the proof.
Phase 9: bars and the workspace overview
With the bar glass, the overview planes and the native slide timing. Needs a live check with the user (two monitors and gestures are outside nested QA).
Phase 9 result (2026-11-02)
Done:
- The bottom bar, the top bar, the system inspector and the workspace
overview are React with HeroUI, in new roots of
host/heroui-host.js:ui-src/host/bars.jsx(one root on#conversation-bar, one on#top-bar),ui-src/host/system-inspector.jsx(on#system-inspector) andui-src/host/workspace-overview.jsx(one root on theheaderof the nativedialog#workspace-overviewfor the close button, one on#workspace-overview-listfor the cards).index.htmlkeeps the empty containers with their IDs, classes and ARIA attributes. The overview stays a native<dialog>thathost.jsopens withshowModal(). - Three new stores, on the pattern of phase 1:
host/bar-state.js(Symbol.for("agent-native.bar-state"): tabs, new chat, layout, dots, metrics, clock, notifications, tray, panels, Wi-Fi, Bluetooth, battery, volume),host/inspector-state.jsandhost/overview-state.js. Each store renders withflushSync, so the DOM is current when the setter returns.host.js,status-bar.js,tray.jsandmetrics.jscompute plain text and write the stores; they keep every protected route call. Each new asset is incore/server.js, in thedesktop.cjsallowlist, intest/http.test.jsand intest/heroui-host.test.js. - The geometry paths did not change:
fitWorkspaceTabs,updateWorkspaceTabIndicator(the sliding active tab), the bar pill measure for the blur, the overview slot measure for the planes, the PNG preview painter and the plane card marks run after the store write, on the same elements. React keys the tabs, the dots and the cards by workspace id, so an element keeps its identity across renders, and the painted preview of a card stays. workspace-zoom.jsbuilds data in place of DOM:workspaceDots,workspaceOutputBadgeanddecorateWorkspaceTabreturn plain objects;renderWorkspaceDotsis gone.- The legacy indicators (a compositor without the top strip) are a store
flag: the bottom bar renders
#desktop-indicatorsat its end, with the date control last. Before,host.jsmoved the DOM nodes. - The buttons are HeroUI Buttons; the inspector is a HeroUI Disclosure in
place of
<details>. Conversation names, window titles, application ids, tray titles and panel titles are React text children or attributes only. A static test rejects HTML from a string in the three new files. - Icons: Gravity
Plus,Xmark,Bell,Power,ChevronDown,Check,CircleExclamationandCircleFill, and the own Wi-Fi, Bluetooth, battery and volume icons ofui-src/host/system-icons.jsx. Tray icons and application icons stay as they come. - The Yaru icons are gone:
host/quick-settings-icons(54 files, 122,874 B, withCOPYRIGHTandLICENSE-GPL-3.0), the/quick-settings-icon/route and its map incore/server.js(the path is now a 404), thedesktop.cjsallowlist entry and the uses inscripts/test-palette-browser.js,test/heroui-settings.test.jsandtest/heroui-composer-cards.test.js. - Tests: the new
test/heroui-bars.test.jsmounts the committed bundle in the realindex.htmlunder the core CSP with a driver in place ofhost.js. It checks the IDs, hostile markup in every untrusted field (no element is created), each action (tab select, close, context menu, new chat, dot, metric, tray activate, menu and wheel, card activate, close, inspector toggle), the refusal while blocked, the legacy layout and the kept card element.bar-metrics,host-script,workspace-menuandworkspace-zoomtests read the new data and the React source.
Findings:
- HeroUI
.buttonsets a fixed height and width,position: relative,isolation, a press transform, a transition,white-space: nowrap,user-select: noneand a focusbox-shadow. One zero-specificity block inhost.cssturns these off on the bar and overview controls, so the unlayered rules ofhost.csskeep the old geometry. With it, every tab, dot, metric, indicator and card rectangle of the browser harness is the same as before to 0.1 px. - HeroUI disables a button with
pointer-events: none. A workspace dot refuses a click during a switch witharia-disabledand must not dim, so the dot rule turns the opacity and the pointer events back on; the press handler checks the blocked flag. - React registers
wheellisteners as passive. The tray item adds a native non-passive listener, so the wheel over a tray icon still stops the page scroll and the workspace wheel of the bar. - The tray action needs the screen point of the click: the tray item uses
onClick, notonPress. React Aria calls it for a keyboard press too, with a point of 0, 0, as the plain button did. - The Disclosure heading is an
h3, so the trigger sets its weight to 400.
Behavior changes:
- The volume icon shows the level (muted, zero, below 50%, 50% and up) in place of one speaker. The battery icon of an unknown charge is an empty outline. Wi-Fi uses the own icon with the signal level.
- The inspector trigger has a chevron, so it is about 16 px wider (267 px in place of 251 px at 1280 px); the dashboard stays at the same place.
- The overview close button shows a 20 px Gravity
Xmarkin place of the×text, at the same size and place. The activity chip of a card shows a Gravity icon in place of a text glyph; the chip is up to 5 px wider. - The terminal icon of a tab is a JSX copy of the launcher icon.
- A disabled tab or card has
pointer-events: none(HeroUI).
Measured (raw, gzip -9; "before" is bb1ed9d):
| Asset | Before | After |
|---|---|---|
host/heroui-host.js |
646,494 B, 192,070 B | 671,075 B, 198,192 B |
host/heroui-host.css |
106,645 B, 10,293 B | 106,645 B, 10,293 B |
host/bar-state.js |
none | 3,816 B, 1,614 B (new) |
host/inspector-state.js |
none | 2,234 B, 1,043 B (new) |
host/overview-state.js |
none | 2,084 B, 971 B (new) |
host/host.js |
114,159 B, 31,778 B | 107,828 B, 30,412 B |
host/host.css |
91,588 B, 17,834 B | 93,106 B, 18,301 B |
host/index.html |
15,552 B, 3,777 B | 8,216 B, 2,466 B |
host/quick-settings-icons |
54 files, 122,874 B | removed |
No new HeroUI CSS: Button and Disclosure were already in the build. The
chat document loads about 131 KB gzip more JavaScript than the
pre-migration app.js, inside the +150 KB budget of section 2.
Nested QA (nested proof only, run 275dc0ce, one output, a private session
bus, no provider): the top bar (dots, CPU and RAM, date, clock, bell,
power) and the bottom bar (four tabs, the sliding active tab, the new chat
button) rendered; a conversation named with markup showed as text. A click
on tab 2 switched to workspace 2 and moved the active tab and the dot. A
click on dot 4 switched to workspace 4. The wheel over the bottom bar went
to workspace 3, and the wheel over the top bar went back to 4. Super+S
opened the overview with four cards; a click on a card activated its
workspace and closed the overview; the close button closed it. The tray
fixture (test/fixtures/tray-client.cjs) showed its icon; a click reached
Activate (the fixture logged it and changed its icon), a right click
opened the protected tray menu, and the wheel over the icon did not switch
the workspace.
Not verified: the live session (next login), two monitors and the output
marks of the bars, touchpad gestures, the overview planes with real
application windows, a middle click as SecondaryActivate alone, the
legacy bottom bar on an older compositor and a screen reader. A live check
with the user stays open.
Phase 10: recovery, then the wallpaper page
Recovery with its own bundle (section 4), then the React root of the wallpaper (section 4c).
Phase 10 result (2026-11-02), recovery
Done:
/recoveryis its own document,host/recovery.html. The core serves it for that route (the other shell routes keepindex.html) with the same launch cookie check, token, nonce,data-system-themeand default CSP. It loads/theme.css,/heroui-recovery.css,/recovery.cssand/heroui-recovery.js, and nothing of the chat document: noheroui-host.js,host.js, stores,trusted-ui.jsor panel runtime. The decision: a separate document, not only a separate bundle insideindex.html, because phase 1 madeindex.htmldepend onheroui-host.js, andhost.jsthrows without it.- Own bundle:
ui-src/host/recovery.jsxbuilds tohost/heroui-recovery.js(IIFE, minified, the pt-BR and en-US locales only), with its own React, the HeroUI Button and Disclosure and three Gravity icons. It does not use the shared runtimes of the chat (AgentNativeReact) or of the panels (AgentNativePanel), so a broken chat or panel build cannot break it.ui-src/host/heroui-recovery.cssbuilds tohost/heroui-recovery.csswith the rules of the other HeroUI CSS (layers, no preflight, no HeroUI base or default theme).host/recovery.cssholds the unlayered page rules thathost.csshad forbody.recovery. - Logic:
ui-src/host/recovery-client.jsreadsGET /api/stateevery second and sendsPOST /api/changes/recover {}andPOST /api/restore {}, the routes and bodies thathost.jsused. After a restore the page goes to/, as before. In Electron it also clears the canvas dock glass and the chat glass regions that the compositor still holds, ashost.jsdid in recovery mode (measurereturned no glass there). - Markup: the static link back, heading and intro stay in the HTML. React
renders the migration notice,
#change-status,#recover-change(only while a change waits for recovery), a HeroUI Disclosure in place of<details>with#change-history,#recovery-note, a new#recovery-errorand#restore. Every text is a React text child. - Removed from the chat document: the
#recoverysection ofindex.html,data-recovery, the__RECOVERY__placeholder, therecoveryflag and every branch on it inhost.js, therecover-changeandrestorehandlers, the move of#profile-migration-warningand the recovery rules ofhost.css.#change-recoverystays with the chat. - A failed chat bundle:
heroui-host.jsxsetsdocument.documentElement.dataset.herouiHost = "ready"after every root rendered.host.jschecks it first; without it, it writes an error to#error, shows the#change-recoverylink and stops. Before,host.jsthrew a TypeError on the first missing element and the chat showed nothing. - Wiring: routes
/heroui-recovery.js,/heroui-recovery.cssand/recovery.cssin the asset map ofcore/server.js, the same three in the Electron allowlist ofdesktop.cjs, the build inbuild-heroui-host.js, the generated files in.prettierignoreand the ESLint ignores. The/recoveryroute, its title, the native menu entry, the window rules and therecoverysingle surface ofhost-windows.cjsdid not change.
Tests:
scripts/test-recovery-browser.js(innpm testthroughtest/recovery-browser.test.js, 10 checks): a real core with a synthetic profile that has a previous revision. With a missing, then a throwing/heroui-host.js, the chat shows the error and the link; the link opens/recovery, which loads only its own assets; the restore goes back to the previous revision and returns to/; the history lists the restore; no page error and no CSP violation on the recovery page.test/heroui-recovery.test.js: the view, the glass clears, the routes and bodies of the client, an action error, the committed bundle in the realrecovery.htmlunder the core CSP (every ID, keyboard access to#recover-change, the recover request, no shared runtime), no HTML from a string, and no recovery markup left in the chat document.
Behavior changes:
- An error of a recover or a restore shows on the page (
#recovery-error). Before, it went to#errorof the hidden footer and never showed. - The page is always opaque. Before, it was opaque only in the desktop mode of Electron and took the default page background elsewhere.
- The hidden
#historydump of every conversation is gone, and the page reads the state once per second instead of every 600 ms. - The buttons are HeroUI Buttons with Gravity icons; the history is a HeroUI Disclosure.
Measured (raw, gzip -9; "before" is 6d42715):
| Asset | Before | After |
|---|---|---|
host/heroui-recovery.js |
none | 346,617 B, 105,243 B (new) |
host/heroui-recovery.css |
none | 10,442 B, 2,214 B (new) |
host/recovery.css |
none | 2,962 B, 1,076 B (new) |
host/recovery.html |
none | 1,201 B, 614 B (new) |
host/heroui-host.js |
671,176 B, 198,228 B | 671,228 B, 198,254 B |
host/host.js |
107,828 B, 30,412 B | 106,686 B, 30,110 B |
host/host.css |
93,106 B, 18,301 B | 91,833 B, 18,082 B |
host/index.html |
8,216 B, 2,466 B | 7,477 B, 2,210 B |
The recovery page now loads about 109 KB gzip of its own assets. Before, it
loaded the whole chat document: heroui-host.js (198 KB gzip), host.js
and its modules.
Nested QA (nested proof only, run d8865c5d, one output, no provider): with
heroui-host.js of the checkout replaced by a throwing script and the
surfaces reloaded (Ctrl+Alt+R), the chat showed the error text and the
"Recuperar alteração" link. A middle click on the link opened the
recovery surface ("Recuperar alterações", its own window) through the
window-open handler of desktop.cjs; it rendered the status, the
Disclosure (it opened on a click and listed the profile color change of the
run) and a disabled restore with its note (the run has no previous
revision). The original file was put back after the run.
Known issue, from before this phase: in the nested Electron host a left
click on a same-window link to another shell route did not navigate.
This affects #change-recovery in the chat and "← Voltar ao chat" in
recovery. A middle click opens the recovery surface through the
window-open handler. The browser harness navigates. Review round 1 checked it with the
same nested click test at 6d42715 (before phase 10) and at c0beded. In
both runs the link was forced visible in a temporary worktree. In both, a
left click on the chat link and on the link back did not navigate, and a
middle click opened the recovery window. Phase 10 did not cause it and
does not fix it. The native menu entry "Restaurar aparência…" loads
/recovery in the chat window through loadURL, not through a link.
Fixed on 2026-11-02 (history above kept): the cause was the
will-frame-navigate handler of desktop.cjs. Electron passes it one
event that carries url and isMainFrame; the handler read them from the
second argument, the deprecated url string, so isMainFrame was undefined
and every same-window main-frame navigation was prevented before
will-navigate ran. The handler now uses frameNavigationAllowed(event) of
core/host-navigation.cjs, and navigationAllowed decides the main frame as
designed: a left click on #change-recovery opens /recovery in the chat
window, and "← Voltar ao chat" returns. Subframes still load only
about:srcdoc and about:blank.
Review round 1 of that fix: each host window now stays on its own route,
and only the chat window (route /) moves between / and /recovery
(navigationAction). The recovery window that a middle click opens is
pinned to /recovery: "← Voltar ao chat" and the reload after a restore
close it instead of loading a second chat document. The bars stay on their
route. The handlers read the Electron event only (event.url), and a
will-redirect handler applies the same main-frame and subframe rules.
Review round 1 (LOW fixes, 2026-11-02):
- A recover now reads the state again after a read in flight. Before, a
timer read that started before the recover could show the old
recovery_failedstate for up to 1 s. - The page clears each distinct chat glass value once and waits 2 s after a failed clear. Before, it cleared at every read, and a chat window beside it that reports its glass again had its glass cleared every second.
- A unit test keeps the change labels of
recovery-client.jsequal to the labels ofhost.js. - The page no longer scrolls: the body had
min-height: 100vh, and the top margin of the panel collapsed into it. - The stale comment of
settings.jsxabout#recoveryis fixed.
Not verified: the live session (next login), the native menu entry in
Electron, a real recovery_failed journal in Electron (the browser test
covers the button with a fake core), the glass clear against a real
compositor and a screen reader.
Phase 10 result (2026-11-02), wallpaper page
Measured first, as section 4c asks. A prototype with the same React root and drawing code ran in headless Chromium (not Electron), 1280x720, 10 s per run, the median of 5 runs, the JavaScript heap after a forced garbage collection:
| Mode | Plain page | React root | Difference |
|---|---|---|---|
| Aurora (no profile PNG) | 776 KB heap, 17 ms script, 1,772 ms task | 1,149 KB heap, 17 ms script, 1,761 ms task | +373 KB heap, no CPU change |
| Static PNG | 704 KB heap, 0 ms | 1,075 KB heap, 0 ms | +371 KB heap |
The cost is about 0.37 MB of heap and no measurable CPU, below the limit of about 2 MB that the phase brief set, so the wallpaper moves. The task time is the drawing of the aurora (the GPU work of the shader at 30 fps), the same for both pages.
Done:
host/wallpaper.htmlhas an empty#wallpaper-rootand loads the classic script/heroui-wallpaper.jsin place of the canvas and the module/wallpaper.js.ui-src/host/wallpaper.jsxbuilds tohost/heroui-wallpaper.js(IIFE, minified) with React and React DOM only: no HeroUI part, no icon, no style element. The React root renders the canvas.wallpaper-auroraand starts the drawing code in an effect with that canvas; the effect cleanup is the dispose function of the drawing code.host/wallpaper.jskeeps the drawing code: the shader, the PNG check, the 30 fps cap, the pause while the page is hidden and with reduced motion, and the WebGL fallback.startWallpapertakes the canvas as an option (the default is the old lookup), and the file no longer starts itself. The bundle carries it, so the core no longer serves/wallpaper.js.core/desktop-visuals.jsserves/heroui-wallpaper.jsin place of/wallpaper.js, with the same CSP (default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self'; connect-src 'none'). The Electron allowlist ofdesktop.cjshas the same change. The CSP did not change. The bundle has nofetch,XMLHttpRequest,WebSocketorEventSource.desktop-visual.css, the page title, the window rules, the wallpaper window declaration and the background throttling ofdesktop.cjs(observeWallpaperVisibility) did not change.
Tests:
test/heroui-wallpaper.test.js: the committed bundle in the real page and CSP ofcore/desktop-visuals.js, in headless Chromium. Without a profile PNG the canvas inside#wallpaper-rootbecomes active (the aurora); with a PNG it stays hidden. No page error, no CSP violation and no request outside the five wallpaper routes.test/desktop-visuals.test.js: the page has the root and the script and no canvas or/wallpaper.js; the bundle route has the CSP and no network call;/wallpaper.jsis not a route any more.test/wallpaper.test.js(the drawing code) did not change and passes.
Behavior changes: none visible. The canvas comes from React instead of the HTML, and the drawing code starts in the effect of the React root.
Measured (raw, gzip -9; "before" is the recovery commit):
| Asset | Before | After |
|---|---|---|
host/heroui-wallpaper.js |
none | 227,751 B, 71,382 B (new) |
host/wallpaper.html |
438 B, 264 B | 529 B, 330 B |
host/wallpaper.js |
7,855 B, served | 8,162 B, 2,580 B, bundled only |
Nested QA (nested proof only, run 7da8c315, one output, no provider): the aurora showed behind the chat, the top bar and the workspace bar, and two captures 3 s apart differed in 379,178 of 400,000 pixels of a wallpaper area, so it animates. A zenity dialog opened in the run drew over the wallpaper. The host and compositor logs of the run had no wallpaper error.
Not verified: the heap and CPU of the wallpaper renderer in Electron (the measure ran in headless Chromium), the static PNG mode and the reduced motion mode in the nested run, the pause while the page is hidden in Electron, and the live session (next login).
Phase 11: lock screen
Last, because it is the surface where a failure costs the most. Its own bundle and fixed colors (section 4a). Needs a live check with the user, because only the real session proves PAM and the lock scene.
Phase 11 result (2026-11-02)
Done:
host/lock-screen.htmlhas an emptymain#lock-root(aria-label="Tela bloqueada") and loads/theme.css,/heroui-lock.css,/lock-screen.cssand the classic script/heroui-lock.js. The core serves the page with the same launch cookie check, lock token, theme and CSP (default-src 'none'; script-src 'self'; style-src 'self'; ...). The CSP did not change and has no nonce.- Own bundle:
ui-src/host/lock-screen.jsxbuilds tohost/heroui-lock.js(IIFE, minified, pt-BR and en-US locales only) with its own React, the HeroUI Button, Input and Label, and the Gravity iconLockOpen. It uses neither the chat runtime nor the panel runtime, and no other document loads it.ui-src/host/heroui-lock.cssbuilds tohost/heroui-lock.csswith the rules of the other HeroUI CSS (layers, no preflight, no HeroUI base or default theme). host/lock-screen.jsis deleted; there is no plain fallback. The logic is inui-src/host/lock-client.js: the same route (POST /api/lock/unlock), headers (x-lock-token,application/octet-stream),cache: "no-store",credentials: "omit", texts, 429 wait and its countdown as the plain page.- The password rule:
#passwordis a HeroUI Input outside a TextField, so it is an uncontrolled<input>(a TextField would hold the value in React Aria state). The submit handler readsinput.valueonce through the ref, encodes it, clears the field, and passes the bytes to the client, which sends them and zeroes them in afinally. React state holds only the clock date, the busy and blocked flags and the status text. - Focus: the field takes the focus at mount, when it is enabled again after a request or a wait, on window focus and on any click, as the plain page did.
- React Aria adds a
<style>for its pressable elements, and the lock CSP refuses an inline style without a nonce. React Aria first looks for an element with the idreact-aria-pressable-style; the<link>oflock-screen.csshas that id, andlock-screen.csscarries the sametouch-actionrule. So React Aria adds nothing and the CSP stays as strict as before. A test fails if React Aria changes that id. - Fixed colors:
lock-screen.csssets every color role that the HeroUI tokens oftheme.cssread to a fixed value (new:--color-background,--color-hover,--color-selection,--color-accent-hover,--color-error-surface), unlayered and aftertheme.css. - Wiring: the asset map of
core/server.jsserves/heroui-lock.js,/heroui-lock.cssand/lock-screen.cssand no longer/lock-screen.js.lockRequestAllowedincore/lock-window.cjs(the filter of the lock partition) has the same change. The main Electron allowlist ofdesktop.cjsdoes not list lock assets and did not change. The build,.prettierignoreand the ESLint ignores list the new outputs. - The window title, the window rules, the lock token, the PAM route and the core and compositor lock code did not change.
Tests:
test/heroui-lock.test.js(7 tests): the client (bytes sent once and zeroed, also on an empty field, a network error and during a wait; the texts; the 429 wait); the pt-BR clock and date; a static check of the lock sources (nouseReduceror other state hook for the password, the onlyuseStateis the clock date, novalue,defaultValueor input handler on the field, the value read once and cleared, the bytes only checked, sent and zeroed, no HTML from a string, no console or storage); the committed bundle in the real page, CSP and asset routes of a synthetic core in headless Chromium. That test refuses a wrong password (Enter in the field), waits after a 429 (a click on the button), unlocks (Space on the button), sends one request for Enter on the button, sends nothing for an empty field or during the wait, checks that the field is empty when the request leaves, finds the focus on the field after mount, each request, a click and a window focus, and scans the React tree: the typed text is never there. It also checks the fixed colors under a hostile profile color, a wallpaper palette and the light theme, the fit at 800x600, 1920x1080 and 3840x2160, no page error, no CSP violation, no<style>element and only the lock routes.test/lock-http.test.js,test/lock-window.test.js,test/profile-color.test.jsandtest/ui-build.test.jsfollow the new routes and CSS. The core, route, helper and compositor lock tests (unlock, refusal, several outputs) did not change and pass; they do not load the page.
Measured (raw, gzip -9; "before" is d5c9f51):
| Asset | Before | After |
|---|---|---|
host/heroui-lock.js |
none | 469,383 B, 142,841 B (new) |
host/heroui-lock.css |
none | 17,079 B, 2,649 B (new) |
host/lock-screen.css |
2,241 B, 969 B | 2,891 B, 1,273 B |
host/lock-screen.html |
1,076 B, 511 B | 1,079 B, 575 B |
host/lock-screen.js |
3,030 B, 1,292 B | removed |
The bundle is about 120 KB larger than the recovery bundle because the HeroUI Input imports the ComboBox and TextField contexts, which bring their React Aria code. That code is not used on the page.
Behavior changes: the button has a Gravity lock icon, and the form keeps its 360 px width (before, the field overflowed it by about 35 px).
Nested QA (nested proof only, one output, no provider, no PAM):
- Runs 2e6be6cf (this change) and 2efd8528 (d5c9f51, before this change):
Super+L locked the nested session (
sessionLock.statelocked, ownershell, host registered), but in both runspanelReadystayed false and no lock window mapped. The nested compositor also refuses a capture while locked. So the nested run cannot show the real lock panel, before or after this phase; the cause is open (see below). - Run e07202b6: a probe Electron client of the run opened the real lock
window code (
lockWindowOptions,prepareLockSession,hardenLockWindowofcore/lock-window.cjs, the lock partition and its request filter) against a synthetic core of this checkout with no compositor. The page loaded only/lock-screen,/heroui-lock.css,/lock-screen.css,/heroui-lock.jsand/theme.css, all 200. It rendered the clock, the date and the form with the fixed colors, the field had the focus, no<style>element and no console message. A click on the empty page kept the focus on the field;typefilled it; Enter and then a click on the button each sent one/api/lock/unlock(503 from a core without a compositor, before PAM), cleared the field and showed "Não foi possível verificar a senha agora." with the focus back on the field. Only synthetic text was typed; PAM was never called. - Finding: in that run
ready-to-showdid not fire for the hidden lock window, and the probe calledshow()after 2 s. This matches the missing lock panel of the nested runs at d5c9f51, so it is not caused by this phase. The live session must show that the lock window appears (see the live check).
Review round 1 (LOW fixes, 2026-11-02):
#lock-rootholds a static text ("A tela de bloqueio não carregou. Troque de terminal (Ctrl+Alt+F1 a F12) para sair da sessão."), which the first React render replaces. Before, a bundle that did not load or threw left a black page. It is text only; there is no fallback form. A browser test blocks the bundle, then serves a throwing bundle, and finds the text and no form; the main test checks that a normal load removes it.- The browser test fails on a console message of any type. The only exception is the line that Chromium writes for the refused 401 and 429 responses. The production React and the page code write nothing.
- A browser test sends two Enter key downs back to back (the second one is a key repeat) and finds one request.
- A test checks that the installed React Aria and the committed bundle use
the id
react-aria-pressable-style.
Lock window show fix (2026-11-02, separate commit): hardenLockWindow
also shows the hidden lock window at did-finish-load, as the panel
windows do. Nested proof after the fix: run 858b0aea, Super+L gave
panelReady: true and the lock window Agent Native Panel:lock-screen
with the keyboard focus; one wrong synthetic password left the session
locked with the lock window focused (the compositor refuses a capture while
locked, so the refusal text was not seen). Run 3255cfae: the probe client,
without its own show(), logged the window visible 2 s after the load.
Live check with the user before publish (stands in for the fallback; section 4a):
- After the next login with this commit, press Super+L: the lock page shows on the primary output (clock, date, field, button) and every other output is black.
- Type without a click: the text goes to the field. Click on the empty page, then type: the text still goes to the field.
- Send a wrong password once: "Senha incorreta." shows, the field is empty and keeps the focus.
- Send the right password with Enter: the session unlocks and the desktop returns. Repeat with a click on "Desbloquear".
- Lock from the quick settings "Bloquear tela" control and unlock again.
- Keep a VT switch (Ctrl+Alt+F1..F12) ready as the way out if the page does not show or does not take the keyboard; then revert this commit.
Not verified: the real lock panel in Electron under the compositor (nested cannot show it), PAM with a real password, two monitors during a lock, a screen reader and the live session.
Icons move with each surface: each phase uses Gravity UI icons for the surface
that it moves. The Yaru icon files and the /quick-settings-icon/ route left
with the top bar, their last user, in phase 9. docs/css-structure.md changes with each
surface.
Open questions for the user
Answered on 2026-11-02: the scope (every system surface), React for every surface, no plain fallbacks, no setting and no safeguard, and the composer first. The user said "só seguir" with the defaults below, so they apply until the user says otherwise.
- Generated HTML and isolated plugins are not system UI and stay without HeroUI.
- Look: keep the current glass look and the shared palette; HeroUI tokens map
to the
--color-*roles. @property: try the build-step fix first; ask the user before an outer stylesheet registers the properties.- Size budget: up to +150 KB gzip JavaScript, +80 KB CSS and +100 ms to the first chat render, with the HeroUI runtime as separate checkout assets and the 512 KB profile cap unchanged.
- Icons: Gravity UI Icons, with own SVGs in the same style for the gaps.
- Build output: commit the generated HeroUI JavaScript and CSS, like
ui/app.js, so a login never depends on a Tailwind build.