Repository navigation
feat(ui): pin one design language across website, Agent UI, and TUI - #4186
Conversation
The three GAIA surfaces each carried their own palette, so the website's copper, the app's accent, and the terminal's highlight were three near-but-unequal golds and the same assistant looked like three products. They now implement one set of colour roles with one set of literals, and each surface has a test that fails when a component writes a hex inline instead of asking for a role. docs/spec/gaia-design-language.mdx is the source of truth: it pins the roles, the values behind them, the contrast floor each kind of colour owes the reader, and why the light copper is not a darkening of the dark one (a 256-colour terminal rounds the obvious value onto the warning colour). Three guards do the enforcing, each written because a defect got past the previous one: - Token contrast, per surface, in both themes. - No colour literal outside the token file, with an allowlist where every entry states why. - Call-site pairing: the shipped fg/bg pair in a component rule is measured, not just the pairing the tokens intended. This caught a hover state at 4.15:1 that token-level assertions rated fine. Two behaviour changes a reviewer should look at rather than infer: - The per-tool colour table in the activity list is gone. Green, amber, red, and blue carry status meaning, so they are not available for decoration -- keeping the table meant a green tool badge sitting beside a red failure icon in the same row. Tools are now told apart by icon. - Code panels keep a dark canvas in both themes, so their text uses dedicated code roles. A page-theme token on one of those panels lands at 1.17:1 in light mode; a guard now derives which tokens flip and rejects them under a code-pane selector.
The design-language suite's glob-sanity check asserted that global.css contains `.g-code-panel`. That rule is dead CSS and someone will eventually delete it — at which point this test fails with a message about a broken glob, sending them to debug the wrong thing entirely. Probe for `@tailwind` instead: structural, and the real empty-CSS guard is the tokens.css assertion two lines above, which still fires first.
|
One follow-up found while reviewing this branch: the terminal/code-panel styles this PR re-tokenises are never rendered. No page on the site uses that panel, and it was already unused before this branch — so the re-tokenisation is correct but reaches nothing. I've left the styles in place rather than fold a dead-code sweep into a design PR. Worth deleting separately; the inline command chips that sit next to them are live and must stay. What did change here: a test in this PR had pinned one of those dead rules as a sanity check, which would have made the eventual deletion fail with a misleading "broken glob" message. That probe now checks for something structural instead. 🔍 Technical detailsDead in Live and must survive any cleanup: Nine of the ten code roles keep a live consumer through the Prism rules in The probe swap is |
Approve with suggestionsThis unifies the website, Agent UI, and TUI onto one copper/graphite/ivory palette, adds a spec page as the source of truth, and — the part that will keep paying off — backs it with three guards: per-surface contrast floors, a no-inline-hex rule, and a call-site pairing check that measures what components actually ship rather than what the tokens intended. Nothing here blocks merge. The one thing worth a second look before merging: a handful of non-error controls are now painted in the status red. A tool that is running, a selected agent card, a focused search box, and the send button's hover shadow all got the error colour, because the old brand red they used to carry was mapped mechanically onto the danger role. That contradicts this PR's own rule that colour in these rows means status — a running tool is currently outlined in exactly the same red as a failed one. Two smaller things:
Real-world evidenceThe automated evidence stage marked itself failed ( From the artifacts in No rendered screenshot — expected on this lane, and the underlying route/CSS evidence is present, so this isn't a blocker. It's worth landing one anyway: this change repaints every pixel of both web surfaces, so a before→after light/dark pair is the evidence a reviewer can actually judge, and the test plan's manual toggle item is still unchecked. 🔍 Technical details🟡 The retired brand red was mapped onto
|
|
Verdict: Approve with suggestions This is a well-executed, high-confidence design-system unification. The token renames are complete (no stray 🟡 No before/after screenshots for the Agent UI — the largest changed surface. The test plan describes a manual toggle-and-look step but no evidence is embedded in the description (no rendered One smaller point: a handful of button hover states (e.g. 🔍 Technical detailsMissing UI evidence — project standard for Agent UI surface changes is a Playwright run producing before/after screenshots embedded as
Everything else checked out:
|
The error-message tint moved from a hardcoded rgba to a color-mix off `--danger`, and this test pinned the literal, so re-theming read as a broken error style. It now asserts what the rule actually is -- the tint derives from the danger role -- matching the border assertion directly above it, which was already written against the token.
Opening an old document or code chat quietly changed what your *next* chat would be. The agent picker syncs itself to whichever session you are viewing, and "New Task" read the picker — so the agent of the conversation you just left became the agent of the one you started. Now a new chat always runs the flagship `gaia` agent unless you deliberately pick something else, and the conversation you navigated away from keeps the agent it was created with. This is the routing half of milestone 2 in [the UI redesign plan](https://github.com/amd/gaia/blob/main/docs/plans/gaia-ui-redesign.mdx). The shell simplification (welcome screen, sidebar, settings reachability) follows in a separate PR so each is reviewable on its own. Stacked on #4186 — review that one first. ## Test plan - [ ] `cd src/gaia/apps/webui && npx vitest run` — 514 pass, 53 files - [ ] `npm run build` — `tsc` clean, build succeeds - [ ] Open an existing non-flagship chat (a `doc` or `code` session), click **New Task**, confirm the new session runs `gaia` - [ ] Confirm the old chat still shows its original agent and was not rewritten - [ ] Pick an agent from the Agent Hub and start a task — it still gets that agent, not `gaia` - [ ] Click **New Task** twice in a row — the second click reuses the empty draft instead of stacking a second one <details> <summary>🔍 Technical details</summary> **The fix.** `handleNewTask` passed `store.activeAgentId` as the new session's `agent_type`. An effect in `App.tsx` sets `activeAgentId` from the selected session's `agent_type`, so after opening a legacy chat the picker — and therefore the next create — carried that agent. The create path now takes an explicit `explicitAgentId?: string`; omitting it means the flagship. Only the deliberate entry points (Agent Hub launch, agent switch) pass one. That effect is left alone on purpose: after this change it only drives picker *display*, not routing. **Why a separate module.** The decision lives in `utils/newTask.ts` as a pure `planNewTask`, so it can be tested without mounting the shell (polling, SSE, onboarding fetches and all). **Two test layers, and why the second is the one that matters.** `newTask.test.ts` (14 cases) pins the planner's contract. `App.newTask.test.tsx` (3 cases) renders `<App />`, clicks the real button, and asserts what `createSession` was actually called with. The planner tests alone would be tautological — they can't stop someone re-adding `explicitAgentId: activeAgentId` at the call site, which is precisely how the bug worked. Verified by mutation: restoring the old line fails 2 of the 3 App tests and none of the 14 planner tests. **`FLAGSHIP_AGENT_ID` vs `DEFAULT_AGENT_ID`.** Kept separate, with a test asserting they differ. `DEFAULT_AGENT_ID` (`chat`) answers "who owns a session row with no `agent_type`?" and has to keep matching the backend's legacy backfill (`database.py`, `sessions.py`). `FLAGSHIP_AGENT_ID` (`gaia`) answers "what does a *new* chat get?". Collapsing them would either reroute existing conversations or stop new ones reaching the flagship. **Backend untouched.** The server's `chat` default still applies to rows that arrive without an agent — the frontend just stops relying on it for new chats. **Known gap, deferred:** undo-delete in `Sidebar.tsx` re-creates the session without its `agent_type`, so undoing a deleted `doc` chat resurrects it as `chat`. Pre-existing on `main` and untouched here; it belongs with the sidebar PR, which needs a test harness for that file anyway. </details> Co-authored-by: f <f@f>
Picking an agent on the welcome screen — "Start Chat" on its hub card, or one of its own suggestion chips — started a flagship chat instead. The choice was visible in the agent picker but never reached session creation, so the agent you asked for was silently not the one you got. Routing every new chat to the flagship (previous commit) made the shell ignore the agent picker, which is what those two controls were using to carry the choice. They now pass the agent id explicitly via `onStartAgentTask`. The escape was a test gap: App.newTask.test.tsx mocked the agent list as empty, so the welcome screen's embedded hub never rendered and no suite covered it. Three cases added with agents present — hub card, agent-specific chip, generic chip — each verified to fail against the old handler.
Skill audit
✅ All audited skills cleared the tier they claim. Per-finding detail is withheld here on purpose. Read it in the Security > Code scanning tab, or download the |
Four controls shipped in the status red for no reason other than that the retired brand accent happened to be red too. A tool that was merely running was outlined identically to one that had failed -- the exact confusion the status roles exist to prevent. A hover tint under a copper link was still green. Two save buttons filled with --accent, the ink role, and put --text-inverse on top; that is legible only by luck. They now use --accent-fill with its paired text token. A new contrast guard asserts no rule paints --danger or --warning unless its selector claims a status, plus two companion tests that fail when either exemption list goes stale rather than letting it quietly widen. Website CI only ran on website/**, so cross-surface.test.ts -- the one test comparing the Agent UI's code-panel hues against the site's -- skipped exactly the change it exists to catch. The stylesheet is now in the path filter, and a test asserts it stays in both trigger blocks. The design language page claimed no simulated typing, no decorative blinking, and system-appearance support. None of the three holds today, so it now states each rule and names the milestone that delivers it.
|
Both review passes are addressed, and each fix now has a test that fails without it. Four controls were outlined or ringed in the status red, so a tool that was merely running looked identical to one that had failed — the exact confusion the status roles exist to prevent. Two save buttons were legible on hover only by luck. A hover tint under a copper link was still green. The design-language page also asserted three things that aren't true of what ships; it now states each rule and names the milestone that delivers it. One finding I pushed back on: the suggested sweep for 🔍 Technical detailsAll in Status hues —
New Website CI path filter — Spec — Local: Agent UI vitest 520/520 across 53 files, website vitest 167/167, |
The mobile-access QR code carried its own copy of the ivory/graphite pair and picked between them by reading `data-theme` directly, so a token change would have left the code painted in last month's colours. It now asks the cascade what the roles resolve to, and skips the render with a named reason if they do not resolve at all. `toCanvas()` needs literals -- it paints pixels, `var()` is not accepted there -- but `getComputedStyle` resolves custom properties anyway, so the literals never have to live in the component. Removing the last one forced the file out of the contrast suite's allowlist, which is that allowlist working as designed. Also retires the brand red from the DevTools startup banner, and pins the QR contract with three tests: the tones follow the tokens, a theme swap moves them, and unresolved tokens fail loudly instead of painting a blank code.
…lesheets The site's literal guard read only `.css` and `.astro`, so a script that set a colour from JS could put an unmeasured value on screen with nothing failing -- the one hole in a PR whose claim is that every surface catches an inline hex. Nothing exploits it today; the sweep now covers `.ts` so nothing can. Test sources stay out: a test that pins what a token resolves to has to name the value it expects. Two assertions on the glob keep the extension from being dropped back out silently. Mutation-verified -- a hex in `download-target.ts` fails it.
A new user's first GAIA window was indigo with a blue gradient progress bar -- neither colour exists anywhere else in the product. Both Electron-owned windows now mirror the dark theme's roles, and the install bar is a flat copper fill on a neutral track with a 1px rule for its edge. The fallback page also never rendered. Its `data:` URL was unescaped, so the `#` starting the first hex in the stylesheet opened the fragment and Chromium truncated the document there; it goes through `encodeURIComponent()` now, the way the progress window already did. Two smaller drifts in the same family: the in-app install bar's animated gradient shimmer is gone (the bar's width already reports progress), and `--accent-fill-hover` moves to the website's `#7A3824` -- the two surfaces were painting the same pressed button a shade apart.
Four ways a colour could reach a screen unmeasured, each closed by reintroducing the defect and watching the new guard fail. Electron's two windows sit outside the `/src` glob, so nothing swept them -- which is how they kept an indigo canvas and a gradient through a palette migration. They are swept now, and because they must hand-copy the dark theme (a `data:` URL has no stylesheet to read), the copy is checked against index.css instead of being left to a comment asking the next editor to keep it in step. "No gradient-filled panels" was enforced on the website only; the Agent UI carries the same test now, with the same `mask-image` exemption -- a gradient there is an alpha ramp that fades an overflowing label, and paints nothing. The website's floor check walked the light theme's keys, so a token declared only under `[data-theme='dark']` owed the reader nothing. It walks the union, and a companion test rejects a floor left behind for a token that no longer exists. Four more pairs join the cross-surface check, and it now compares every declaration rather than the first -- matching one value per token compared the light themes and let a dark-theme drift through, which is the class of bug that file exists to catch. Last, the status-hue guard matched `--warning`, a token the Agent UI has never declared: half of what it claimed to police matched nothing, and nothing said so. It is built from a list now, with a test that every name in it exists. Extending it to the other five status hues surfaces 84 decorative uses across 18 stylesheets, so that is recorded in the spec as a scheduled gap rather than pretended-covered.
The site only ever offered the terminal hub, so a visitor who wanted the Agent UI desktop app had no way to get it from amd-gaia.ai and no way to tell the two apart. The hero now shows both as a pair of cards — what each one is and who it is for — and picks out the build for the machine you are on. Their platform coverage is not the same, and the page says so rather than hiding it. The desktop app publishes three builds (Windows x64, Apple Silicon, Linux x64); the terminal covers six. On an Intel Mac, a Windows ARM64 machine or an ARM64 Linux box the desktop card states there is no build and points at the terminal, instead of showing a link that 404s or implying one is on the way. Downloads still resolve platform key -> exact filename -> published artifact, so a name the hub does not publish renders as nothing rather than a constructed URL. Every platform is server-rendered, so a visitor with no JS gets the complete list and working links for both surfaces; JS reveals the matching block and folds the rest behind a disclosure. A Mac behind Safari reports no architecture, so it matches both Mac blocks, and a machine that cannot be placed keeps the full list open. If none of the desktop filenames match what the manifest publishes, the build fails with the names it looked for — the card can never ship empty. The catalog's hide list is gone rather than emptied. It suppressed the desktop app's /hub page on the grounds that it was unmaintained, which the manifest contradicts (not deprecated, shipping 0.24.1). With the home page now offering that app as one of two primary downloads, hiding its page would leave Download pointing at a product the site refuses to describe. Verified across seven UA profiles in a real browser, including the three platforms with no desktop build and an iPad sending the Mac UA. Website tests: 171 -> 187.
Reopening a finished chat left a cursor pulsing at the end of the last answer, with no model loaded and nothing being sent — the same page this PR adds says a cursor "is a status indicator, never decoration, and never runs when nothing is being written." The rule shipped before it was true. The mechanism that did it is gone rather than gated: the last assistant message was handed a cursor of its own regardless of stream state, so the prop is deleted and streaming is the only thing that can raise one. A test renders a settled transcript and asserts zero cursors, and a streaming bubble and asserts one, so it cannot come back quietly. Also drops a reduced-motion rule for a shimmer pseudo-element that no longer exists.
An agent answer is the largest thing on the TUI screen and it was painted in colours the product does not own — headings bright cyan, emphasis warm sand, inline code amber — inside a copper-and-graphite UI. Every prose colour is now a theme role, so an answer looks like it belongs to the same application as the status bar above it. Copper stays rare on purpose. It marks headings, which carry an answer's structure, and inline code, which has nothing else left to say "this is a literal" since its tinted box was removed. Bold and italic are body- coloured: a model bolds half a dozen phrases per answer, and copper on each one turns running prose into speckle. The guard is the point. The old palette held ANSI-256 indices — "81", "222" — which contain no hex and call no constructor, so a sweep looking for #RRGGBB would have passed it. literals_test.go walks the Go AST and flags any field whose name ends in Color receiving a plain string, plus hand-written SGR escapes and .Dark/.Light reads outside the one function allowed to flatten a role. Five exemptions remain, each with a reason. Also removes a list-marker colour that glamour has never rendered, and the comment claiming it was what made a list scan as a list.
|
🟡 The beta-confirm modal loses its shadow in light mode — 🔍 Technical details
All four items from the first review ( |
The first thing a new user sees had the cursor rule backwards: it sat solid while the headline typed itself out, then started blinking the moment the typing stopped — and the subtitle's cursor kept blinking at a finished sentence for as long as the screen stayed open. The design language says a blinking cursor means output is still streaming, never decoration. Each of the three welcome cursors is now gated on its own text still being written, so the blink can be folded into `.terminal-cursor` itself and the `.blink` modifier dropped: if a cursor exists, something is being written. 41bd6f2 fixed the identical defect in the chat transcript. That test matches `.cursor`; the welcome screen uses `.terminal-cursor`, so nothing covered it — WelcomeScreen.cursor.test.tsx closes that gap, and both assertions were mutation-proved.
Eleven tests across three files went red whenever the machine was busy, with nothing wrong in the code under test. On an idle box the suite was always green, so the failures looked like noise and were easy to dismiss — but CI runners are small and loaded, and the same eleven tests were one bad scheduling moment from failing there. Three separate causes, all environmental: - The transcript and polling suites render a full ChatView and step fake timers; that overruns vitest's 5s default on a contended runner. - `waitFor` keeps its own one-second clock that `testTimeout` does not govern, so raising one without the other fixed only part of it. - jsdom has no `scrollIntoView`. Ten suites each hand-roll the same stub; `App.newTask` renders a transcript and never got one, so the effect threw and took the test with it. It now lives in the setup file, where a new suite inherits it instead of rediscovering the gap. `App.newTask`'s auto-mocked api also returned undefined for the two calls ChatView chains off on mount, and `undefined.then` throws — only when the load is heavy enough to reorder the effect against the assertion. Verified by running the full suite under 64 busy loops on a 32-core box: 11 failures before, 0 after, across three runs.
On mobile Chrome, an installed PWA, and some Linux window managers, the strip of browser chrome around the Agent UI was drawn from the browser's own default instead of the app's — so the app opened inside a frame that did not match it. The website already pins a theme-color; the Agent UI never did. A meta tag has no cascade, so it cannot read `--bg-primary`; the two canvas values have to be written out longhand. They are now written out in exactly one place, `applyTheme`, which both call sites go through, and `contrast.test.ts` holds them to the token in both themes — so the frame cannot drift from the app without a test saying so. `index.html` sits outside the `/src` globs the colour guard sweeps. That is the same blind spot that let the Electron windows keep an indigo canvas, so the guard now reaches it too.
The guard that keeps hardcoded colours out of the TUI could be walked straight past by importing lipgloss under a different name. `lg.ANSIColor(81)` is a hardcoded cyan with no string in it for the hex sweep to read, and the constructor check only recognised the word "lipgloss" — so the colour shipped with a green build behind it. Nothing in the tree does this today; the problem is that the guard reported green on a bypass, which is the one thing a guard must not do. It now resolves each import path to the package it really is, so the name a file happens to spell no longer decides what gets policed. A versioned module path still resolves, a dot-import is reported at the import site, and an unrelated package that merely spells itself `lipgloss` stops being a false positive. The real tree has no aliased colour import, so a synthetic table carries the proof the rule bites. The hex pattern's over-match on all-digit runs is now documented as the deliberate trade it is: excluding them would stop policing `#8`. Spec, alongside: the TUI row named a test command that never reached the components package, and the markdown link's blue is recorded as the one recognised exception to "status hues are not for decoration" — the convention predates this palette and readers arrive already knowing it.
Two Electron tests grep the source of the store and the entry point for the literal string `data-theme`. Routing every theme write through one `applyTheme` function moved that string into a third file, so both went red on a refactor that changed no behaviour. They now check what they were always trying to check: that each caller delegates, and that the module it delegates to is the thing touching the DOM. Requiring a call rather than a mention matters — a bare `toContain` was satisfied by the import line alone, so an entry point that imported `applyTheme` and never called it would still have passed.
A review flagged the beta-confirm modal as losing its shadow in light mode. It does not — `--shadow-lg` is declared in `:root` — but nothing in the suite could answer that, because the token guards only ran in one direction. They caught a token declared and never used; they said nothing about a token used and never declared, which is the direction that actually paints a blank. An undeclared custom property is not an error in CSS, so a typo or a token dropped from the palette while a rule still asks for it leaves a borderless panel and a green suite. The new guard exempts `var(--x, fallback)` and the tier colours PermissionManager sets as inline style props, and nothing else. The second guard closes the hole the review actually described: shadow values start with a length, so the existing both-themes check skipped them and a shadow declared in only one theme would have passed. Mutation-proofed: dropping `--shadow-lg` from `:root` (the reported bug), typo'ing a consumed token, and stripping a fallback each turn the suite red.
|
The modal keeps its shadow — The token guards only ran one direction: they caught a token declared and never used, and said nothing about one used and never declared. That is the direction that actually paints a blank, since an undeclared custom property is not an error in CSS — it just resolves to nothing. Both directions are now checked, and shadows are held to both themes explicitly. 🔍 Technical details
Two guards added in
Mutation-proofed, three mutants, all killed:
Suite is 539 passing, |
Every download link on the site was rebuilt from a filename and a guessed directory shape rather than the object key the hub publishes. It happens to match today, so nothing was broken — but the day the hub moves an artifact or adds a per-OS subdirectory, all fourteen buttons 404 in silence and the site has no way to notice. Each link is now the artifact's own `path`, which the manifest schema requires, and an artifact without one fails the build with a message naming the agent, the version and the file. The component had no test at all, so the download surface was carried entirely by helper tests that could not see what it rendered. It renders through Astro's container API against a fixture manifest, which needs `getViteConfig` from astro/config so a `.astro` import resolves at all. Three fixes the tests now hold: the Mac cards revealed two blocks with nothing between them, because Tailwind's `space-y` only pairs siblings that are both un-hidden; the two cards were `h2` peers of the page's own headings rather than options under one region; and the all-downloads list read as six identical "Standalone binary" links to a screen reader, with the platform shown once per row and absent from every link name. Verified against the live hub, not a mock: the built site emits 14 URLs and all 14 return 200. The two mutations that previously survived review — stripping `hidden` from the desktop blocks, and swapping the honest "no build for this platform" copy for a constructed `.exe` link — now both turn the suite red.
|
The one red check on this PR is not this branch — it is the stale Lemonade port bug tracked in #4281, and it is failing the same way on every open PR right now. The tell: the job's own setup starts Lemonade on one port and health-checks it green, then every test connects to a different port and gets connection-refused 100 times over. A server that failed to start would refuse on the port it was asked for. This is a recorded value being replayed. 🔍 Technical detailsJob 107921005295: setup readies Lemonade on 13305 and health-checks it successfully; the test phase then makes 22 references to 58491 and logs 100× Three distinct ephemeral ports across three branches — 59939, 50908, 58491 — rules out a single bad runner, which would repeat one port. The same fingerprint appears on A fix is in progress on its own branch so it can land independently of this PR. |
Keyboard users could land on three controls with no visible focus at all, light-theme status badges read below 4.5:1, and picking an agent then clicking a welcome chip quietly opened a session on a different one. All three shipped green because the guards meant to catch them each matched exactly one spelling of the mistake. The guards were the real finding. Two were green while broken: a focus-ring regex whose `\s*` backtracked to zero width, so `outline: none` counted as "paints an outline", and an electron assertion that matched a type annotation instead of the default it was pinning. Both were only caught by re-injecting the mutation they were written to reject, which is now the standard for every guard in this PR. Widened or added, each mutation-proven: - theme.go may export roles, not colours — an exported helper returning a single-mode lipgloss.Color hands the caller a value no contrast or parity guard measures, laundering the file's own exemption to every component. - the TUI colour-literal sweep reads declared types rather than syntax shapes, since lipgloss.Color is a string type and `var x = "81"` is a ValueSpec no CallExpr matcher sees. - the low-chroma exemption is hue-distance bounded, so a faded copper still passes while a sage green 94 degrees away no longer does — and it now runs on the raw value too, because #4A6B4A degrades to pure grey. - the Agent UI contrast pairs resolve across rules, the glow, white-text and named-colour sweeps cover the spellings they were blind to, and a moved focus ring must still exist and still paint where the exemption says it does. - website-ci.yml's path filter is asserted from the suite's own cross-tree reads, so a test that reaches outside website/ fails here rather than going unrun. The spec stops claiming the terminal has a canvas and a raised surface: the status band carries its own pair because the web values measure 1.25:1 and 1.32:1 against a user-chosen background, under the 1.5:1 chrome floor. Those ratios are recomputed by a test rather than hand-typed. Preference reads and the QR renderer no longer fail silently — a blocked localStorage and a missing qrcode package both say what was lost and what to check, instead of leaving a default or a blank canvas. Known and deliberate: --accent on --bg-active reads 4.15:1. The copper is pinned across the website, the Agent UI and the TUI, and lightening the active surface past --bg-hover would invert the depth ramp. It needs a cross-surface accent decision.
…onfig (amd#4299) Before: if the desktop app couldn't reserve a free port, it quietly started the backend on 4200. If another process already held 4200, the backend failed to bind and the window talked to whatever was listening there. After: startup stops and shows the existing fatal error dialog, which says what failed and where the log is. Separately, the tray settings handler used to crash on a null payload, write any key the renderer sent into `~/.gaia/tray-config.json`, and pass non-booleans to the OS "start at login" API. It now accepts only the three real settings and rejects anything that isn't a boolean. Unknown keys are dropped rather than rejected. The renderer sends back whatever `tray:get-config` returned, so junk keys already on disk from the old behaviour get cleaned up on the next save instead of breaking it. No overlap with amd#4186, which touches a different function in `main.cjs`. ## Test plan - [x] New tests fail on `origin/main` (10 failed / 25 passed): `cd tests/electron && npx jest main-startup-order.test.cjs tray-manager.test.cjs` - [x] Same command after the fix: 35/35 pass - [x] Full Electron Jest suite: `cd tests/electron && npm test`: 25 suites, 710 tests pass - [x] CI node:test step: `node --test tests/electron/test_port_manager.mjs tests/electron/test_loadapp_query.mjs`: 25 pass - [ ] Manual: launch the packaged app and change tray settings (start on login, minimize to tray); they still persist Fixes amd#4234 --------- Co-authored-by: Kalin Ovtcharov <[email protected]> Co-authored-by: Kalin Ovtcharov <[email protected]>
…kend (amd#4345) The Agent UI's TypeScript API types are written by hand, and nothing checked them against what the backend actually sends. Five had already drifted: settings were missing the agent mode, system status was missing the active profile, schedules were missing their parsed config, and three fields were typed as never-null although the backend sends null. Now CI fails and names the field whenever a hand-written type and the backend disagree, and those five types are fixed. Nothing changes for users; no UI code read the missing fields yet. This is the type-generation half of amd#4246. It also covers amd#3327's "snapshot the schema" and "check the TS types agree" items, but not its route `response_model` and conformance-test items. ## Test plan - [x] `python -m pytest tests/unit/chat/ui/test_export_openapi.py tests/unit/chat/ui/test_models.py tests/unit/chat/ui/test_server.py tests/unit/test_webui_agent_info_contract.py -q`: 170 passed - [x] `python -m gaia.ui.export_openapi --check` exits 0, also from another working directory with different env - [x] `cd src/gaia/apps/webui && npx tsc --noEmit`: clean. With `main`'s `types/index.ts` restored it fails five times, naming `agent_mode`, `active_profile`, `schedule_config`, `mail_provider`, `extension` - [x] `cd src/gaia/apps/webui && npm test`: 400 passed. Deleting one line from `api.gen.ts` fails the new generation test and `node scripts/gen-api-types.mjs --check` - [x] `npm run build` succeeds - [x] black, isort, pylint clean on the new Python files - [ ] CI: the Agent UI Vitest job's new Type-check step passes <details> <summary>🔍 Technical details</summary> **The pipeline:** `python -m gaia.ui.export_openapi` writes `src/types/api.schemas.json` from `create_app(":memory:").openapi()`, then `npm run gen:api-types` writes `src/types/api.gen.ts`. Each step has a stale check: a pytest test for the JSON and a Vitest test for the TS. `src/types/apiContract.ts` then compares 18 hand-written wire types with their generated counterparts at compile time. It flags backend fields missing from TS, TS fields never sent, and kind mismatches (string/number/boolean/null/array/object). It also has a self-test so it can't pass vacuously. `tsc` runs in the PyPI build on every PR, and now in the Agent UI Vitest job too. **Why not openapi-typescript:** it has a peer dependency on `typescript@^5` and uses the TS 5 compiler API. The Agent UI is on TypeScript 7, the native port, which has no JS API, so npm refuses the install. Its 6.x line has no TS dependency but pulls a vulnerable `undici`. `[email protected]` is pinned exact and adds no new `npm audit` findings (still 6, all pre-existing). The lockfile was written with npm 11 to keep its `libc` fields. **Only the component schemas are snapshotted, not the full OpenAPI doc.** Route docstring edits don't cause regenerations, since the types don't depend on them. **AgentInfo's 14 "TS-only" fields aren't drift.** They're Hub catalog fields from `merge_with_registry`, and `tests/unit/test_webui_agent_info_contract.py` (amd#3846) already checks each one against its emitter. The contract allowlists exactly those 14. **Not covered:** camelCase view models (`Message`, `AgentStep`, `CommandOutput`), and TS types whose routes have no `response_model` (tunnel, MCP, connectors). The latter are amd#3327's remaining work. **Things to know:** - CI installs unpinned `fastapi`/`pydantic`, as the email agent's `export_openapi --check` already does. The committed snapshot matches the current latest (fastapi 0.141.1, pydantic 2.13.5), but a future release that changes schema output would need a regenerate. - A dependabot bump of `json-schema-to-typescript` or its `prettier` dependency may need `npm run gen:api-types` run on its PR. **Overlap:** - amd#4325 removes `SystemStatus.device_supported` from the backend and TS. Whichever of the two PRs merges second must rerun the two regenerate commands. The fixture edits touch separate hunks. - Other open PRs that edit pydantic models in `src/gaia/ui/` need the same regenerate after this lands. - amd#4186 and amd#4340 don't touch these files. </details> Part of amd#4246 --------- Co-authored-by: Kalin Ovtcharov <[email protected]> Co-authored-by: Kalin Ovtcharov <[email protected]>
Merging main's apiGen.test.ts (which opts into @vitest-environment node via #4345) with this branch's scrollIntoView polyfill in setup.ts broke that suite: HTMLElement doesn't exist in the node environment, so the global setup file threw before any test ran. Guard the polyfill so both coexist.
|
🟡 The homepage's new Releases section lost its accent colour. The latest merge from Fix: change the three 🔍 Technical details
To stop the next merge doing the same thing, |
…ease candidates (amd#5078) amd-gaia.ai went flat in amd#4186: the animated background was removed and the palette turned graphite and copper, so the landing page read like a docs index. Release candidates were also hard to find, sitting at the foot of the page and missing from "Recent releases". This brings back motion and puts the site in AMD's brand: black, white and AMD red, with a starfield that drops out of warp on load. The newest RC now sits directly under the stable download and in the release list. - **Brand:** AMD red is the single accent, AMD orange marks release candidates only, and Antonio carries the display type. The site is dark-only. Titillium Web stands in for Klavika; AMD Brand should confirm against the current partner-portal guidelines before launch. - **Motion:** the starfield brakes to a cruise, speeds up on scroll and dims below the hero. Reduced-motion visitors get a still frame, and a footer control pauses it (WCAG 2.2.2). - **Design language:** the spec gains a "The website" section. The site keeps the shared roles, contrast floors and status hues, but not the copper the Agent UI and TUI share; those two surfaces are unchanged. The contrast, literal and cross-surface guards were reworked to match, and each new guard was mutation-checked. ## Test plan - [x] `cd website && npx vitest run` — 238 pass - [x] `cd website && HUB_CATALOG_URL=https://hub.amd-gaia.ai npm run build` — `astro check` 0 errors, build complete - [x] `python util/check_doc_links.py` — all links valid - [x] Built site driven in Chrome: starfield animates and brakes, 28/28 scroll reveals fire, pause/resume persists across reload, reduced motion is static, no console errors - [x] Every route at 1440px and 390px: no horizontal overflow, no unlabelled controls, visible focus ring on every tab stop - [ ] After deploy: load amd-gaia.ai, confirm the RC line under the download and the RC row in "Recent releases"
The website, the Agent UI, and the terminal each carried their own palette, so GAIA's copper appeared as three near-but-unequal golds and the same assistant looked like three products. All three now implement one set of colour roles from one set of literals, and each surface has a test that fails when a component writes a hex inline instead of asking for a role.
docs/spec/gaia-design-language.mdxis the source of truth for what the roles are, what contrast each owes the reader, and why the light copper is not a darkening of the dark one.Implements milestone 0 of the redesign plan in #3803, plus the theming half of milestone 5. The shell simplification (milestone 2) stacks on top of this in a follow-up.
What it looks like
The welcome headline used to keep a cursor blinking at a sentence nothing was writing to — the first thing every new user saw. The chat transcript had the same defect. Both now go quiet the moment the text stops.
Dark mode on the same palette — copper is the only accent; green and amber appear solely as status, never decoration:
The agent-picker grid under the headline is the surface milestone 2 removes — the shell is being rebuilt around the flagship agent, not a hub of them.
The other threads
Two design calls worth a second opinion
Both change what users see, so please push back if you disagree rather than let them ride in:
`flags`in it does speckle, so it is worth a second read.What catches the next regression
Guards, each written because a real defect got past the previous one: token contrast per surface in both themes, no colour literal outside the token file, and call-site pairing — the fg/bg pair a component actually ships is measured, not just the pairing the tokens intended. That last one matters most: token-level assertions rated a hover state fine that shipped at 4.15:1.
Two of these guards were green while broken, and neither was found by reading them. A focus-ring regex backtracked to zero width, so
outline: nonecounted as "paints an outline"; an Electron assertion matched a type annotation instead of the default it was pinning. Every guard here is now mutation-proven — the mistake it exists to reject is re-injected and observed to fail it. That is the argument for the mutation step, not a footnote to it.Known non-conformance
--accenton--bg-activereads 4.15:1 against a 4.5 floor, and is excluded deliberately. The copper is pinned across all three surfaces, and lightening the active surface enough to clear the floor pushes it past--bg-hover, inverting the depth ramp. It needs a cross-surface accent decision, which is larger than this PR.Test plan
cd src/gaia/apps/webui && npx vitest run— 637 pass, 59 filescd src/gaia/apps/webui && npx tsc --noEmit— cleancd src/gaia/apps/webui && npm run build— cleancd tests/electron && npx jest test_electron_chat_app.js— 196 passcd website && npx vitest run— 213 passcd website && npx astro check— 0 errors, 0 warningscd website && HUB_CATALOG_URL=https://hub.amd-gaia.ai npm run build— completes (needs network; the build has no fixture fallback by design. Behind a TLS-inspecting proxy addNODE_OPTIONS=--use-system-ca.)cd tui && go vet ./... && go test -count=1 ./internal/ui/...— clean, all packages passpython util/check_doc_links.py— 2496 links, 0 broken>prompt, focus ring, and primary button are the only coloured things on screenTest Agent SDK on Windows (Lemonade Integration)is red here for #4281, a self-hosted-runner bug unrelated to this PR — a leftover state file points the tests at a dead port. It fails the same way on unrelated branches and is fixed by #4284.