Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(ui): align the setup screen to the authored design tiers (#2065)

Max31c4e831b585
diff --git a/docs/plans/2026-09-17-onboarding-design-fidelity.md b/docs/plans/2026-09-17-onboarding-design-fidelity.md
index e399ba710..61bc28ccd 100644
--- a/docs/plans/2026-09-17-onboarding-design-fidelity.md
+++ b/docs/plans/2026-09-17-onboarding-design-fidelity.md
@@ -251,6 +251,14 @@ target. This deliberately leaves the wire relation rather than following it into
#### The active-card halo is one managed semantic token, themed through variables
+> Superseded 2026-09-20 by
+> [2026-09-20-setup-design-alignment](2026-09-20-setup-design-alignment.md): the frames'
+> active and hovered card shadow turned out to be an offset drop shadow
+> (`0 2px 12px #5BFFA038` dark, `0 2px 16px -4px #10B98124` light), which the centred glow
+> scale cannot carry. The token and its per-theme numbers are deleted; the component
+> stylesheet holds the literals. The continuous card-height and headline rules above are
+> superseded the same way, by the design's authored tiers.
+
The reference's dark halo is a spread-less 28px mint at `#5BFFA060`; Light has its own tighter
16/-4 at `#10B98170` over a `#10B98160` border. Both are now carried by one managed token,
`--shadow-glow-onboarding-mint`, instead of approximated by stacking two rungs of the sized scale.
diff --git a/docs/plans/2026-09-20-setup-design-alignment.md b/docs/plans/2026-09-20-setup-design-alignment.md
new file mode 100644
index 000000000..76572dc59
--- /dev/null
+++ b/docs/plans/2026-09-20-setup-design-alignment.md
@@ -0,0 +1,99 @@
+# Setup screen alignment to design_desktop.pen and the show-page reference
+
+> Status: implemented on `fix/setup-design-alignment-20260920`, owner-approved scope
+> from the 2026-09-20 acceptance review of `/setup`.
+> Supersedes, for the values it names, the continuous card-height and headline rules
+> in [2026-09-17-onboarding-design-fidelity](2026-09-17-onboarding-design-fidelity.md)
+> and the `--shadow-glow-onboarding-mint` halo described there.
+
+## Background
+
+Owner acceptance of the shipped setup found four gaps against
+`avibe-docs/design_desktop.pen` (read through Pencil) and the interactive reference in
+Show session `ses36vg559de2`:
+
+1. Large-screen adaptation drifted: a continuous card-height formula
+ (`min(30vh, …)`) and a continuous headline clamp reproduce none of the design's
+ four authored desktop readings exactly.
+2. The top bar used the small square brand chip and the square "中" language button;
+ the design draws a 44px logo lockup with a two-line wordmark and a 44px round
+ language button with a Languages glyph.
+3. The connection step's enable control was a checkbox with a text label; the design
+ and the reference draw a switch in the card header's trailing slot.
+4. The connection methods sat side by side as chips; the design stacks them as two
+ full-width rows, and the card's hover/active shadow is a tight offset drop shadow,
+ not a 28px spreadless halo.
+
+## Goal
+
+`/setup` matches `design_desktop.pen`'s `Web setup` frames at their authored
+viewports (1366x768, 1440x900, 1920x1080, 390x844, plus the intermediate 1200x800)
+and the reference session's interaction shapes, without touching the Settings
+surfaces, which keep their own shells.
+
+## Solution
+
+### Discrete tiers instead of one continuous formula
+
+The frames draw the composition at readings, not along a curve. `onboarding.css`
+now declares four desktop bands plus the phone band as CSS custom-property tiers on
+`.onboarding-shell`: card height 232 / 262 / 300 / 330 (258 stacked), and with each
+its header height, card padding and interior rhythm, identity header, name size,
+method-row and lifecycle-row heights, headline size/line-height/gap, heading-block
+reserve and its distance to the stage, access block width, and action size. The
+content column keeps the ratified continuous cap `clamp(976px, 62.5vw, 1200px)`;
+only the vertical rhythm is authored per tier. The header is full-bleed at the
+window's own gutter while the composition keeps its capped column.
+
+### Header and language control
+
+`Wizard` draws its own `SetupHeader`: the logo asset (which already carries its
+white tile) at 44px beside "Avibe / Agent OS", and a 44px round Languages button with
+the switcher's own dropdown menu. The settings-shell `LanguageSwitcher` and
+`BrandLogo` are untouched, per the owner's decision that only the setup page changes.
+
+### Connection card internals
+
+- The enable control is a `role="switch"` button in the identity header's trailing
+ slot, drawn per theme by the reference (dark: lit border on the on-state; light:
+ no border, white thumb).
+- The identity header rules itself off from the body with a 1px divider in both
+ steps, as both frames draw.
+- The lifecycle pill keeps the state row's left; the action the pill offers —
+ update now, or its in-flight state — is drawn opposite it on that row by the card,
+ while `BackendLifecycleChip` still owns the probe and the write and reports its
+ derived visual up through a new `onVisual` callback (with `refreshKey` so a
+ card-driven upgrade re-probes the chip). Install stays opposite the not-installed
+ pill, as before.
+- "Add subscription / sign in" and "Add API Key" are two full-width rows, stacked;
+ the connected state wears the same row with a mint check and stays a button, so a
+ settled connection can still be reopened.
+- The card's active/hover shadow is the design's own `0 2px 12px #5BFFA038` (dark) /
+ `0 2px 16px -4px #10B98124` (light). Because those carry a y offset they are not
+ members of the centred accent glow scale, so the managed token
+ `--shadow-glow-onboarding-mint` is retained but re-declared in that offset shape,
+ with its per-theme blur, spread and alpha named beside each palette the way
+ `--brand-glow-blur` is. `glowScale.test.mjs` keeps the role as an excused member:
+ its blur is asserted from the role map, its offset geometry and alpha are pinned
+ per theme, and the scale's blur assertion reads the shadow's third length so an
+ offset is not mistaken for an absence of blur. `onboarding.css` consumes the
+ token rather than holding literals.
+- The wire box is sized `card * 350/300` from the card, which keeps the handoffs on
+ the cards' midline at every tier; the return-loop caption rides y=338 of that box.
+
+### Access block and action
+
+The access block is 740 wide (830 at the large tier, full-width stacked on phones)
+with the six circles kept as a centred 560 grid inside it; the primary action and
+the way back take the tier's 52/56/54 height, 12 radius and 17px label with a 19px
+arrow. The import capsule's review button takes the design's 6-radius 28px shape.
+
+## Validation
+
+- `npm run build`, `validate:theme`, `typecheck:tests`, `lint` green.
+- Onboarding unit suites and `glowScale.test.mjs` green, including the retained
+ offset-shadow role asserted per theme.
+- `ui/e2e/onboarding-fidelity` updated to assert the tiers it now ships — card
+ height per window, heading reserve and gap per tier, wire-box ratio, access
+ block/grid spans, and the offset halo geometry — and run across the viewport,
+ theme and language matrix.
diff --git a/ui/e2e/onboarding-fidelity/connections.spec.ts b/ui/e2e/onboarding-fidelity/connections.spec.ts
index c3f7fadac..0f2972572 100644
--- a/ui/e2e/onboarding-fidelity/connections.spec.ts
+++ b/ui/e2e/onboarding-fidelity/connections.spec.ts
@@ -387,9 +387,28 @@ for (const viewport of [{ width: 320, height: 568, tight: false }, { width: 390,
const denied = await serveProduct(page);
await authFixtures(page);
const reads = await switchableReads(page);
+ // Hold the card's own connection reads behind a gate the dialog's fixtures do
+ // not own, so the setup can be measured while a read is genuinely in flight.
+ let releaseConn = () => {};
+ const connGate = new Promise<void>((resolve) => { releaseConn = resolve; });
+ await page.route('**/api/backend/*/connection', async (route) => {
+ await connGate;
+ return route.fallback();
+ });
await page.setViewportSize(viewport);
await openOnboarding(page);
await openSetup(page, 'en');
+ // An in-flight connection read must not re-lay the card out: it used to add a
+ // status line under the methods, so the card grew while the read settled and
+ // shrank when it landed, moving everything under the person's pointer. Pending
+ // now spins the method rows in place and disables them, at a fixed card height.
+ const cardHeights = () => page.locator('.onboarding-assistant')
+ .evaluateAll((nodes) => nodes.map((node) => Math.round(node.getBoundingClientRect().height * 10) / 10));
+ const pendingHeights = await cardHeights();
+ await expect(page.locator('.onboarding-assistant-actions button').first()).toBeDisabled();
+ releaseConn();
+ await expect(page.locator('.onboarding-assistant-actions button').first()).toBeEnabled();
+ expect(await cardHeights()).toEqual(pendingHeights);
const dialog = page.getByRole('dialog');
// Where the frame owns the scroll, two things about the comparison change and only
// two. The reader's own scroll position is theirs, not the layout's — reaching the
diff --git a/ui/e2e/onboarding-fidelity/geometry.spec.ts b/ui/e2e/onboarding-fidelity/geometry.spec.ts
index 0c1a094bd..3a21c53e4 100644
--- a/ui/e2e/onboarding-fidelity/geometry.spec.ts
+++ b/ui/e2e/onboarding-fidelity/geometry.spec.ts
@@ -36,8 +36,9 @@ const CAPTURE_STATES = ['complete', 'working', 'waiting'];
/** The card's share of the content column: three 299s and two 39.5 gaps in 976, which is
* the same fraction as three 367s in 1200. One percentage, both authored rows. */
const CARD_SHARE = 0.306352;
-/** The diagram is the card plus the return wire's band beneath it (271 drawn around 232). */
-const DIAGRAM_RATIO = 271 / 232;
+/** The wire box is the card times the reference's own 350/300, so the handoffs stay on
+ * the cards' midline at every tier. */
+const WIRE_RATIO = 350 / 300;
/** What the stage reserves beyond the card, spent by the introduction on the return band
* and by the connection on the 20 + 44 import capsule. */
const STAGE_EXTRA = 64;
@@ -80,21 +81,30 @@ async function frame(page: Page) {
const window = await page.evaluate(() => {
const shell = document.querySelector('.onboarding-shell') as HTMLElement;
const content = document.querySelector('.onboarding-shell-content') as HTMLElement;
+ // The column the composition is capped to, read from the step itself: the
+ // content box's own rect includes its gutters, which are not the column.
+ const step = document.querySelector('.onboarding-welcome, .onboarding-setup') as HTMLElement | null;
return {
vw: globalThis.innerWidth,
vh: globalThis.innerHeight,
gutter: parseFloat(getComputedStyle(shell).paddingLeft),
- available: content.getBoundingClientRect().width,
+ available: step ? step.getBoundingClientRect().width : content.getBoundingClientRect().width,
};
});
const clamp = Math.min(Math.max(976, 0.625 * window.vw), 1200);
- // Stacked, the three cards ARE the composition, so the phone band gives them the height
- // the reference draws rather than a share of a window that should scroll instead.
+ // The card height is the tier the design authored for this window: 232 under an
+ // 800px-tall one, 262 under 900, 300 above 1000, 330 at the large 1920x1080 reading.
+ // Stacked, the three cards ARE the composition, so the phone band gives them the
+ // height the reference draws rather than a share of a window that should scroll.
const stacked = window.vw < 760;
+ const card = stacked ? 258
+ : window.vw >= 1600 && window.vh >= 950 ? 330
+ : window.vh <= 800 ? 232
+ : window.vh <= 1000 ? 262 : 300;
return {
...window,
column: Math.min(clamp, window.available),
- card: stacked ? 258 : Math.min(window.vh * 0.3, Math.min(window.available, clamp) * 0.3),
+ card,
stacked,
};
}
@@ -111,7 +121,7 @@ test.describe('desktop reference geometry', () => {
// column of three 299 cards with 39.5 between them. Stated once, here, so a reader
// can see that the ratios below are the design and not an arbitrary proportion.
expect(round(reference.column)).toBe(976);
- expect(round(reference.card)).toBe(240);
+ expect(round(reference.card)).toBe(232);
const welcome = await box(page, '.onboarding-welcome');
expect(welcome.width).toBeCloseTo(reference.column, 1);
@@ -128,11 +138,14 @@ test.describe('desktop reference geometry', () => {
// lands a hundredth away and a stricter claim would only be testing that.
expect(gaps[0]).toBeCloseTo(39.5, 1);
- // The diagram is sized from the card it contains, which is what keeps the handoff
- // wire on the cards' midline at every window rather than only at the authored one.
+ // The diagram is the card plus the return band the stage floors, and the wire box
+ // inside it takes its own height from the card — which is what keeps the handoff
+ // wire on the cards' midline at every tier rather than only at the authored one.
const collaboration = await box(page, '.onboarding-collaboration');
expect(collaboration.width).toBeCloseTo(reference.column, 1);
- expect(collaboration.height).toBeCloseTo(reference.card * DIAGRAM_RATIO, 1);
+ expect(collaboration.height).toBeCloseTo(reference.card + STAGE_EXTRA, 1);
+ const wires = await box(page, '.onboarding-wires');
+ expect(wires.height).toBeCloseTo(reference.card * WIRE_RATIO, 1);
// What has to be exact is that the wire endpoints sit on the card edges: the stretched
// viewBox and the card grid answer to the same width, so a port cannot drift off. To
@@ -145,8 +158,38 @@ test.describe('desktop reference geometry', () => {
onPixel(ports[1].x + ports[1].width / 2, cards[1].x);
onPixel(ports[2].x + ports[2].width / 2, cards[1].x + cards[1].width);
onPixel(ports[3].x + ports[3].width / 2, cards[2].x);
+ // The story's caption is authored per tier like the rest of the card's type —
+ // 12 on the standard desktops, 15 at the large reading — so a fixed 10 that
+ // reads small against the frame is caught here.
+ const capSize = await page.locator('.onboarding-story-status')
+ .first().evaluate((node) => parseFloat(getComputedStyle(node).fontSize));
+ expect(capSize).toBeCloseTo(reference.card >= 300 ? 15 : 12, 0);
+
+ // The identity header's mark takes its tier's authored size — 28 under a 900px
+ // window and below, 32 at 1001+, 35 at the large reading — including the nested
+ // span `BackendIcon` sizes inline, or the visible mark stays at one tier while
+ // its slot grows.
+ const logos = await boxes(page, '.onboarding-card-logo > span');
+ const logoSize = reference.card >= 330 ? 35 : reference.card >= 300 ? 32 : 28;
+ for (const logo of logos) {
+ expect(logo.width).toBeCloseTo(logoSize, 0);
+ expect(logo.height).toBeCloseTo(logoSize, 0);
+ }
+
+ // In the band that still draws three columns on a narrow window, the identity
+ // row has less room than its logo, switch and label want; the name yields
+ // before anything spills through the card edge.
+ if (reference.column <= 768 + 1) {
+ for (let index = 0; index < cards.length; index += 1) {
+ const name = (await boxes(page, '.onboarding-card-name'))[index];
+ const enable = (await boxes(page, '.onboarding-assistant-enable'))[index];
+ expect(name.x).toBeGreaterThanOrEqual(cards[index].x - 0.5);
+ expect(enable.x + enable.width).toBeLessThanOrEqual(cards[index].x + cards[index].width + 0.5);
+ }
+ }
+
// And the handoff runs along the cards' shared midline.
- const midline = cards[0].y + reference.card * 116 / 232;
+ const midline = cards[0].y + reference.card / 2;
for (const port of ports) onPixel(port.y + port.height / 2, midline);
await settleEffects(page);
@@ -170,7 +213,12 @@ test.describe('desktop reference geometry', () => {
const stage = await box(page, '.onboarding-stage');
const action = await box(page, '.onboarding-primary-action');
const access = await box(page, '.onboarding-access');
- expect(stage.y - (heading.y + heading.height)).toBeCloseTo(20, 0);
+ // The heading block carries its tier's own distance to the stage — 15 under an
+ // 800px window — while the stage's distance to the action is 20 in every row.
+ const headingGap = await page.evaluate(() =>
+ parseFloat(getComputedStyle(document.querySelector('.onboarding-heading')!).marginBottom));
+ expect(round(headingGap)).toBe(15);
+ expect(stage.y - (heading.y + heading.height)).toBeCloseTo(headingGap, 0);
expect(action.y - (stage.y + stage.height)).toBeCloseTo(20, 0);
expect(stage.height).toBeCloseTo(reference.card + STAGE_EXTRA, 1);
@@ -272,12 +320,15 @@ test.describe('desktop reference geometry', () => {
const heading = await box(page, '.onboarding-heading');
const stage = await box(page, '.onboarding-stage');
const action = await box(page, '.onboarding-primary-action');
- expect(stage.y - (heading.y + heading.height)).toBeCloseTo(20, 0);
+ const headingGap = await page.evaluate(() =>
+ parseFloat(getComputedStyle(document.querySelector('.onboarding-heading')!).marginBottom));
+ expect(stage.y - (heading.y + heading.height)).toBeCloseTo(headingGap, 0);
expect(action.y - (stage.y + stage.height)).toBeCloseTo(20, 0);
- // The card, and the whole composition with it, follows the window: 30% of 756.
+ // The card, and the whole composition with it, follows the window's tier: the
+ // 800px-tall reading draws a 232 card, not a share of whatever is left.
const card = await box(page, '.onboarding-collaboration-card');
expect(card.height).toBeCloseTo(reference.card, 1);
- expect(round(card.height)).toBe(226.8);
+ expect(round(card.height)).toBe(232);
// And at the reference's own frame the composition then fits it exactly: the card
// paying for the window is what removes the scroll, not a shorter gap or smaller type.
@@ -293,38 +344,45 @@ test.describe('desktop reference geometry', () => {
expect(await metrics()).toEqual(tall);
const short = { heading: await box(page, '.onboarding-heading'), stage: await box(page, '.onboarding-stage') };
const shortAction = await box(page, '.onboarding-primary-action');
- expect(short.stage.y - (short.heading.y + short.heading.height)).toBeCloseTo(20, 0);
+ expect(short.stage.y - (short.heading.y + short.heading.height)).toBeCloseTo(headingGap, 0);
expect(shortAction.y - (short.stage.y + short.stage.height)).toBeCloseTo(20, 0);
- expect(round((await box(page, '.onboarding-collaboration-card')).height)).toBe(156);
+ // The tier, not the leftover: a 520px window still draws the 800-row's card and
+ // scrolls the rest.
+ expect(round((await box(page, '.onboarding-collaboration-card')).height)).toBe(232);
expect(await overflows()).toBe(true);
await page.locator('.onboarding-access').scrollIntoViewIfNeeded();
await expect(page.locator('.onboarding-access')).toBeInViewport();
});
/**
- * The reference's four headline rows are one rule, not four sizes: 32 at 1366, 34 at
- * 1440, 50 at 1920 and 30 on a phone are all `3.333vw - 14` held between 30 and 50, with
- * the tracking following the size proportionally so a larger headline is never tighter
- * than the one drawn. Both steps read it from the same rule, so both are checked.
+ * The reference's headline rows are authored per tier, not interpolated: 32 at
+ * 1366x768 and 1200x800, 34 at 1440x900, 50 at 1920x1080 and 30 on a phone, each with
+ * its own line height and its own distance to the stage. Both steps read the same
+ * tier, so both are checked at the design's own viewports.
*/
- for (const width of [1920, 1440, 1366, 1200, 390]) {
- test(`the headline follows the design's own size rule at ${width}`, async ({ page }) => {
- await page.setViewportSize({ width, height: 900 });
+ for (const [viewport, size] of [
+ [{ width: 1920, height: 1080 }, 50],
+ [{ width: 1440, height: 900 }, 34],
+ [{ width: 1366, height: 768 }, 32],
+ [{ width: 1200, height: 800 }, 32],
+ [{ width: 390, height: 844 }, 30],
+ ] as const) {
+ test(`the headline is the tier's authored size at ${viewport.width}x${viewport.height}`, async ({ page }) => {
+ await page.setViewportSize(viewport);
await serveProduct(page);
await openOnboarding(page);
const type = () => page.evaluate(() => {
const node = document.querySelector('.onboarding-heading :is(h1, h2)')!;
const style = getComputedStyle(node);
return {
- vw: globalThis.innerWidth,
size: parseFloat(style.fontSize),
tracking: parseFloat(style.letterSpacing),
weight: style.fontWeight,
};
});
const intro = await type();
- expect(intro.size).toBeCloseTo(Math.min(Math.max(30, 3.333 * intro.vw / 100 - 14), 50), 1);
- expect(intro.tracking / intro.size).toBeCloseTo(-0.047, 3);
+ expect(intro.size).toBeCloseTo(size, 1);
+ expect(intro.tracking / intro.size).toBeCloseTo(-0.035, 3);
expect(intro.weight).toBe('600');
await openSetup(page, 'en');
expect(await type()).toEqual(intro);
@@ -373,10 +431,12 @@ test.describe('capped fluid width', () => {
expect(card.width).toBeCloseTo(reference.column * CARD_SHARE, 1);
expect(card.height).toBeCloseTo(reference.card, 1);
}
- // The stretched wire box always covers the cards, so no pulse can detach.
+ // The stretched wire box always covers the cards, so no pulse can detach, and
+ // its height is the card's own share, which keeps the handoffs on the midline.
const wires = await box(page, '.onboarding-wires');
expect(round(wires.width)).toBe(round(collaboration.width));
- expect(collaboration.height).toBeCloseTo(reference.card * DIAGRAM_RATIO, 1);
+ expect(wires.height).toBeCloseTo(reference.card * WIRE_RATIO, 1);
+ expect(collaboration.height).toBeCloseTo(reference.card + STAGE_EXTRA, 1);
}
// The primary action stays reachable: short viewports scroll rather than clip.
@@ -394,10 +454,10 @@ test.describe('capped fluid width', () => {
/**
* "Six access points … using circular logo containers, compact spacing and names
- * underneath", drawn as a centred 560 row. It is the one block here that does not grow
- * with the window, and deliberately: stretching six destinations to 1200 turns a row of
- * logos into a rule across the bottom of the page. So the span is checked at widths where
- * everything else around it is a different size.
+ * underneath", drawn as a centred 560 row inside a block the reference grows in two
+ * steps — 740 on a standard desktop, 830 on a large one. Stretching the six circles
+ * themselves to the block turns a row of logos into a rule across the bottom of the
+ * page, so the grid keeps its 560 span and centres inside the block at every width.
*/
for (const width of [1920, 1366, 1024, 768]) {
test(`the access row is a centred 560 of six circles at ${width}`, async ({ page }) => {
@@ -407,15 +467,16 @@ test.describe('capped fluid width', () => {
const access = await box(page, '.onboarding-access');
const welcome = await box(page, '.onboarding-welcome');
- expect(round(access.width)).toBe(560);
+ expect(access.width).toBeCloseTo(Math.min(740, welcome.width), 1);
expect(access.x + access.width / 2).toBeCloseTo(welcome.x + welcome.width / 2, 0);
const tiles = await boxes(page, '.onboarding-access-tile');
expect(tiles).toHaveLength(6);
// One row, on the 560/6 pitch the tracks produce rather than a gap someone typed.
expect(spread(tiles.map((tile) => tile.y))).toBeLessThanOrEqual(1);
+ const grid = Math.min(560, welcome.width);
for (let index = 1; index < tiles.length; index += 1) {
- expect(tiles[index].x - tiles[index - 1].x).toBeCloseTo(560 / 6, 1);
+ expect(tiles[index].x - tiles[index - 1].x).toBeCloseTo(grid / 6, 1);
}
const icons = await page.locator('.onboarding-access-icon').evaluateAll((nodes) => nodes.map((node) => {
const rect = node.getBoundingClientRect();
@@ -467,7 +528,7 @@ test.describe('shared action anchor', () => {
const subtitle = await box(page, '.onboarding-heading p');
const stage = await box(page, '.onboarding-stage');
const action = await box(page, '.onboarding-primary-action');
- await expect(page.getByRole('img', { name: 'avibe', exact: true })).toBeVisible();
+ await expect(page.getByText('Avibe', { exact: true })).toBeVisible();
await openSetup(page, lang);
await toTop(page);
@@ -572,7 +633,7 @@ test.describe('import capsule', () => {
await openSetup(page, 'zh');
const help = page.getByRole('button', { name: '什么是模型网关?' });
- const body = page.getByText(/模型网关集中管理 API Key 和模型连接/);
+ const body = page.getByText(/模型网关管理你选择的认证信息/);
// Pointer: the panel is portalled, so it must survive the trip from trigger to panel.
await help.hover();
@@ -880,7 +941,7 @@ test.describe('theme', () => {
* at build time — reading the custom property would pass on a theme override that
* compiles to nothing.
*/
- for (const [theme, geometry] of [['dark', '0px 0px 28px 0px'], ['light', '0px 0px 16px -4px']] as const) {
+ for (const [theme, geometry] of [['dark', '0px 2px 12px 0px'], ['light', '0px 2px 16px -4px']] as const) {
test(`${theme} draws its own active-card halo, and idle cards none`, async ({ page }) => {
await serveProduct(page);
await openOnboarding(page, { theme });
diff --git a/ui/e2e/onboarding-fidelity/support.ts b/ui/e2e/onboarding-fidelity/support.ts
index 97ee3aa65..a2e090092 100644
--- a/ui/e2e/onboarding-fidelity/support.ts
+++ b/ui/e2e/onboarding-fidelity/support.ts
@@ -213,6 +213,13 @@ export async function setDocumentHidden(page: Page, hidden: boolean) {
export async function openSetup(page: Page, lang: string) {
await page.getByRole('button', { name: lang === 'zh' ? '开始使用' : 'Get started' }).click();
await page.locator('.onboarding-assistants').waitFor();
+ // The step switch plays a 450ms entrance that translates and blurs the incoming
+ // composition. It runs on the document timeline, so a frozen clock does not hold
+ // it; geometry read mid-entrance would be geometry of a composition still
+ // arriving. CSS animations, unlike timers, settle on their own.
+ await page.locator('.onboarding-step').evaluate((node) => Promise.all(
+ node.getAnimations({ subtree: false }).map((animation) => animation.finished.catch(() => null)),
+ ));
}
/**
diff --git a/ui/scripts/glowScale.test.mjs b/ui/scripts/glowScale.test.mjs
index 74da2a4b9..3336d2e4c 100644
--- a/ui/scripts/glowScale.test.mjs
+++ b/ui/scripts/glowScale.test.mjs
@@ -70,25 +70,6 @@ const OFF_RULE = {
why: 'owner-set: themed blur (2026-08-14) and 0.6 alpha, not from design.pen',
holds: /^0 0 \d+px -4px rgba\(\d+, \d+, \d+, 0\.6\)$/,
},
- // The approved onboarding reference draws its active card with no spread at all
- // and at #5BFFA060, so the two fields the general rule fixes -- spread = -blur/4
- // and alpha 0.44 -- are the two this role is excused from, and `holds` pins both
- // at the reference's own numbers. Its blur is not excused: it is asserted from
- // ROLE_BLUR like every other role's, because a role is still a name for a size.
- //
- // Two patterns, because the two frames drew this card separately: Light's own
- // (waUhu) is 16/-4 at #10B98170, so the fields excused here are the ones that
- // differ. An exception that named one theme would have left the other
- // unasserted, which is this file's recurring failure shape -- so a themed
- // exception states BOTH themes, and a theme it says nothing about fails rather
- // than passing by default.
- onboarding: {
- why: 'the owner-approved active-card halo: spreadless #5BFFA060 in dark, and the light frame\'s own 16/-4 #10B98170',
- holds: {
- dark: /^0 0 \d+px 0px color-mix\(in srgb, var\(--[a-z]+\) 37\.6%, transparent\)$/,
- light: /^0 0 \d+px -4px color-mix\(in srgb, var\(--[a-z]+\) 44%, transparent\)$/,
- },
- },
// The sidebar's selected nav row keeps the general rule's geometry and alpha --
// spread = -blur/4 and 0.44 -- and departs on one field only: the design table
// gives it #10B98170 in Light beside #5BFFA070 in Dark, so its hue is mixed from
@@ -100,6 +81,18 @@ const OFF_RULE = {
why: 'the approved sidebar selection halo: the scale\'s own 16/-4 and 0.44, themed through var(--mint) for #10B98170 in light and #5BFFA070 in dark',
holds: /^0 0 \d+px -4px color-mix\(in srgb, var\(--[a-z]+\) 44%, transparent\)$/,
},
+ // The onboarding card's active and hovered halo is the one shadow the design
+ // draws with an offset, so centring cannot describe it: `0 2px 12px #5BFFA038`
+ // in dark and `0 2px 16px -4px #10B98124` in light. Blur stays asserted from
+ // ROLE_BLUR; the y offset, the spread and the alpha are pinned here, per theme,
+ // because an exception that named one theme would leave the other unasserted.
+ onboarding: {
+ why: 'the approved active/hover card halo: an offset drop shadow, not a centred glow',
+ holds: {
+ dark: /^0 2px \d+px 0px color-mix\(in srgb, var\(--[a-z]+\) 22%, transparent\)$/,
+ light: /^0 2px \d+px -4px color-mix\(in srgb, var\(--[a-z]+\) 14\.1%, transparent\)$/,
+ },
+ },
};
// What each role's blur IS, rather than which blurs the scale happens to
@@ -117,7 +110,7 @@ const OFF_RULE = {
const ROLE_BLUR = {
dot: 8, wire: 4, xs: 12, sm: 16, md: 24, lg: 32, xl: 48, nav: 16,
cta: { dark: 16, light: 20 },
- onboarding: { dark: 28, light: 16 },
+ onboarding: { dark: 12, light: 16 },
};
const blurOf = (role, theme) => {
@@ -138,7 +131,9 @@ const THEMES = ['dark', 'light'];
// palette on its own -- `color-mix(in srgb, var(--mint) …)` is whichever mint the
// theme declares -- but a blur is a number, and a number that has to change per
// theme has to be named and re-anchored where the palette is. `--brand-glow-blur`
-// is that shape and `--onboarding-glow-*` follows it.
+// is that shape; the onboarding card's active and hovered shadow left this scale
+// entirely when the design's reading of it turned out to be an offset drop shadow
+// (`0 2px 12px #5BFFA038`), which a centred scale cannot carry.
//
// So a rung is resolved through the numbers its theme declares before anything is
// asserted about it. Only the numbers: a colour name is left as written, because
@@ -346,7 +341,11 @@ describe('the accent glow scale', () => {
it.each(rungs)('$token has its role\'s blur in $theme', ({ role, theme, value }) => {
const blur = blurOf(role, theme);
expect(blur, `${role} names no blur for the ${theme} theme it is declared in`).toBeDefined();
- expect(Number(value.match(/^0 0 (\d+)px/)?.[1])).toBe(blur);
+ // The blur is the third length of a box shadow whatever its offset: `0 0 12px …`
+ // for the centred rungs and `0 2px 12px …` for the one offset role. Reading it by
+ // position keeps an offset from being mistaken for an absence of blur.
+ const blurLength = value.split(/\s+/)[2];
+ expect(Number(blurLength?.replace(/px$/, ''))).toBe(blur);
});
it.each(Object.entries(OFF_RULE))('states why %s is off the rule', (role, { why }) => {
diff --git a/ui/src/components/LanguageSwitcher.tsx b/ui/src/components/LanguageSwitcher.tsx
index e7777a292..3a19941dd 100644
--- a/ui/src/components/LanguageSwitcher.tsx
+++ b/ui/src/components/LanguageSwitcher.tsx
@@ -1,9 +1,18 @@
import React, { useEffect, useRef, useState } from 'react';
-import { Check } from 'lucide-react';
+import { Check, Languages } from 'lucide-react';
import clsx from 'clsx';
import { useLanguageSelection } from '../lib/useLanguageSelection';
-export const LanguageSwitcher: React.FC<{ openUpward?: boolean }> = ({ openUpward = false }) => {
+interface LanguageSwitcherProps {
+ openUpward?: boolean;
+ /** `label` is the compact square used by the settings shells; `icon-round` is
+ the circular Languages button the onboarding header draws. Same menu, same
+ state handling, same selection flow — only the trigger and the wrapper
+ classes differ. */
+ variant?: 'label' | 'icon-round';
+}
+
+export const LanguageSwitcher: React.FC<LanguageSwitcherProps> = ({ openUpward = false, variant = 'label' }) => {
const { languages, current: currentLang, select } = useLanguageSelection();
const [isOpen, setIsOpen] = useState(false);
const wrapRef = useRef<HTMLDivElement>(null);
@@ -14,10 +23,17 @@ export const LanguageSwitcher: React.FC<{ openUpward?: boolean }> = ({ openUpwar
setIsOpen(false);
}
};
+ const handleEscape = (event: KeyboardEvent) => {
+ if (event.key === 'Escape') setIsOpen(false);
+ };
if (isOpen) {
document.addEventListener('mousedown', handleClickOutside);
+ document.addEventListener('keydown', handleEscape);
}
- return () => document.removeEventListener('mousedown', handleClickOutside);
+ return () => {
+ document.removeEventListener('mousedown', handleClickOutside);
+ document.removeEventListener('keydown', handleEscape);
+ };
}, [isOpen]);
const shortLabel = (code: string) => {
@@ -30,8 +46,9 @@ export const LanguageSwitcher: React.FC<{ openUpward?: boolean }> = ({ openUpwar
await select(code);
};
+ const round = variant === 'icon-round';
return (
- <div className="relative" ref={wrapRef}>
+ <div className={round ? 'onboarding-language' : 'relative'} ref={wrapRef}>
<button
type="button"
onClick={() => setIsOpen((v) => !v)}
@@ -39,18 +56,22 @@ export const LanguageSwitcher: React.FC<{ openUpward?: boolean }> = ({ openUpwar
title={currentLang.label}
aria-haspopup="listbox"
aria-expanded={isOpen}
- className="inline-flex h-8 w-8 items-center justify-center rounded-md border border-border-strong bg-surface-2/40 text-[11px] font-semibold text-muted transition hover:bg-surface-2 hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring"
+ className={round
+ ? 'onboarding-language-button'
+ : 'inline-flex h-8 w-8 items-center justify-center rounded-md border border-border-strong bg-surface-2/40 text-[11px] font-semibold text-muted transition hover:bg-surface-2 hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring'}
>
- {shortLabel(currentLang.code)}
+ {round ? <Languages size={22} /> : shortLabel(currentLang.code)}
</button>
{isOpen && (
<div
role="listbox"
- className={clsx(
- 'absolute z-50 min-w-[10rem] rounded-lg border border-border bg-popover py-1 text-popover-foreground shadow-xl',
- openUpward ? 'bottom-full left-0 mb-2' : 'top-full right-0 mt-2'
- )}
+ className={round
+ ? 'onboarding-language-menu'
+ : clsx(
+ 'absolute z-50 min-w-[10rem] rounded-lg border border-border bg-popover py-1 text-popover-foreground shadow-xl',
+ openUpward ? 'bottom-full left-0 mb-2' : 'top-full right-0 mt-2'
+ )}
>
{languages.map((lang) => {
const active = lang.code === currentLang.code;
diff --git a/ui/src/components/Wizard.tsx b/ui/src/components/Wizard.tsx
index ea791a6eb..7931267b8 100644
--- a/ui/src/components/Wizard.tsx
+++ b/ui/src/components/Wizard.tsx
@@ -3,7 +3,7 @@ import { useNavigate } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import { Welcome } from './steps/Welcome';
import { AgentDetection } from './steps/AgentDetection';
-import { BrandLogo } from './visual';
+import logoImg from '@/assets/logo.png';
import { LanguageSwitcher } from './LanguageSwitcher';
import { useApi, type VibeAgentBrief } from '../context/ApiContext';
import { useStatus } from '../context/StatusContext';
@@ -15,7 +15,28 @@ import { SetupModelRecovery } from './onboarding/SetupModelRecovery';
import { readOpencodeSetupRoutes } from './onboarding/opencodeSetupRoutes';
import { ASSISTANT_ORDER } from './onboarding/collaborationTimeline';
-/** Owns explicit setup completion; credential and lifecycle writes stay with their owners. */
+/**
+ * The setup's top bar, drawn as the design draws it at every size: the brand lockup —
+ * the logo asset, which already carries its white tile, beside the two-line wordmark —
+ * at the window's own gutter, and the shared language switcher wearing its round
+ * trigger opposite it.
+ */
+function SetupHeader() {
+ const { t } = useTranslation();
+ return (
+ <header>
+ <div className="onboarding-brand">
+ <span className="onboarding-brand-mark"><img src={logoImg} alt="" /></span>
+ <span className="onboarding-brand-wordmark">
+ <strong>{t('onboarding.brand.name')}</strong>
+ <span>{t('onboarding.brand.tagline')}</span>
+ </span>
+ </div>
+ <LanguageSwitcher variant="icon-round" />
+ </header>
+ );
+}
+
export function Wizard() {
const api = useApi(); const { t } = useTranslation(); const navigate = useNavigate();
const { control } = useStatus();
@@ -23,6 +44,10 @@ export function Wizard() {
const [platformRecovery, setPlatformRecovery] = useState<SavedPlatformRecovery | null>(null);
const [recovery, setRecovery] = useState<VibeAgentBrief | null>(null);
const [step, setStep] = useState<'welcome' | 'agents'>('welcome');
+ // The first screen arrives without an entrance of its own — the reference opens
+ // on it, settled. Only a switch between the two screens plays the transition, so
+ // the flag flips in the two places that move between them, never on mount.
+ const [entered, setEntered] = useState(false);
const [data, setData] = useState<Record<string, any> | null>(null);
const [error, setError] = useState('');
const completing = useRef(false);
@@ -95,10 +120,16 @@ export function Wizard() {
{error ? <><p role="alert">{error}</p><button onClick={() => void load()}>{t('common.retry')}</button></> : t('common.loading')}
</div>;
return <div className="onboarding-shell">
- <header><BrandLogo size={36} /><LanguageSwitcher /></header>
+ <SetupHeader />
<main className="onboarding-shell-content">
- {step === 'welcome' ? <Welcome data={data} onNext={(next) => { setData({ ...data, ...Object(next) }); setStep('agents'); window.scrollTo({ top: 0, behavior: 'instant' }); }} />
- : <AgentDetection data={data} completionRecovery={platformRecovery ? <SetupPlatformRecovery key={platformRecovery.descriptor.id} saved={platformRecovery} onRepaired={complete} onCancel={() => setPlatformRecovery(null)} /> : recovery ? <SetupModelRecovery key={recovery.id} agent={recovery} onComplete={complete} onCancel={() => setRecovery(null)} /> : undefined} onNext={complete} onBack={(next) => { setData({ ...data, ...next }); setStep('welcome'); window.scrollTo({ top: 0, behavior: 'instant' }); }} />}
+ {/* One keyed wrapper per step: switching steps swaps the composition and
+ the incoming one fades, slides and unblurs in, the way the reference's
+ connection layer arrives over the introduction. Reduced motion takes the
+ whole shell's animation away, so the swap stays instant for it. */}
+ <div key={step} className={entered ? 'onboarding-step onboarding-step-enter' : 'onboarding-step'}>
+ {step === 'welcome' ? <Welcome data={data} onNext={(next) => { setData({ ...data, ...Object(next) }); setStep('agents'); setEntered(true); window.scrollTo({ top: 0, behavior: 'instant' }); }} />
+ : <AgentDetection data={data} completionRecovery={platformRecovery ? <SetupPlatformRecovery key={platformRecovery.descriptor.id} saved={platformRecovery} onRepaired={complete} onCancel={() => setPlatformRecovery(null)} /> : recovery ? <SetupModelRecovery key={recovery.id} agent={recovery} onComplete={complete} onCancel={() => setRecovery(null)} /> : undefined} onNext={complete} onBack={(next) => { setData({ ...data, ...next }); setStep('welcome'); setEntered(true); window.scrollTo({ top: 0, behavior: 'instant' }); }} />}
+ </div>
</main>
</div>;
}
diff --git a/ui/src/components/onboarding/AssistantRow.tsx b/ui/src/components/onboarding/AssistantRow.tsx
index 3be6e6e18..d1c524098 100644
--- a/ui/src/components/onboarding/AssistantRow.tsx
+++ b/ui/src/components/onboarding/AssistantRow.tsx
@@ -1,5 +1,5 @@
import type { ReactNode } from 'react';
-import { Check, Download, ExternalLink, RefreshCw, Sliders } from 'lucide-react';
+import { Check, Download, ExternalLink, KeyRound, RefreshCw, SlidersHorizontal } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { BackendIcon } from '../visual';
import { Button } from '../ui/button';
@@ -15,6 +15,9 @@ export interface AssistantRowProps {
detecting: boolean;
error?: { message: string; output?: string | null };
lifecycle: ReactNode;
+ /** The action the lifecycle pill offers — update or upgrade-in-flight — drawn
+ opposite the pill on the state row, where the design puts it. */
+ upgrade?: ReactNode;
enabledControl: ReactNode;
onInstall: () => void;
onDetect: () => void;
@@ -40,20 +43,24 @@ export interface AssistantRowProps {
* being swapped for another. `geometry.spec.ts` holds both steps to the same boxes,
* which is what keeps that true as either step changes.
*/
-export function AssistantRow({ backend, status, installing, detecting, error, lifecycle, enabledControl,
+export function AssistantRow({ backend, status, installing, detecting, error, lifecycle, upgrade, enabledControl,
onInstall, onDetect, onConfigure, configuringDisabled = false, connection, onAddKey, onRefreshConnection, connectionPending, connectionError }: AssistantRowProps) {
const { t } = useTranslation();
const label = getBackendUiMeta(backend).label;
return (
<Card className="onboarding-assistant" aria-label={label}>
<div className="onboarding-card-identity">
- <BackendIcon backend={backend} size={28} variant="brand" aria-hidden="true" />
+ <span className="onboarding-card-logo"><BackendIcon backend={backend} size={28} variant="brand" aria-hidden="true" /></span>
{/* A heading here and a `strong` on the welcome: the setup's three cards are
a real document structure a person navigates, the welcome's are an
illustration the card already labels. Same class, so same geometry. */}
<h3 className="onboarding-card-name">{label}</h3>
<div className="onboarding-assistant-enable">{enabledControl}</div>
</div>
+ {/* The state row is where the story puts its caption: the lifecycle pill on the
+ left and, opposite it, the single action that pill offers — update or
+ install. Both stay on this row so the card body below is the note and the
+ connection methods, exactly as the design stacks them. */}
<div className="onboarding-assistant-state">
{installing || detecting || status === 'unknown' ? (
<Badge variant="secondary"><RefreshCw size={12} className={installing || detecting ? 'motion-safe:animate-spin' : ''} />
@@ -64,28 +71,76 @@ export function AssistantRow({ backend, status, installing, detecting, error, li
{t(error ? 'onboarding.setup.installFailed' : 'onboarding.setup.notInstalled')}
</Badge>
)}
+ {upgrade}
+ {status === 'missing' && (
+ <Button type="button" variant="secondary" className="onboarding-life-action" onClick={onInstall} disabled={installing || detecting}>
+ {installing ? <RefreshCw size={14} className="motion-safe:animate-spin" /> : <Download size={14} />}
+ {t(installing ? 'agentDetection.installing' : error ? 'common.retry' : 'onboarding.setup.install')}
+ </Button>
+ )}
+ {status === 'unknown' && !detecting && (
+ <Button type="button" variant="secondary" className="onboarding-life-action" onClick={onDetect}>
+ <RefreshCw size={14} />{t('common.retry')}
+ </Button>
+ )}
</div>
<div className="onboarding-assistant-body">
- <p className="onboarding-assistant-note" title={t(`onboarding.setup.${backend}Description`)}>
- {connection === 'hub' ? t('settings.backends.nativeAuthHubOwned')
- : t(connection ? `onboarding.setup.${connection}` : `onboarding.setup.${backend}Description`)}
+ {/* The note is the guidance for the state the card is in, the way the frames
+ draw it — what to do next when nothing is installed, how to connect when
+ the binary is ready, what a settled connection means, and where a
+ hub-owned credential is managed — rather than a static description of the
+ assistant. The frames keep it to one line at every tier, which a
+ per-state sentence is short enough to honour in both languages. */}
+ <p className="onboarding-assistant-note">
+ {connection === 'hub'
+ ? t('settings.backends.nativeAuthHubOwned')
+ : status === 'missing'
+ ? t('onboarding.setup.installFirstNamed', { name: label })
+ : connection
+ ? t(`onboarding.setup.${connection}ConnectedHint`)
+ : t(`onboarding.setup.${backend}Guide`)}
</p>
+ {/* One full-width row per connection method, subscription above API Key, and
+ the connected state wearing the same row with a mint check. */}
<div className="onboarding-assistant-actions">
- {status === 'missing' && <Button variant="secondary" size="sm" className="h-[34px]" onClick={onInstall} disabled={installing || detecting}>
- {installing ? <RefreshCw size={14} className="motion-safe:animate-spin" /> : <Download size={14} />}
- {t(installing ? 'agentDetection.installing' : error ? 'common.retry' : 'onboarding.setup.install')}
- </Button>}
- {status === 'unknown' && !detecting && <Button variant="secondary" size="sm" onClick={onDetect}><RefreshCw size={14} />{t('common.retry')}</Button>}
- <Button variant="secondary" size="sm" className="h-[34px]" onClick={onConfigure} disabled={configuringDisabled || installing || detecting}>
- {connection === 'hub' ? <ExternalLink size={14} /> : connection ? <Check size={14} className="text-mint-ink" /> : <Sliders size={14} />}
- {connection === 'hub' ? t('settings.backends.openModelHub')
- : t(connection ? `onboarding.setup.${connection}Connected` : 'onboarding.connection.addSubscription')}
- </Button>
- {!connection && onAddKey && <Button variant="secondary" size="sm" className="h-[34px]" onClick={onAddKey} disabled={configuringDisabled || installing || detecting}>{t('onboarding.connection.addKey')}</Button>}
+ {connection === 'hub' ? (
+ /* A hub-supplied credential is managed in Model Gateway, so the row names
+ where it lives and clicking it goes there. */
+ <button type="button" className="onboarding-method-connected" onClick={onConfigure}
+ disabled={configuringDisabled || installing || detecting || !!connectionPending}>
+ {connectionPending ? <RefreshCw size={16} className="motion-safe:animate-spin" /> : <ExternalLink size={16} />}
+ {t('settings.backends.openModelHub')}
+ </button>
+ ) : connection ? (
+ /* A button wearing the connected row: it reads as the static receipt the
+ design draws, and clicking it still reopens the connection dialog,
+ which is the only way back into a settled connection from this card. */
+ <button type="button" className="onboarding-method-connected" onClick={onConfigure}
+ disabled={configuringDisabled || installing || detecting || !!connectionPending}>
+ {connectionPending ? <RefreshCw size={16} className="motion-safe:animate-spin" /> : <Check size={16} />}
+ {t(`onboarding.setup.${connection}Connected`)}
+ </button>
+ ) : (
+ <Button type="button" variant="secondary" className="onboarding-method-row" onClick={onConfigure} disabled={configuringDisabled || installing || detecting || !!connectionPending}>
+ {connectionPending ? <RefreshCw size={16} className="motion-safe:animate-spin" /> : <SlidersHorizontal size={16} />}
+ {t('onboarding.connection.addSubscription')}
+ </Button>
+ )}
+ {!connection && onAddKey && (
+ <Button type="button" variant="secondary" className="onboarding-method-row" onClick={onAddKey} disabled={configuringDisabled || installing || detecting || !!connectionPending}>
+ {connectionPending ? <RefreshCw size={16} className="motion-safe:animate-spin" /> : <KeyRound size={16} />}
+ {t('onboarding.connection.addKey')}
+ </Button>
+ )}
</div>
- {(connectionError || connectionPending) && <div className="onboarding-assistant-error" role={connectionError ? 'alert' : 'status'}>
- {connectionPending ? t('common.loading') : connectionError}
- {!connectionPending && onRefreshConnection && <Button variant="link" size="xs" onClick={onRefreshConnection}>{t('common.retry')}</Button>}
+ {/* A pending read must not add a row: the cards hold a fixed height, and a
+ line that appears while a connection settles and vanishes when it lands
+ is a jump under the person's pointer. Pending reads as the action rows
+ spinning and disabling instead; a failure is the one thing worth an
+ extra line, because it says what to do next. */}
+ {connectionError && <div className="onboarding-assistant-error" role="alert">
+ {connectionError}
+ {onRefreshConnection && <Button variant="link" size="xs" onClick={onRefreshConnection}>{t('common.retry')}</Button>}
</div>}
{error && <div className="onboarding-assistant-error" role="alert">
<p>{error.message}</p>
diff --git a/ui/src/components/onboarding/AssistantSetup.test.tsx b/ui/src/components/onboarding/AssistantSetup.test.tsx
index 5978b5aab..5fa3524bc 100644
--- a/ui/src/components/onboarding/AssistantSetup.test.tsx
+++ b/ui/src/components/onboarding/AssistantSetup.test.tsx
@@ -51,7 +51,7 @@ describe('assistant installation presentation', () => {
// same identity header as the name, not to a separate strip.
for (const name of ['Claude Code', 'Codex', 'OpenCode']) {
const identity = screen.getByRole('heading', { name }).closest('.onboarding-card-identity')!;
- expect(within(identity as HTMLElement).getByRole('checkbox', { name: 'Enabled' })).toBeTruthy();
+ expect(within(identity as HTMLElement).getByRole('switch', { name: `Enable ${name}` })).toBeTruthy();
}
fireEvent.click(row('Claude Code').getByRole('button', { name: 'Install' }));
fireEvent.click(row('Codex').getByRole('button', { name: 'Install' }));
@@ -83,6 +83,9 @@ describe('assistant installation presentation', () => {
render(wrap(<AgentDetection data={saved} onNext={vi.fn()} />));
expect(screen.queryByText('Subscription connected')).toBeNull();
expect(screen.queryByText('API Key connected')).toBeNull();
+ // The method rows disable while the initial connection read is in flight, so
+ // the click that opens the dialog has to wait for the read to settle.
+ await waitFor(() => expect(row('Claude Code').getByRole('button', { name: /Add subscription|API Key connected|Subscription connected/ }).hasAttribute('disabled')).toBe(false));
fireEvent.click(row('Claude Code').getByRole('button', { name: /Add subscription|API Key connected|Subscription connected/ }));
expect(await screen.findByRole('dialog')).toBeTruthy();
});
@@ -159,7 +162,7 @@ describe('assistant installation presentation', () => {
render(wrap(<AgentDetection data={data()} onNext={vi.fn()} onBack={back} />));
fireEvent.click(row('Claude Code').getByRole('button', { name: 'Install' }));
await waitFor(() => expect(row('Claude Code').getByRole('button', { name: 'Installed' })).toBeTruthy());
- fireEvent.click(row('Codex').getByRole('checkbox'));
+ fireEvent.click(row('Codex').getByRole('switch'));
fireEvent.click(screen.getByRole('button', { name: 'Back' }));
expect(back).toHaveBeenCalledWith({ agents: expect.objectContaining({
claude: expect.objectContaining({ status: 'ok', cli_path: '/isolated/bin/assistant' }),
@@ -174,6 +177,7 @@ describe('assistant installation presentation', () => {
const saved = data(); saved.agents.claude.status = 'ok';
const back = vi.fn();
render(wrap(<AgentDetection data={saved} onNext={vi.fn()} onBack={back} />));
+ await waitFor(() => expect(row('Claude Code').getByRole('button', { name: /Add subscription|API Key connected/ }).hasAttribute('disabled')).toBe(false));
fireEvent.click(row('Claude Code').getByRole('button', { name: /Add subscription|API Key connected/ }));
fireEvent.keyDown(await screen.findByRole('dialog'), { key: 'Escape' });
expect(screen.getByRole('button', { name: 'Back' }).hasAttribute('disabled')).toBe(true);
@@ -216,6 +220,7 @@ describe('assistant installation presentation', () => {
mock.api.installAgent.mockImplementation(() => new Promise((resolve) => { finishInstall = resolve; }));
const saved = data(); saved.agents.claude.status = 'ok';
render(wrap(<AgentDetection data={saved} onNext={vi.fn()} />));
+ await waitFor(() => expect(row('Claude Code').getByRole('button', { name: /Add subscription|API Key connected|Subscription connected/ }).hasAttribute('disabled')).toBe(false));
fireEvent.click(row('Claude Code').getByRole('button', { name: /Add subscription|API Key connected|Subscription connected/ }));
fireEvent.keyDown(screen.getByRole('dialog'), { key: 'Escape' });
fireEvent.click(row('Codex').getByRole('button', { name: 'Install' }));
@@ -254,12 +259,14 @@ describe('assistant installation presentation', () => {
const pending = <T,>() => { let resolve!: (value: T) => void; let reject!: (reason: Error) => void; const promise = new Promise<T>((yes, no) => { resolve = yes; reject = no; }); return { promise, resolve, reject }; };
const stateFor = (backend: string, enabled = true, application: BackendConnectionState['application'] = 'applied') => ({ ok: true, backend, enabled, installed: true, auth: 'api_key', application, ready: backend === 'claude' && enabled && application === 'applied', entry_eligible: backend === 'claude' && enabled && application === 'applied' });
+/** The enable control is a `role="switch"` button, so its state is its aria-checked. */
+const checkedOf = (node: HTMLElement) => node.getAttribute('aria-checked') === 'true';
describe('settled wizard enablement follows persistence and latest intent', () => {
function mountReady() {
const saved = data(); saved.agents.claude.status = 'ok';
mock.api.getBackendConnection.mockImplementation(async (name) => stateFor(name));
render(wrap(<AgentDetection data={saved} onNext={vi.fn()} />));
- return row('Claude Code').getByRole('checkbox') as HTMLInputElement;
+ return row('Claude Code').getByRole('switch') as HTMLElement;
}
it.each(['rejected', 'committed-failed', 'unreadable'] as const)('reconciles a single toggle (%s) and Retry repairs enabled without another write', async (outcome) => {
const checkbox = mountReady();
@@ -273,11 +280,11 @@ describe('settled wizard enablement follows persistence and latest intent', () =
}
fireEvent.click(checkbox);
await row('Claude Code').findByRole('alert');
- expect(checkbox.checked).toBe(outcome === 'rejected');
+ expect(checkedOf(checkbox)).toBe(outcome === 'rejected');
expect(screen.getByRole('button', { name: 'Enter workspace' }).hasAttribute('disabled')).toBe(true);
mock.api.getBackendConnection.mockImplementation(async (name) => stateFor(name));
fireEvent.click(row('Claude Code').getByRole('button', { name: 'Retry' }));
- await waitFor(() => expect(checkbox.checked).toBe(true));
+ await waitFor(() => expect(checkedOf(checkbox)).toBe(true));
await waitFor(() => expect(screen.getByRole('button', { name: 'Enter workspace' }).hasAttribute('disabled')).toBe(false));
expect(mock.api.mutateConfig).toHaveBeenCalledOnce();
});
@@ -292,14 +299,14 @@ describe('settled wizard enablement follows persistence and latest intent', () =
fireEvent.click(checkbox); fireEvent.click(checkbox);
await waitFor(() => expect(mock.api.mutateConfig).toHaveBeenCalledOnce());
await act(async () => oldRead.resolve(stateFor('claude', false)));
- expect(checkbox.checked).toBe(true);
+ expect(checkedOf(checkbox)).toBe(true);
await act(async () => off.reject(new Error('old off rejected')));
- expect(checkbox.checked).toBe(true);
+ expect(checkedOf(checkbox)).toBe(true);
expect(screen.getByRole('button', { name: 'Enter workspace' }).hasAttribute('disabled')).toBe(true);
mock.api.getBackendConnection.mockImplementation(async (name) => stateFor(name));
await act(async () => on.resolve({ agents: { claude: { enabled: true } } }));
await waitFor(() => expect(screen.getByRole('button', { name: 'Enter workspace' }).hasAttribute('disabled')).toBe(false));
- expect(checkbox.checked).toBe(true); expect(mock.api.mutateConfig).toHaveBeenCalledTimes(2);
+ expect(checkedOf(checkbox)).toBe(true); expect(mock.api.mutateConfig).toHaveBeenCalledTimes(2);
});
it('delayed modal config cannot undo a newer authoritative enablement result', async () => {
const checkbox = mountReady(); await row('Claude Code').findByRole('button', { name: 'API Key connected' });
@@ -311,7 +318,7 @@ describe('settled wizard enablement follows persistence and latest intent', () =
fireEvent.click(checkbox);
await waitFor(() => expect(mock.api.mutateConfig).toHaveBeenCalledOnce());
await act(async () => config.resolve(data()));
- expect(checkbox.checked).toBe(false);
+ expect(checkedOf(checkbox)).toBe(false);
expect(screen.getByRole('button', { name: 'Enter workspace' }).hasAttribute('disabled')).toBe(true);
});
});
diff --git a/ui/src/components/onboarding/BackendConnectionDialog.tsx b/ui/src/components/onboarding/BackendConnectionDialog.tsx
index 80fedddb8..b2c3732c2 100644
--- a/ui/src/components/onboarding/BackendConnectionDialog.tsx
+++ b/ui/src/components/onboarding/BackendConnectionDialog.tsx
@@ -324,7 +324,7 @@ export function BackendConnectionDialog({ backend, method, onClose, onConnected,
return <Dialog open onOpenChange={(open) => { if (!open) onClose(); }}>
<DialogContent ref={frame} className="connection-dialog" data-backend={backend} closeLabel={t('common.close')}>
<div className="connection-heading"><div className="connection-logo"><BackendIcon backend={backend} variant="brand" brandFit="mark" size={28} aria-hidden="true" /></div>
- <div><DialogTitle>{title}</DialogTitle><p>{t(`onboarding.setup.${backend}Description`)}</p></div>
+ <div><DialogTitle>{title}</DialogTitle><p>{t('onboarding.setup.forNamed', { name: getBackendUiMeta(backend).label })}</p></div>
</div>
<DialogDescription className="connection-intro connection-description">{intro}</DialogDescription>
{picking ? (
diff --git a/ui/src/components/onboarding/CollaborationStory.tsx b/ui/src/components/onboarding/CollaborationStory.tsx
index a3368f6ac..82b9a4409 100644
--- a/ui/src/components/onboarding/CollaborationStory.tsx
+++ b/ui/src/components/onboarding/CollaborationStory.tsx
@@ -7,19 +7,22 @@ import { ASSISTANT_ORDER, WORK_LINES, collaborationFrame } from './collaboration
import { useOnboardingMotion } from './motion';
/**
- * Wire geometry in the 976x271 collaboration box: two handoffs and the rounded return
- * loop. Every coordinate is the reference's own — the cards take the top 232 rows, so a
- * handoff crosses the 39.5 gap between them at y=116, their shared midline, and the
- * return runs from the third card's centre to the first's along y=261. The box is
- * stretched to whatever the diagram currently measures, so these hold at every width.
+ * Wire geometry in the 976x350 wire box, which the stylesheet sizes at the card's
+ * height times 350/300 — the reference's own proportion (271 around 232, 306 around
+ * 262, 385 around 330 all read that way). Taking the box's height from the card and
+ * putting the handoffs at y=150 of 350 is what keeps them on the cards' shared
+ * midline at every tier rather than only at the authored one; the return loop runs
+ * from the third card's centre to the first's along y=338, inside the band the stage
+ * reserves under the cards. The x coordinates are the card tracks' own edges in 976
+ * space, so the stretched viewBox keeps every port on a card edge at every width.
*/
const WIRES = [
- 'M299 116H339',
- 'M637 116H677',
- 'M826 232V245Q826 261 810 261H165Q149 261 149 245V232',
+ 'M299 150H339',
+ 'M637 150H677',
+ 'M826 300V322Q826 338 810 338H165Q149 338 149 322V300',
];
/** Only the four handoff ends are drawn: the return loop leaves its cards unmarked. */
-const PORTS: [number, number][] = [[299, 116], [339, 116], [637, 116], [677, 116]];
+const PORTS: [number, number][] = [[299, 150], [339, 150], [637, 150], [677, 150]];
const ICONS = [FileText, CodeXml, ListChecks];
// Every skeleton line as its share of the block it is measured in, so the three cards
// draw the widths design_desktop.pen draws at any scale. The card's content box is 198
@@ -111,7 +114,7 @@ function Circuit({ handoff }: { handoff: { wire: number; progress: number } | nu
opacity: Math.max(0, Math.min(1, handoff.progress / 0.08, (1 - handoff.progress) / 0.06)),
};
return (
- <svg className="onboarding-wires" viewBox="0 0 976 271" fill="none" preserveAspectRatio="none" aria-hidden="true">
+ <svg className="onboarding-wires" viewBox="0 0 976 350" fill="none" preserveAspectRatio="none" aria-hidden="true">
<defs>
<filter id={glowId} x="-100%" y="-500%" width="300%" height="1100%"><feGaussianBlur stdDeviation="3" /></filter>
</defs>
@@ -176,7 +179,7 @@ export function CollaborationStory() {
place: logo, name, and the trailing slot this step fills with the
assistant's role and the next one with its enable switch. */}
<div className="onboarding-card-identity">
- <BackendIcon backend={backend} size={28} variant="brand" aria-hidden="true" />
+ <span className="onboarding-card-logo"><BackendIcon backend={backend} size={28} variant="brand" aria-hidden="true" /></span>
<strong className="onboarding-card-name">{t(`onboarding.story.${backend}.name`)}</strong>
<span className="onboarding-card-role">{t(`onboarding.story.${backend}.role`)}</span>
</div>
diff --git a/ui/src/components/onboarding/onboarding.css b/ui/src/components/onboarding/onboarding.css
index 5fc953f75..754e679a4 100644
--- a/ui/src/components/onboarding/onboarding.css
+++ b/ui/src/components/onboarding/onboarding.css
@@ -5,14 +5,14 @@
* purpose: they encode exact approved design numbers without moving any global token.
*
* The `Web setup` frames and the `Web setup · Responsive rules & states` note are the
- * measured reference for everything below: a 976 content box on a standard desktop
- * growing to 1200 on a large one, a 299-wide relay card whose height follows the
- * window rather than the width, and one heading / stage / action column that the
- * introduction and the connection both stand in.
- *
- * Widths are capped fluid, never fixed: the card grid uses percentage tracks and the
- * diagram is sized from the card it contains, so card width, handoff gaps, diagram
- * height and the stretched wire viewBox stay proportional at every container width.
+ * measured reference for everything below. The frames draw the composition at discrete
+ * readings — a 232-tall card under an 800px window, 262 under 900, 300 above 1000, 330
+ * at 1920x1080 and 258 stacked on a phone — each with its own header height, heading
+ * type, card interior and action size. The bands below are exactly those readings:
+ * nothing interpolates between them because the design never does. One content column
+ * of `clamp(976px, 62.5vw, 1200px)` still caps the width between the gutters and the
+ * cap, and the card tracks, handoff gaps and stretched wire viewBox stay percentages of
+ * it, so the horizontal composition is fluid while the vertical rhythm is authored.
*
* The welcome and the setup are one composition seen twice. The three cards keep the
* same frame, the same tracks and the same identity header in both — logo, name, and
@@ -22,13 +22,21 @@
* worn by both steps.
*/
.onboarding-shell {
- --ob-card: linear-gradient(150deg, #151521, #101019);
+ --ob-card: #11111c;
--ob-card-border: #ffffff1c;
- --ob-active-border: #5bffa059;
- /* The reference's own exterior glow — a 28px, spread-less mint at #5BFFA060 — now
- carried by one managed token instead of approximated by stacking two rungs of the
- sized scale. The inset line is only the top highlight, not the glow. */
- --ob-active-shadow: var(--shadow-glow-onboarding-mint), inset 0 1px 0 #5bffa012;
+ --ob-active-border: #5bffa057;
+ /* The reference's active and hovered card wear one tight halo — `0 2px 12px
+ #5BFFA038` in dark, `0 2px 16px -4px #10B98124` in light (mK2JX / ZaXoW) —
+ not a spreadless 28px bloom. The same shadow names the working card in the
+ introduction and the hovered card in the connection, which is the whole
+ point of one composition seen twice. */
+ --ob-active-shadow: var(--shadow-glow-onboarding-mint);
+ --ob-divider: #ffffff14;
+ /* The enable switch the connection puts in the role's slot: a 42x24 track with
+ a 2px border and a 16px thumb, drawn per theme by the reference (eq9QT) —
+ dark keeps a lit border on the on-state, light keeps none. */
+ --ob-notice-fg: #d0ddd6;
+ --ob-notice-link: #3fe0e5;
--ob-idle-dot: #4c5060;
--ob-skeleton: #ffffff12;
--ob-skeleton-strong: #ffffff28;
@@ -55,40 +63,69 @@
--ob-notice-bg: #172f27;
--ob-notice-border: #30473e;
- /* One content width for the header, the story and the assistant cards, written as the
- rule the reference's four rows describe rather than as four numbers: 976 on a
- standard desktop, growing only once the window can spend 62.5% of itself on it, and
- stopping at 1200. That reaches exactly 976 at both 1366 and 1440 and exactly 1200 at
- 1920 — the three authored desktop rows — with no breakpoint between them.
- Every dependent number is a ratio of this box, so the cap alone moves the whole
- composition and nothing can drift out of proportion. */
+ /* The middle band — a 900px-tall window — is the base tier; the bands below
+ restate only what their frame draws differently. */
+ --ob-header-h: 78px;
+ --ob-header-pad: 48.96px;
+ --ob-card-h: 262px;
+ --ob-card-pv: 20px;
+ --ob-card-ph: 21px;
+ --ob-card-gap: 14px;
+ --ob-id-h: 43px;
+ --ob-id-pad: 14px;
+ --ob-id-gap: 9px;
+ --ob-card-logo: 28px;
+ --ob-card-name: 16px;
+ --ob-spacer-2: 12px;
+ --ob-note-fs: 12px;
+ --ob-note-lh: 20px;
+ --ob-method-h: 38px;
+ --ob-method-fs: 13px;
+ --ob-method-gap: 8px;
+ --ob-life-h: 30px;
+ --ob-h1: 34px;
+ --ob-h1-lh: 46px;
+ --ob-sub: 15px;
+ --ob-sub-lh: 24px;
+ --ob-heading-gap: 8px;
+ /* The heading block reserves its tier's own height — the two lines of type plus
+ the slack the frame draws under them — and then sits its tier's own distance
+ above the stage. Both numbers come from the frames' heading boxes: 71 and 15
+ under an 800px window, 88 and 12 under 900, 132 and 18 at 1920x1080. */
+ --ob-heading-h: 88px;
+ --ob-heading-mb: 12px;
+ --ob-main-top: 16px;
+ --ob-access-w: 740px;
+ --ob-access-pad: 28px;
+ --ob-access-lead-fs: 14px;
+ --ob-access-lead-gap: 16px;
+ --ob-access-circle: 52px;
+ --ob-action-h: 56px;
+ --ob-action-fs: 17px;
+ --ob-action-icon: 19px;
+ /* The story's status caption is authored per tier like the rest of the card's
+ type: 12 on the standard desktops, 15 at the large reading, 13 stacked. */
+ --ob-cap-fs: 12px;
+
+ /* One content width for the story and the assistant cards, written as the
+ rule the reference's four rows describe rather than as four numbers: 976 on
+ a standard desktop, growing only once the window can spend 62.5% of itself
+ on it, and stopping at 1200. That reaches exactly 976 at both 1366 and 1440
+ and exactly 1200 at 1920 — the three authored desktop rows — with no
+ breakpoint between them. The header is full-bleed instead: its logo and
+ language button sit at the window's own gutter, not at the column's edge. */
--ob-content-w: clamp(976px, 62.5vw, 1200px);
- /* 20px shell padding plus this bar is the setup's authored 64.5 top offset (IWQi6),
- which it holds at every window height. The welcome is centred instead and reaches
- the same 65 only at the design's own 756 content box. */
- --ob-header-h: 45px;
- /* The design's own side padding, so the cap is reached at exactly its 1200 frame. */
--ob-gutter: 48px;
- /* The relay card, and the one number the rest of the composition is measured from.
- The reference grows it with the WINDOW, not with the width: 232 at 1366x768, 262 at
- 1440x900, 330 at 1920x1080 — all three within a few pixels of 30% of the window
- height, and all three almost exactly a third of the main column. Height is the right
- source: a card holds a fixed stack of rows, and it is vertical room that decides how
- much of one fits. The width term is the guard for a short, wide window, where 30% of
- the height would be taller than the card is wide. */
- --ob-card-h: min(calc(var(--app-shell-h) * 0.3), calc(min(100cqw, var(--ob-content-w)) * 0.3));
- /* One design unit, taken from the card the interior belongs to: the frames are drawn
- on a 232-tall card, so a radius, a padding or a skeleton bar is its authored number
- times this unit and the interior stays in proportion as the card grows. It is
- defined once, here, so the story's cards and the connection's cannot be given
- different units by editing one of them. */
+ /* One design unit for the story's interior, taken from the card it is drawn
+ in: the skeletons, wires and status glyph scale with the card while the
+ card chrome takes its authored tier numbers above. */
--ob-u: calc(var(--ob-card-h) / 232);
- /* The block between the heading and the action, floored so both steps spend the same
- height on it. The reference draws exactly 64 more than the card in all three desktop
- rows, and spends it the same way in both steps: the introduction on the return wire's
- band under the cards, the connection on a 20 gap and the 44 import capsule. So one
- number holds the action still both when the step changes and when the offer is
- dismissed — see `.onboarding-stage`. */
+ /* The block between the heading and the action, floored so both steps spend
+ the same height on it. The reference draws exactly 64 more than the card in
+ every desktop row — the introduction on the return wire's band under the
+ cards, the connection on a 20 gap and the 44 import capsule — so one number
+ holds the action still both when the step changes and when the offer is
+ dismissed. It is also the diagram's own height: the return band IS the 64. */
--ob-stage-h: calc(var(--ob-card-h) + 64px);
background: var(--background);
@@ -97,7 +134,7 @@
overflow-y: auto;
display: flex;
flex-direction: column;
- padding: 20px var(--ob-gutter);
+ padding: 0;
}
@media (prefers-color-scheme: light) {
:root:not([data-theme="dark"]) .onboarding-shell { --ob-theme: light; }
@@ -108,12 +145,14 @@
:root:not([data-theme="dark"]) .onboarding-shell {
--ob-card: #ffffff;
--ob-card-border: #08081212;
- /* The light frame's own active card (waUhu): a #10B98160 edge over a 16/-4
- #10B98170 halo, and no inset highlight — that top line is the dark card's
- lit rim, and on white it reads as a seam. The halo is the same managed
- token as dark; the token itself is what carries light's geometry. */
- --ob-active-border: #10b98160;
+ /* The light frame's own active card (ZaXoW): a #10B981 edge over a 16/-4
+ #10B98124 halo, and no inset highlight — that top line is the dark card's
+ lit rim, and on white it reads as a seam. */
+ --ob-active-border: #10b981;
--ob-active-shadow: var(--shadow-glow-onboarding-mint);
+ --ob-divider: #08081214;
+ --ob-notice-fg: #435f52;
+ --ob-notice-link: #0e7490;
--ob-idle-dot: #5c6079;
--ob-skeleton: #08081214;
--ob-skeleton-strong: #08081224;
@@ -143,9 +182,11 @@
[data-theme="light"] .onboarding-shell {
--ob-card: #ffffff;
--ob-card-border: #08081212;
- /* waUhu's edge and halo — see the prefers-color-scheme block above. */
- --ob-active-border: #10b98160;
+ --ob-active-border: #10b981;
--ob-active-shadow: var(--shadow-glow-onboarding-mint);
+ --ob-divider: #08081214;
+ --ob-notice-fg: #435f52;
+ --ob-notice-link: #0e7490;
--ob-idle-dot: #5c6079;
--ob-skeleton: #08081214;
--ob-skeleton-strong: #08081224;
@@ -171,16 +212,176 @@
--ob-notice-border: #cedfd5;
}
+/* ---- Design tiers ---------------------------------------------------------
+ * Four desktop readings and one phone, each restating only the numbers its
+ * frame draws. Order matters: the large band sits after the tall one so a
+ * 1920x1080 window is large, and the phone band last so it wins outright. */
+@media (max-height: 800px) and (min-width: 760px) {
+ .onboarding-shell {
+ --ob-header-h: 70px;
+ --ob-header-pad: 40.8px;
+ --ob-card-h: 232px;
+ --ob-card-pv: 17px;
+ --ob-card-ph: 19px;
+ --ob-card-gap: 10px;
+ --ob-id-h: 39px;
+ --ob-id-pad: 10px;
+ --ob-card-logo: 28px;
+ --ob-card-name: 16px;
+ --ob-spacer-2: 10px;
+ --ob-method-h: 34px;
+ --ob-method-gap: 7px;
+ --ob-life-h: 28px;
+ --ob-h1: 32px;
+ --ob-h1-lh: 44px;
+ --ob-sub: 14px;
+ --ob-sub-lh: 22px;
+ --ob-heading-gap: 6px;
+ --ob-heading-h: 72px;
+ --ob-heading-mb: 15px;
+ --ob-main-top: 6px;
+ --ob-access-pad: 22px;
+ --ob-access-lead-fs: 13px;
+ --ob-access-lead-gap: 12px;
+ --ob-action-h: 52px;
+ --ob-action-fs: 16px;
+ --ob-action-icon: 18px;
+ }
+}
+@media (min-height: 1001px) and (min-width: 760px) and (max-width: 1599px) {
+ .onboarding-shell {
+ --ob-card-h: 300px;
+ --ob-card-logo: 32px;
+ }
+}
+@media (min-width: 1600px) and (min-height: 950px) {
+ .onboarding-shell {
+ --ob-header-h: 94px;
+ --ob-header-pad: 64px;
+ --ob-card-h: 330px;
+ --ob-card-pv: 29px;
+ --ob-card-ph: 29px;
+ --ob-card-gap: 18px;
+ --ob-id-h: 56px;
+ --ob-id-pad: 18px;
+ --ob-id-gap: 12px;
+ --ob-card-logo: 35px;
+ --ob-card-name: 20px;
+ --ob-note-fs: 14px;
+ --ob-note-lh: 23px;
+ --ob-method-h: 42px;
+ --ob-method-fs: 14px;
+ --ob-cap-fs: 15px;
+ --ob-h1: 50px;
+ --ob-h1-lh: 68px;
+ --ob-sub: 20px;
+ --ob-sub-lh: 31px;
+ --ob-heading-gap: 12px;
+ --ob-heading-h: 132px;
+ --ob-heading-mb: 18px;
+ --ob-main-top: 90px;
+ --ob-access-w: 830px;
+ --ob-access-lead-fs: 17px;
+ }
+}
+
+/* The top bar is full-bleed: the logo lockup and the language button sit at the
+ window's own gutter, which is what the reference draws at every size, while
+ the composition below keeps its capped column. */
.onboarding-shell > header {
display: flex;
align-items: center;
justify-content: space-between;
flex-shrink: 0;
height: var(--ob-header-h);
- max-width: var(--ob-content-w);
width: 100%;
- margin: 0 auto;
+ padding: 0 var(--ob-header-pad);
+}
+.onboarding-brand {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ min-width: 0;
+}
+/* The logo asset already carries its white rounded tile, so the header wears it
+ as-is — no border, no glow — clipped to the tile's own radius. */
+.onboarding-brand-mark {
+ width: 44px;
+ height: 44px;
+ border-radius: 12px;
+ overflow: hidden;
+ display: block;
+ flex-shrink: 0;
+}
+.onboarding-brand-mark img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ display: block;
+}
+.onboarding-brand-wordmark {
+ display: flex;
+ flex-direction: column;
+ min-width: 0;
+}
+.onboarding-brand-wordmark strong {
+ font-size: 22px;
+ font-weight: 600;
+ line-height: 28px;
+ letter-spacing: -0.6px;
+ color: var(--foreground);
+}
+.onboarding-brand-wordmark span {
+ font-size: 12px;
+ line-height: 18px;
+ color: var(--muted);
+}
+.onboarding-language { position: relative; }
+.onboarding-language-button {
+ display: grid;
+ place-items: center;
+ width: 44px;
+ height: 44px;
+ border: 1px solid var(--border);
+ border-radius: 50%;
+ background: var(--surface);
+ color: var(--muted);
+ transition: background-color 0.15s, color 0.15s;
+}
+.onboarding-language-button:hover { background: var(--surface-2); color: var(--foreground); }
+.onboarding-language-button:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
+.onboarding-language-menu {
+ position: absolute;
+ top: 52px;
+ right: 0;
+ z-index: 50;
+ min-width: 160px;
+ padding: 6px;
+ display: flex;
+ flex-direction: column;
+ gap: 2px;
+ border: 1px solid var(--border);
+ border-radius: 10px;
+ background: var(--popover);
+ color: var(--popover-foreground);
+ box-shadow: 0 8px 24px rgb(0 0 0 / 0.13);
}
+.onboarding-language-menu button {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 12px;
+ width: 100%;
+ padding: 10px;
+ border: 0;
+ border-radius: 6px;
+ background: transparent;
+ color: inherit;
+ font-size: 14px;
+ text-align: left;
+}
+.onboarding-language-menu button:hover { background: var(--surface-2); }
+
/* `1 0 auto`: this box is never shorter than what it holds, so a composition taller
than the window pushes the shell into its own scroll rather than being clipped above
the fold — and centring a child inside it can never push that child off the top. */
@@ -189,9 +390,9 @@
display: flex;
align-items: flex-start;
justify-content: center;
- /* Makes the content box measurable in `cqw`, which is how `--ob-stage-h` turns
- the diagram's own proportion into a height a step without a diagram can
- match. A percentage cannot: `min-height: %` resolves against height. */
+ padding: var(--ob-main-top) var(--ob-gutter) 20px;
+ /* Makes the content box measurable in `cqw`, which is how the card's width
+ guard resolves. A percentage cannot: `min-height: %` resolves against height. */
container-type: inline-size;
}
/* Owner amendment, 2026-09-18: both steps share the same top anchor.
@@ -203,13 +404,13 @@
width: 100%;
max-width: var(--ob-content-w);
margin: 0 auto;
- /* The reference's own rhythm: 20 from the heading to the stage and 20 from the stage
- to the action, in every desktop row and on the phone. */
- gap: 20px;
+ /* Spacing is carried by margins, not by one flex gap: the heading's distance to
+ the stage is a tier number (15 / 12 / 18 / 27) while the stage's distance to
+ the action is 20 in every row, and the access block sits 40 under the action. */
}
/* The block between the heading and the action, in both steps, and the one owner of
- every layout reservation this screen makes. Its floor is `--ob-card-h + 64`, which is
- what the reference spends on it in both steps at every accepted width — so the
+ every layout reservation this screen makes. Its floor is `--ob-card-h + 64`, which
+ is what the reference spends on it in both steps at every accepted width — so the
shorter step is padded to exactly the taller one's height instead of both being given
a number to keep in sync by hand. That is what puts "Get started" and "Enter
Workbench" on identical coordinates: same heading above, same stage height, same
@@ -230,42 +431,66 @@
align-items: center;
gap: 20px;
min-height: var(--ob-stage-h);
+ margin-bottom: 20px;
}
-.onboarding-heading { text-align: center; width: 100%; }
-.onboarding-heading h1, .onboarding-heading h2 { min-height: 46px; }
-.onboarding-heading p { min-height: 22px; }
-/* The reference's four rows read as one line rather than four sizes: 32 at 1366, 34 at
- 1440, 50 at 1920 and 30 on a phone are all `3.333vw - 14`, held between 30 and 50 —
- and the body under it is `1.042vw` between 14 and 20, which lands on its authored
- 14 / 15 / 20 / 14 the same way. The tracking follows the size proportionally
- (-1.6 at 34 is -0.047em), so a larger headline is never tighter than the one drawn. */
+/* The reference swaps the two screens as one composition: the outgoing layer
+ blurs out upward while the incoming one arrives from below with the same
+ blur, over 200ms. One keyed node per step can only draw the arrival, and the
+ arrival is the half a person watches; CSS animation keeps it off the frozen
+ clock the geometry tests hold the story on. */
+.onboarding-step {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+.onboarding-step-enter {
+ animation: onboarding-step-enter 450ms cubic-bezier(0.16, 1, 0.3, 1) both;
+}
+@keyframes onboarding-step-enter {
+ from { opacity: 0; transform: translateY(10px); filter: blur(3px); }
+ to { opacity: 1; transform: translateY(0); filter: blur(0); }
+}
+
+.onboarding-heading {
+ text-align: center;
+ width: 100%;
+ min-height: var(--ob-heading-h);
+ margin-bottom: var(--ob-heading-mb);
+}
+/* The heading block reserves its tier's own two lines of type, so a title that wraps
+ in one step or one language and not the other cannot move the stage below it. On
+ phones the reserve is in `em`, because the size there is a tier variable and a
+ wrapped title in either language has to leave the cards on the same line. */
.onboarding-heading h1, .onboarding-heading h2 {
- font-size: clamp(30px, calc(3.333vw - 14px), 50px);
- line-height: 1.35;
+ min-height: var(--ob-h1-min, var(--ob-h1-lh));
+ font-size: var(--ob-h1);
+ line-height: var(--ob-h1-lh);
font-weight: 600;
- letter-spacing: -0.047em;
+ letter-spacing: -0.035em;
}
.onboarding-heading p {
- margin-top: 10px;
- font-size: clamp(14px, 1.042vw, 20px);
- line-height: 1.55;
+ margin-top: var(--ob-heading-gap);
+ min-height: var(--ob-p-min, var(--ob-sub-lh));
+ font-size: var(--ob-sub);
+ line-height: var(--ob-sub-lh);
color: var(--muted);
}
/* ---- Collaboration story ------------------------------------------------ */
.onboarding-story { position: relative; width: 100%; display: flex; align-items: flex-start; justify-content: center; }
-/* The diagram is the card plus the return wire's band: the reference draws a 271-tall
- box around a 232-tall card at 1366, a 306 around a 262 at 1440 and a 385 around a 330
- at 1920 — one ratio, held exactly. Sizing it from the card rather than from its own
- width is what keeps the handoff wire on the cards' vertical midpoint at every window,
- because the stretched viewBox and the card grid now answer to the same number. */
+/* The diagram is the card plus the return wire's band beneath it: the reference draws
+ a 296-tall box around a 232-tall card, a 326 around a 262 and a 394 around a 330 —
+ the card plus 64 at every reading, which is the stage's own floor. The wires inside
+ take their own height from the card (see `.onboarding-wires`), which is what keeps
+ the handoffs on the cards' midline at every tier. */
.onboarding-collaboration {
position: relative;
width: 100%;
max-width: var(--ob-content-w);
- height: calc(var(--ob-card-h) * 271 / 232);
+ height: var(--ob-stage-h);
container-type: inline-size;
}
/* Three 299-wide cards in a 976 box, which is the same fraction as three 367 in 1200 —
@@ -281,18 +506,18 @@
}
/* One frame, worn by the story card and the connection card. Everything that decides
where a card sits and how big it is lives here, so the two steps cannot drift apart
- by editing one of them: the radius and the padding resolve from the same design unit,
- the tracks are the same percentage, and both steps take their height from
- `--ob-card-h`. The reference's own 19/17 padding at 1366 and 21/20 at 1440 are this
- one pair of authored numbers seen at two card heights. */
+ by editing one of them: the radius is the reference's own 18 at every tier, the
+ padding and the inner rhythm are the tier's authored numbers, and both steps take
+ their height from `--ob-card-h`. */
.onboarding-collaboration-card, .onboarding-assistant {
display: flex;
flex-direction: column;
min-width: 0;
- border-radius: calc(16 * var(--ob-u));
+ border-radius: 18px;
border: 1px solid var(--ob-card-border);
background: var(--ob-card);
- padding: calc(17 * var(--ob-u)) calc(19 * var(--ob-u));
+ padding: var(--ob-card-pv) var(--ob-card-ph);
+ gap: var(--ob-card-gap);
transition: border-color 650ms, box-shadow 650ms;
}
/* The story's cards are cut from a box whose height the diagram already fixed; the
@@ -306,12 +531,101 @@
border-color: var(--ob-active-border);
box-shadow: var(--ob-active-shadow);
}
-/* The card's 198 of content is authored as a 39 identity header, 11, a 23 status line
- and the 118 skeleton under it. The skeleton is the flexible one, so anything the
- others fail to claim pools below the last bar — which is exactly what an unscaled
- 16px glyph and 28px logo did at the cap. The fixed rows therefore reserve their
- authored share in design units, which also keeps the three cards' status lines level
- even when one caption is longer than another. */
+/* The card's identity, at its head — "the assistant logo and name stay at the top in
+ both states; connection state replaces roles with enable switches", which is the one
+ rule the whole intro/connection invariant rests on. Both steps draw this from the same
+ class and the same three slots: logo, name, and a trailing slot the introduction fills
+ with a role and the connection with an enable switch. There is one identity header in
+ the stylesheet, so the two steps cannot place it differently, and the body underneath
+ takes every difference between them.
+ The reference rules this header off from the body with a hairline in both steps, so
+ the divider lives here too; its offset and the row's height are tier numbers, because
+ a logo that does not scale must not be what sizes the row. */
+.onboarding-card-identity {
+ display: flex;
+ align-items: center;
+ gap: var(--ob-id-gap);
+ flex-shrink: 0;
+ min-height: var(--ob-id-h);
+ padding-bottom: var(--ob-id-pad);
+ border-bottom: 1px solid var(--ob-divider);
+}
+/* The tier's own logo size has to win over the inline size `BackendIcon` writes on
+ its span — the mark is authored per tier (28 / 30 / 32 / 35), not per call site —
+ so this is the one place the sheet overrides an inline style. */
+.onboarding-card-logo, .onboarding-card-logo > span {
+ width: var(--ob-card-logo) !important;
+ height: var(--ob-card-logo) !important;
+}
+.onboarding-card-logo { flex-shrink: 0; }
+.onboarding-assistant-enable { flex-shrink: 0; }
+.onboarding-card-logo svg {
+ width: 100%;
+ height: 100%;
+ display: block;
+}
+.onboarding-card-name {
+ font-size: var(--ob-card-name);
+ font-weight: 550;
+ letter-spacing: -0.3px;
+ line-height: 1.5;
+ /* At the tall tier's still-three-column band a card can be narrower than its
+ logo, switch and an unbreakable name; the name yields first — wrapping or
+ ellipsising — before the row spills through the card edge. */
+ min-width: 0;
+ overflow-wrap: anywhere;
+}
+/* The trailing slot. The role is text; the connection puts its switch here instead, and
+ both are pushed to the card's inner edge by the same rule. */
+.onboarding-card-role, .onboarding-card-identity > .onboarding-assistant-enable {
+ margin-left: auto;
+ font-size: 11px;
+ color: var(--muted);
+ white-space: nowrap;
+}
+.onboarding-assistant-enable { display: flex; align-items: center; }
+/* The enable switch: a real `role="switch"` in the reference's own geometry — a 42x24
+ track, a 2px border and a 16px thumb that travels 18px. The invisible ring around it
+ is the tap target, exactly as the reference draws it. */
+.onboarding-enable-switch {
+ position: relative;
+ display: block;
+ width: 42px;
+ height: 24px;
+ padding: 2px;
+ border: 2px solid var(--switch-onboarding-border-off);
+ border-radius: 999px;
+ background: var(--switch-onboarding-track-off);
+ cursor: pointer;
+ transition: background-color 0.18s, border-color 0.18s;
+}
+.onboarding-enable-switch::before {
+ content: "";
+ position: absolute;
+ inset: -10px -1px;
+ border-radius: 999px;
+}
+.onboarding-enable-switch > span {
+ display: block;
+ width: 16px;
+ height: 16px;
+ border-radius: 50%;
+ background: var(--switch-onboarding-thumb-off);
+ transition: transform 0.18s, background-color 0.18s;
+}
+.onboarding-enable-switch[aria-checked="true"] {
+ background: var(--switch-onboarding-track-on);
+ border-color: var(--switch-onboarding-border-on);
+}
+.onboarding-enable-switch[aria-checked="true"] > span {
+ background: var(--switch-onboarding-thumb-on);
+ transform: translateX(18px);
+}
+.onboarding-enable-switch:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
+
+/* The story's status line keeps its authored share of the card in design units, which
+ keeps the three cards' status lines level even when one caption is longer than
+ another, and leaves the skeleton as the flexible row. */
.onboarding-story-status {
display: flex;
align-items: center;
@@ -319,7 +633,7 @@
flex-shrink: 0;
min-height: calc(23 * var(--ob-u));
color: var(--muted);
- font-size: 10px;
+ font-size: var(--ob-cap-fs);
}
.onboarding-status-icon { flex-shrink: 0; }
.onboarding-status-text { white-space: nowrap; }
@@ -438,36 +752,21 @@
100% { color: var(--mint-ink); border-color: var(--ob-check-border); background: var(--ob-check-done); }
}
-/* The card's identity, at its head — "the assistant logo and name stay at the top in
- both states; connection state replaces roles with enable switches", which is the one
- rule the whole intro/connection invariant rests on. Both steps draw this from the same
- class and the same three slots: logo, name, and a trailing slot the introduction fills
- with a role and the connection with an enable switch. There is one identity header in
- the stylesheet, so the two steps cannot place it differently, and the body underneath
- takes every difference between them.
- The 28px logo does not scale, so the row reserves its authored height in design units
- rather than being sized by the logo — otherwise it shrinks as the card grows and hands
- the difference to the body below. */
-.onboarding-card-identity {
- display: flex;
- align-items: center;
- gap: 11px;
- flex-shrink: 0;
- min-height: calc(39 * var(--ob-u));
- margin-bottom: calc(11 * var(--ob-u));
-}
-.onboarding-card-identity > svg { flex-shrink: 0; }
-.onboarding-card-name { font-size: 14px; font-weight: 550; letter-spacing: -0.3px; white-space: nowrap; }
-/* The trailing slot. The role is text; the connection puts its switch here instead, and
- both are pushed to the card's inner edge by the same rule. */
-.onboarding-card-role, .onboarding-card-identity > .onboarding-assistant-enable {
- margin-left: auto;
- font-size: 11px;
- color: var(--muted);
- white-space: nowrap;
+/* The wires are stretched over the card grid plus the return band, so every coordinate
+ stays proportional: the handoffs cross the cards' midline at y=116 of the 296 box and
+ the return loop runs under the cards at y=261. */
+/* The wire box is the card times the reference's own 350/300, hung from the diagram's
+ top: the handoffs then sit on the cards' midline at every tier, and the return loop
+ lands inside the band the stage reserves under the cards. */
+.onboarding-wires {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: calc(var(--ob-card-h) * 350 / 300);
+ overflow: visible;
+ pointer-events: none;
}
-
-.onboarding-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.onboarding-wire { stroke: var(--ob-wire); stroke-width: 1; }
.onboarding-port { fill: var(--ob-port); stroke: var(--ob-port-border); stroke-width: 1; }
/* A single 16-unit segment of a 100-unit path: the pulse crosses once and leaves. */
@@ -481,15 +780,14 @@
.onboarding-pulse-halo { stroke: var(--ob-pulse-glow); stroke-width: 4; }
/* The caption rides the return wire rather than the container floor: the wire's
- horizontal run is at y=261 of the 271 viewBox, so this is the same fraction of
- whatever height the diagram currently has. Centring on that line (rather than
- sitting under it) is what makes the capsule read as a label cut into the wire,
- and it holds at every band because both numbers come from the same box.
+ horizontal run is at y=338 of the wire box, whose height is the card times 350/300,
+ so this is the same line at every tier. Centring on it (rather than sitting under
+ it) is what makes the capsule read as a label cut into the wire.
The fill is the page at 90% so the wire stays faintly legible through it
instead of being erased — a mask, not a patch. */
.onboarding-story-caption {
position: absolute;
- top: calc(100% * 261 / 271);
+ top: calc(var(--ob-card-h) * 338 / 300);
left: 50%;
transform: translate(-50%, -50%);
padding: 0 12px;
@@ -505,20 +803,32 @@
/* ---- Access tiles -------------------------------------------------------- */
-/* "The six access icons form a centred 560px row" — a fixed span, not a fraction of the
- content box. It is the one block on this screen that does not grow with the window,
- and deliberately: six destinations a person picks one of read as a row of logos at the
- size a logo is legible, and stretching them to 1200 turns that row into a rule across
- the bottom of the page. 20 above the lead and the step's own 20 below the action put
- the reference's 40 between the two, and the lead's 12 puts its 22 above the row. */
-.onboarding-access { width: 560px; max-width: 100%; margin-top: 20px; text-align: center; padding: 22px 0; }
-.onboarding-access > p { font-size: 12px; line-height: 22px; color: var(--muted); margin-bottom: 12px; }
+/* The access block is the one composition that grows with the window in bounded
+ steps — 740 wide on a standard desktop, 830 on a large one — while the row of six
+ circles inside it stays a centred 560: six destinations a person picks one of read
+ as a row of logos at the size a logo is legible, and stretching them to the block's
+ width turns that row into a rule across the bottom of the page. */
+.onboarding-access { width: var(--ob-access-w); max-width: 100%; margin-top: 40px; padding: var(--ob-access-pad) 0 0; text-align: center; }
+.onboarding-access > p {
+ font-size: var(--ob-access-lead-fs);
+ line-height: 1.6;
+ color: var(--muted);
+ margin-bottom: var(--ob-access-lead-gap);
+}
/* Six entries on one row: a circular logo container with its name under it, and no
plate around the pair. The six read as a row of destinations rather than six
buttons competing with the action below, which is what the tiled version did.
The tracks take the row whole — the reference's 92.7 pitch is 560/6 — and the tile's
- own 52 circle is what sets it apart from its neighbour, not a column gap. */
-.onboarding-access-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 0; list-style: none; }
+ own circle is what sets it apart from its neighbour, not a column gap. */
+.onboarding-access-grid {
+ width: 560px;
+ max-width: 100%;
+ margin: 0 auto;
+ display: grid;
+ grid-template-columns: repeat(6, minmax(0, 1fr));
+ gap: 12px 0;
+ list-style: none;
+}
.onboarding-access-tile {
min-width: 0;
display: flex;
@@ -538,8 +848,8 @@
.onboarding-access-label { min-height: 18px; overflow-wrap: anywhere; }
.onboarding-access-tile:focus-visible { outline: 1px solid var(--mint); outline-offset: 2px; }
.onboarding-access-icon {
- height: 52px;
- width: 52px;
+ height: var(--ob-access-circle);
+ width: var(--ob-access-circle);
flex-shrink: 0;
border-radius: 50%;
border: 1px solid var(--border);
@@ -580,17 +890,22 @@
fixed 299px — is what keeps the intro's "Get started" and the connection step's
"Enter Workbench" on the same coordinates at every width, since both live in the same
capped box and take the same percentage of it. The 144 floor still applies once the
- fraction falls under a comfortable target. */
+ fraction falls under a comfortable target. Height, type and arrow follow the tier:
+ 52 under an 800px window, 56 above it, 54 on a phone. */
.onboarding-action-w {
width: calc(100% * 299 / 976);
max-width: 100%;
min-width: 144px;
- height: 52px;
- border-radius: 10px;
- font-size: 13px;
+ height: var(--ob-action-h);
+ border-radius: 12px;
+ font-size: var(--ob-action-fs);
font-weight: 600;
- padding: 0 22px;
- gap: 10px;
+ padding: 0 23px;
+ gap: 12px;
+}
+.onboarding-action-w > svg {
+ width: var(--ob-action-icon);
+ height: var(--ob-action-icon);
}
/* The reference draws this CTA as a flat mint fill — design.pen has no glow on any
@@ -629,32 +944,91 @@
justify-content: space-between;
container-type: inline-size;
}
-/* The card's body reads top to bottom the way the story's does: the identity header,
- then a state line where the story puts its caption, then the work. The body is the
- flexible one, so an error or a wrapped action grows downward and the three identity
- headers stay level with each other and with the intro's. */
+/* The state row is where the story puts its caption: the lifecycle pill on the left
+ and, opposite it, the one action the pill offers — update or install — on the right.
+ Wrapping is allowed so a long localized pill drops the button to its own line
+ rather than clipping it. */
.onboarding-assistant-state {
display: flex;
align-items: center;
+ justify-content: space-between;
flex-wrap: wrap;
gap: 8px;
flex-shrink: 0;
- min-height: calc(28 * var(--ob-u));
+ min-height: var(--ob-life-h);
+}
+.onboarding-assistant-lifecycle {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 8px;
+ width: 100%;
+ min-height: var(--ob-life-h);
+}
+.onboarding-life-action {
+ height: var(--ob-life-h);
+ min-height: var(--ob-life-h);
+ border-radius: 8px;
+ padding: 0 11px;
+ font-size: 12px;
+ font-weight: 500;
+ gap: 6px;
+ flex-shrink: 0;
+}
+/* The card's own chrome, not the shared button variant's: the reference draws these
+ rows on the card's fill with the strong border, in both themes, and the connected
+ row wears the same frame with a mint check instead of an icon-and-label action. */
+.onboarding-method-row, .onboarding-life-action {
+ border: 1px solid var(--border-strong);
+ background: var(--ob-card);
+ color: var(--foreground);
+ box-shadow: none;
+}
+.onboarding-method-row:hover:not(:disabled), .onboarding-life-action:hover:not(:disabled) {
+ border-color: var(--ob-active-border);
+ background: var(--ob-card);
+}
+.onboarding-method-row:disabled, .onboarding-life-action:disabled { opacity: 0.35; }
+.onboarding-method-row > svg { color: var(--muted); }
+.onboarding-method-connected {
+ display: flex;
+ align-items: center;
+ width: 100%;
+ border: 1px solid var(--border-strong);
+ border-radius: 8px;
+ background: var(--ob-card);
+ color: var(--foreground);
+ font-family: inherit;
+ font-size: var(--ob-method-fs);
+ font-weight: 500;
+ gap: 8px;
+ padding: 4px 17px;
+ height: auto;
+ min-height: var(--ob-method-h);
+ cursor: pointer;
}
+/* The label is the only visible description of a settled connection, so in the
+ narrow band that still draws three columns it wraps rather than truncates; the
+ card's min-height absorbs the extra line the way it absorbs an error line. */
+.onboarding-method-row > span, .onboarding-method-connected > span { min-width: 0; }
+.onboarding-method-connected > svg { color: var(--mint-ink); flex-shrink: 0; }
+/* The card's body reads top to bottom the way the story's does: the identity header,
+ then the state line, then the note and the work. The body is the flexible one, so an
+ error or a wrapped action grows downward and the three identity headers stay level
+ with each other and with the intro's. */
.onboarding-assistant-body {
flex: 1;
min-height: 0;
- margin-top: calc(6 * var(--ob-u));
display: flex;
flex-direction: column;
- gap: 8px;
}
/* Two lines at this width, and the `title` carries the rest: a third line would come
out of the actions' room, and the card's height is the welcome's, not its own. */
.onboarding-assistant-note {
- font-size: 12px;
- line-height: 18px;
+ font-size: var(--ob-note-fs);
+ line-height: var(--ob-note-lh);
color: var(--muted);
+ margin-bottom: var(--ob-spacer-2);
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
@@ -662,8 +1036,32 @@
overflow: hidden;
overflow-wrap: anywhere;
}
-.onboarding-assistant-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
-.onboarding-assistant-error { font-size: 12px; color: var(--destructive-ink); overflow-wrap: anywhere; }
+/* "Add subscription" and "Add API Key" are two full-width rows, one under the other —
+ the reference stacks them, left-aligned with their icon leading, and the connected
+ state wears the same row with a mint check. A wrapped horizontal pair read as two
+ chips competing for one line. */
+.onboarding-assistant-actions {
+ display: flex;
+ flex-direction: column;
+ align-items: stretch;
+ gap: var(--ob-method-gap);
+}
+.onboarding-method-row {
+ width: 100%;
+ height: auto;
+ min-height: var(--ob-method-h);
+ border-radius: 8px;
+ padding: 4px 17px;
+ font-size: var(--ob-method-fs);
+ font-weight: 500;
+ gap: 8px;
+ justify-content: flex-start;
+ text-align: left;
+ /* The shared button base forbids wrapping; in the narrow three-column band the
+ label is the only description of the method, so wrapping wins over clipping. */
+ white-space: normal !important;
+}
+.onboarding-assistant-error { font-size: 12px; color: var(--destructive-ink); overflow-wrap: anywhere; margin-top: 8px; }
.onboarding-assistant-error pre { margin-top: 8px; max-height: 160px; overflow: auto; white-space: pre-wrap; }
.onboarding-assistant-error summary { margin-top: 8px; cursor: pointer; }
/* "Open workspace and Back to introduction share a width and stack vertically." The
@@ -701,30 +1099,37 @@
min-width: 0;
font-size: 13px;
line-height: 20px;
- color: var(--foreground);
+ color: var(--ob-notice-fg);
}
.onboarding-import-notice-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
/* A light control rather than a green word: the sentence already carries the mint, and
- an action a person is meant to press should look pressable. Height and radius sit
- inside the 44 capsule with 6 of clearance top and bottom. */
+ an action a person is meant to press should look pressable. The reference draws it
+ as a small 6-radius button inside the capsule, 28 tall. */
.onboarding-import-notice-action {
- height: 32px;
- border-radius: 999px;
- padding: 0 14px;
+ height: 28px;
+ border-radius: 6px;
+ padding: 0 10px;
+ font-size: 12px;
+ white-space: nowrap;
+}
+.onboarding-import-notice-help {
font-size: 12px;
+ color: var(--ob-notice-link);
white-space: nowrap;
+ text-decoration: underline;
+ text-decoration-style: dotted;
+ text-underline-offset: 4px;
}
-.onboarding-import-notice-help { font-size: 12px; color: var(--muted); white-space: nowrap; }
.onboarding-import-notice-help:hover, .onboarding-import-notice-help:focus-visible { color: var(--foreground); }
.onboarding-import-notice-dismiss {
flex-shrink: 0;
display: grid;
place-items: center;
- width: 24px;
- height: 24px;
+ width: 28px;
+ height: 28px;
margin-right: -4px;
- border-radius: 6px;
- color: var(--muted);
+ border-radius: 999px;
+ color: var(--ob-notice-fg);
transition: color 150ms, background 150ms;
}
.onboarding-import-notice-dismiss:hover, .onboarding-import-notice-dismiss:focus-visible {
@@ -752,21 +1157,54 @@
@media (max-width: 759px) {
.onboarding-shell {
--ob-gutter: 20px;
+ --ob-header-h: 82px;
+ --ob-header-pad: 22px;
/* A stacked card is as tall as the reference draws it, not a share of the window:
stacked, the three cards ARE the composition, and a short phone should scroll
them rather than compress them. */
--ob-card-h: 258px;
- /* The same reservation, re-derived for the stack: three cards, the two 16 gaps
- between them, and the connection step's 20 + 90 import band under them. The
- introduction spends the identical total on three taller cards, so the action
- stays put between the steps and when the offer is dismissed. */
- --ob-stage-h: calc(var(--ob-card-h) * 3 + 142px);
+ --ob-card-pv: 21px;
+ --ob-card-ph: 25px;
+ --ob-card-gap: 15px;
+ --ob-id-h: 46px;
+ --ob-id-pad: 15px;
+ --ob-id-gap: 12px;
+ --ob-card-logo: 30px;
+ --ob-card-name: 18px;
+ --ob-note-fs: 13px;
+ --ob-note-lh: 22px;
+ --ob-h1: 30px;
+ --ob-h1-lh: 41px;
+ --ob-sub: 14px;
+ --ob-sub-lh: 22px;
+ --ob-cap-fs: 13px;
+ --ob-heading-gap: 12px;
+ /* A phone reserves two title lines and one subtitle line: the English title
+ wraps here while the Chinese does not, and the two steps must not disagree
+ about where the cards start. */
+ --ob-heading-h: 138px;
+ --ob-h1-min: calc(2 * var(--ob-h1-lh));
+ --ob-p-min: var(--ob-sub-lh);
+ --ob-heading-mb: 27px;
+ /* The stacked floor, plus the three wrapped guide lines a 320px card can
+ carry: the floor has to hold the taller of the two steps' natural stacks. */
+ --ob-stage-h: calc(var(--ob-card-h) * 3 + 145px);
+ --ob-main-top: 0px;
+ --ob-access-w: 100%;
+ --ob-access-pad: 24px;
+ --ob-access-lead-fs: 13px;
+ --ob-action-h: 54px;
+ --ob-action-fs: 16px;
+ --ob-action-icon: 18px;
}
+ .onboarding-brand-mark { width: 38px; height: 38px; }
+ .onboarding-brand-wordmark strong { font-size: 20px; line-height: 25px; }
+ .onboarding-brand-wordmark span { font-size: 11px; line-height: 17px; }
/* Two lines reserved for both, so a heading that wraps in one language or one step
and not in the other still leaves the cards on the same line. In `em`, because the
- size here is a clamp rather than a number. */
- .onboarding-heading h1, .onboarding-heading h2 { min-height: 2.7em; }
- .onboarding-heading p { min-height: 3.1em; }
+ size here is a tier variable rather than a number. The block's own reserve gives
+ way to these, which are the ones that can wrap. */
+
/* The story becomes the stack the connection already is. The wires go with the
columns — there is no handoff to draw between cards that are above one another —
and the caption, which rode the return wire, returns to normal flow under them.
@@ -786,8 +1224,7 @@
.onboarding-assistants-list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
/* Six 52px logos cannot sit on one 350px row, so the row folds into two of three —
the reference's own mobile arrangement — and gives up the fixed 560 span with it. */
- .onboarding-access { width: 100%; margin-top: 12px; padding: 16px 0; }
- .onboarding-access-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; }
+ .onboarding-access-grid { width: min(300px, 100%); grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
/* A 30% action inside a phone's content box is a 107px target sitting alone in the
middle of the screen. The column it was aligned to is stacked away here, so the
fraction has nothing left to point at and the action takes the width instead. */
@@ -810,12 +1247,9 @@
.onboarding-import-notice-dismiss { grid-area: 1 / 3; }
.onboarding-import-notice-actions { grid-area: 2 / 1 / 2 / -1; flex-wrap: wrap; }
}
-/* A short window scrolls. There used to be a `max-height: 760px` rule here that took
- the step gaps from 24 to 16 and squeezed the access block, which bought roughly 30px
- and spent the design's own spacing to do it — at 1200x800, the reference's own frame
- size, where nothing was wrong. The card now answers to the window height directly, so
- a short window gets a shorter card instead of a compressed composition; below the
- stack band it scrolls, which the reference asks for in as many words. */
+/* A short window scrolls. The card answers to the window through the tiers above, so
+ a short window gets the shorter authored card instead of a compressed composition;
+ below the stack band it scrolls, which the reference asks for in as many words. */
/* ---- Stopping ------------------------------------------------------------ */
diff --git a/ui/src/components/settings/BackendLifecycleChip.tsx b/ui/src/components/settings/BackendLifecycleChip.tsx
index d3a642b3a..4470be0cd 100644
--- a/ui/src/components/settings/BackendLifecycleChip.tsx
+++ b/ui/src/components/settings/BackendLifecycleChip.tsx
@@ -15,6 +15,8 @@ import { cn } from '@/lib/utils';
type CliStatus = 'unknown' | 'ok' | 'missing';
type Operation = 'idle' | 'upgrading' | 'restarting';
type Visual = 'disabled' | 'ready' | 'updating' | 'update' | 'error' | 'loading';
+
+export type BackendLifecycleVisual = Visual;
type BadgeVariant = 'secondary' | 'success' | 'info' | 'warning' | 'destructive';
export type BackendChipChange = {
@@ -34,6 +36,19 @@ interface BackendLifecycleChipProps {
readyLabel?: string;
onChanged?: (info?: BackendChipChange) => void | Promise<void>;
onOperationChange?: (pending: boolean) => void;
+ /** The setup card draws the action its lifecycle offers — update or install —
+ beside the pill, on the card's state row, so a host that owns those actions
+ needs to know which one the chip currently derives. Settings renders no
+ such row and passes nothing. */
+ onVisual?: (visual: Visual) => void;
+ /** Bumped by a host that applied an upgrade through its own affordance — the
+ setup card's state-row button — so the chip's projection, and with it the
+ pill, follows a change the chip did not make itself. */
+ refreshKey?: number;
+ /** A host-owned lifecycle operation in flight — the setup card draws its own
+ upgrade affordance on the state row — so the chip's popover cannot launch a
+ second one against the same backend. */
+ externallyBusy?: boolean;
}
// Map lifecycle visual states to canonical Badge variants from the design
@@ -99,6 +114,9 @@ export const BackendLifecycleChip: React.FC<BackendLifecycleChipProps> = ({
onChanged,
onOperationChange,
readyLabel,
+ onVisual,
+ refreshKey,
+ externallyBusy = false,
}) => {
const { t } = useTranslation();
const api = useApi();
@@ -162,7 +180,7 @@ export const BackendLifecycleChip: React.FC<BackendLifecycleChipProps> = ({
return;
}
if (cliStatus === 'ok') void loadRuntime();
- }, [enabled, cliStatus, loadRuntime]);
+ }, [enabled, cliStatus, loadRuntime, refreshKey]);
// Opening asks for a fresh projection; closing is presentation-only and
// must not mutate lifecycle state.
@@ -171,7 +189,11 @@ export const BackendLifecycleChip: React.FC<BackendLifecycleChipProps> = ({
}, [enabled, isOpen, loadRuntime]);
const visual = deriveVisual(enabled, cliStatus, runtime, operation);
- const busy = runtimeLoading || operation !== 'idle';
+ const busy = runtimeLoading || operation !== 'idle' || externallyBusy;
+
+ React.useEffect(() => {
+ onVisual?.(visual);
+ }, [visual, onVisual]);
const handleUpgrade = async () => {
setOperation('upgrading');
diff --git a/ui/src/components/settings/SettingsPrimitives.tsx b/ui/src/components/settings/SettingsPrimitives.tsx
index f7ccee1c5..2fed56485 100644
--- a/ui/src/components/settings/SettingsPrimitives.tsx
+++ b/ui/src/components/settings/SettingsPrimitives.tsx
@@ -162,11 +162,25 @@ export const SearchField: React.FC<SearchFieldProps> = ({
// fill --mint, blur 8 #5BFFA055 glow, 38×22 with knob inset 3.
// Off state mirrors fcMl6 (Switch/Unchecked): fill + stroke = --border-strong
// (14% white dark / 14% black light) for sufficient contrast against bg-background.
-export const ToggleSwitch: React.FC<{ enabled: boolean; onClick: () => void; disabled?: boolean; label?: string }> = ({
+interface ToggleSwitchProps {
+ enabled: boolean;
+ onClick: () => void;
+ disabled?: boolean;
+ label?: string;
+ /** `settings` is the dense mint switch the settings rows use; `onboarding` is
+ the larger themed switch the setup cards draw in the identity header's
+ trailing slot — same role, ARIA state, thumb motion and disabled behaviour,
+ different geometry and palette, owned by `onboarding.css` through the
+ managed `--switch-onboarding-*` tokens. */
+ variant?: 'settings' | 'onboarding';
+}
+
+export const ToggleSwitch: React.FC<ToggleSwitchProps> = ({
enabled,
onClick,
disabled,
label,
+ variant = 'settings',
}) => (
<button
type="button"
@@ -175,18 +189,22 @@ export const ToggleSwitch: React.FC<{ enabled: boolean; onClick: () => void; dis
aria-label={label}
disabled={disabled}
onClick={onClick}
- className={clsx(
- 'relative inline-flex h-5 w-9 shrink-0 items-center rounded-full border transition-colors focus:outline-none focus:ring-2 focus:ring-mint/40 disabled:opacity-50',
- enabled
- ? 'border-mint/50 bg-mint shadow-glow-xs-mint'
- : 'border-border-strong bg-border-strong'
- )}
+ className={variant === 'onboarding'
+ ? 'onboarding-enable-switch'
+ : clsx(
+ 'relative inline-flex h-5 w-9 shrink-0 items-center rounded-full border transition-colors focus:outline-none focus:ring-2 focus:ring-mint/40 disabled:opacity-50',
+ enabled
+ ? 'border-mint/50 bg-mint shadow-glow-xs-mint'
+ : 'border-border-strong bg-border-strong'
+ )}
>
<span
- className={clsx(
- 'inline-block size-3.5 rounded-full bg-background shadow transition-transform',
- enabled ? 'translate-x-[18px]' : 'translate-x-1'
- )}
+ className={variant === 'onboarding'
+ ? undefined
+ : clsx(
+ 'inline-block size-3.5 rounded-full bg-background shadow transition-transform',
+ enabled ? 'translate-x-[18px]' : 'translate-x-1'
+ )}
/>
</button>
);
diff --git a/ui/src/components/steps/AgentDetection.tsx b/ui/src/components/steps/AgentDetection.tsx
index f972aa0cb..6df4fbc08 100644
--- a/ui/src/components/steps/AgentDetection.tsx
+++ b/ui/src/components/steps/AgentDetection.tsx
@@ -2,6 +2,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
import {
ArrowLeft,
ArrowRight,
+ ArrowUpToLine,
ChevronDown,
ChevronUp,
Download,
@@ -13,12 +14,13 @@ import { Link, useNavigate } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import clsx from 'clsx';
import { useApi } from '../../context/ApiContext';
+import { useToast } from '../../context/ToastContext';
import { BackendIcon } from '../visual';
import { AssistantRow } from '../onboarding/AssistantRow';
import { ASSISTANT_ORDER } from '../onboarding/collaborationTimeline';
import '../onboarding/onboarding.css';
import type { BackendId } from '../visual';
-import { BackendLifecycleChip } from '../settings/BackendLifecycleChip';
+import { BackendLifecycleChip, type BackendLifecycleVisual } from '../settings/BackendLifecycleChip';
import { ToggleSwitch } from '../settings/SettingsPrimitives';
import { BackendConnectionDialog } from '../onboarding/BackendConnectionDialog';
import type { BackendConnectionState } from '@/context/ApiContext';
@@ -80,6 +82,7 @@ const normalizeAgents = (source: any): Record<string, AgentState> => {
export const AgentDetection: React.FC<AgentDetectionProps> = ({ data, onNext, onBack, isPage = false, onSave, completionRecovery }) => {
const { t } = useTranslation();
const api = useApi();
+ const { showToast } = useToast();
const navigate = useNavigate();
const routeSurfaceActive = useRouteSurfaceActive();
const modelHubEnabled = useModelHubCapability();
@@ -108,6 +111,17 @@ export const AgentDetection: React.FC<AgentDetectionProps> = ({ data, onNext, on
const [syncing, setSyncing] = useState(false);
const [detectingAgents, setDetectingAgents] = useState<Record<string, boolean>>({});
const [detectionErrors, setDetectionErrors] = useState<Record<string, string>>({});
+ // The lifecycle the each card's chip derives, reported up so the card can draw
+ // the action the pill offers — update or upgrade-in-flight — on its state row.
+ const [visuals, setVisuals] = useState<Partial<Record<string, BackendLifecycleVisual>>>({});
+ const [refreshingAgents, setRefreshingAgents] = useState<Record<string, boolean>>({});
+ const [chipRefresh, setChipRefresh] = useState<Record<string, number>>({});
+ // A successful upgrade leaves the chip's own runtime probe in flight while this
+ // handler has already finished, so the pill still reads `update` for a moment and
+ // would re-arm the card's upgrade button against a backend that was just upgraded.
+ // The lock holds the button disabled until the chip's reported visual leaves
+ // `update`, which is the probe confirming what the upgrade did.
+ const [upgradeLocks, setUpgradeLocks] = useState<Record<string, boolean>>({});
const pendingInstalls = useRef(new Set<string>());
const detectionTokens = useRef<Record<string, number>>({});
const isMissing = (agent: AgentState) => agent.status === 'missing';
@@ -261,6 +275,60 @@ export const AgentDetection: React.FC<AgentDetectionProps> = ({ data, onNext, on
});
};
+ // The setup card draws the update action on the state row, beside the pill the
+ // chip renders, while the chip still owns the probe and the write. Bumping
+ // `chipRefresh` is what lets the chip re-probe a runtime the card's own button
+ // changed, without the card duplicating the chip's lifecycle knowledge.
+ useEffect(() => {
+ setUpgradeLocks((current) => {
+ let changed = false;
+ const next = { ...current };
+ for (const [name, locked] of Object.entries(current)) {
+ if (locked && visuals[name] !== 'update' && visuals[name] !== 'updating') {
+ next[name] = false;
+ changed = true;
+ }
+ }
+ return changed ? next : current;
+ });
+ }, [visuals]);
+
+ const releaseUpgradeLock = (name: string) =>
+ setUpgradeLocks((current) => (current[name] ? { ...current, [name]: false } : current));
+
+ const upgradeAgent = async (name: string) => {
+ setRefreshingAgents((current) => ({ ...current, [name]: true }));
+ setUpgradeLocks((current) => ({ ...current, [name]: true }));
+ // The chip's own upgrade handler owns the toast contract for lifecycle
+ // operations; the card's affordance is the same operation drawn on the state
+ // row, so it settles failures the same way rather than swallowing them, and
+ // `refreshingAgents` is handed to the chip as externally busy so its popover
+ // cannot launch a second install against the same backend.
+ try {
+ const result = await api.installAgent(name);
+ if (result.ok) {
+ showToast(t('backendLifecycle.upgradeSuccess'), 'success');
+ const installedPath = typeof result.path === 'string' && result.path ? result.path : null;
+ if (installedPath) {
+ setAgents((prev) => ({ ...prev, [name]: { ...prev[name], cli_path: installedPath } }));
+ }
+ setChipRefresh((current) => ({ ...current, [name]: (current[name] || 0) + 1 }));
+ await detect(name, installedPath || agents[name]?.cli_path || name);
+ } else {
+ // A failed upgrade leaves the pill on `update` with no probe in flight, so
+ // the visuals-driven release never fires; settle the lock here instead of
+ // stranding the button disabled until a remount.
+ releaseUpgradeLock(name);
+ showToast(result.message || t('backendLifecycle.upgradeFailed'), 'error');
+ }
+ } catch (cause) {
+ releaseUpgradeLock(name);
+ showToast(String(cause), 'error');
+ } finally {
+ setRefreshingAgents((current) => ({ ...current, [name]: false }));
+ }
+ };
+
const installAgent = async (name: string) => {
if (pendingInstalls.current.has(name) || (isPage && isAnyInstalling)) return;
pendingInstalls.current.add(name);
@@ -304,7 +372,7 @@ export const AgentDetection: React.FC<AgentDetectionProps> = ({ data, onNext, on
const opencodeAgent = agents['opencode'];
const readyBackends = ASSISTANT_ORDER.filter((name) => agents[name].enabled && agents[name].status === 'ok'
&& !installingAgents[name] && !detectingAgents[name] && !connectionPending[name]
- && !pendingWrites[name] && !connectionErrors[name] && connections[name]?.entry_eligible);
+ && !pendingWrites[name] && !refreshingAgents[name] && !connectionErrors[name] && connections[name]?.entry_eligible);
const canContinue = isPage ? Object.values(agents).some((agent) => agent.enabled) : readyBackends.length > 0;
const handlePrimaryAction = async () => {
if (entering) return;
@@ -550,14 +618,15 @@ export const AgentDetection: React.FC<AgentDetectionProps> = ({ data, onNext, on
connectionPending={connectionPending[name]}
connectionError={connectionErrors[name] || connections[name]?.message}
onRefreshConnection={() => void refreshConnection(name)}
- configuringDisabled={syncing || pendingWrites[name] || !agent.enabled || agent.status !== 'ok'}
- enabledControl={<label className="flex items-center gap-2 text-xs text-muted">
- <input type="checkbox" className="size-3.5 accent-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"
- checked={agent.enabled} onChange={(event) => toggle(name, event.target.checked)} />
- {t('onboarding.setup.enabled')}
- </label>}
+ configuringDisabled={syncing || pendingWrites[name] || !!refreshingAgents[name] || !!connectionPending[name] || !agent.enabled || agent.status !== 'ok'}
+ enabledControl={<ToggleSwitch variant="onboarding" enabled={agent.enabled}
+ label={t('onboarding.setup.enableNamed', { name: getBackendUiMeta(name).label })}
+ onClick={() => toggle(name, !agent.enabled)} />}
lifecycle={<BackendLifecycleChip name={name} enabled={agent.enabled} cliStatus={agent.status || 'unknown'}
readyLabel={t('onboarding.setup.installed')}
+ refreshKey={chipRefresh[name]}
+ externallyBusy={!!refreshingAgents[name]}
+ onVisual={(visual) => setVisuals((current) => (current[name] === visual ? current : { ...current, [name]: visual }))}
onOperationChange={(pending) => {
setPendingWrites((current) => ({ ...current, [name]: pending }));
if (!pending) void refreshConnection(name);
@@ -567,6 +636,18 @@ export const AgentDetection: React.FC<AgentDetectionProps> = ({ data, onNext, on
setAgents((previous) => ({ ...previous, [name]: { ...previous[name], cli_path: installedPath } }));
await detect(name, installedPath);
}} />}
+ upgrade={agent.status === 'ok' && (visuals[name] === 'update' || visuals[name] === 'updating' || refreshingAgents[name]) ? (
+ <Button type="button" variant="secondary" className="onboarding-life-action"
+ onClick={() => void upgradeAgent(name)}
+ disabled={refreshingAgents[name] || !!upgradeLocks[name] || visuals[name] === 'updating' || !!installingAgents[name]}>
+ {refreshingAgents[name] || visuals[name] === 'updating'
+ ? <RefreshCw size={14} className="motion-safe:animate-spin" />
+ : <ArrowUpToLine size={14} />}
+ {t(refreshingAgents[name] || visuals[name] === 'updating'
+ ? 'backendLifecycle.upgrading'
+ : 'backendLifecycle.upgradeNow')}
+ </Button>
+ ) : undefined}
/>;
})}
</div>
diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.json
index 1e97b283b..d8ca4cd85 100644
--- a/ui/src/i18n/en.json
+++ b/ui/src/i18n/en.json
@@ -428,7 +428,7 @@
"installing": "Installing…",
"installed": "{{name}} is ready.",
"installFailed": "Install failed.",
- "memoryRuntimeDisableBeforeRepair": "Memory is running. Turn it off in Settings \u2192 Memory before repairing the runtime.",
+ "memoryRuntimeDisableBeforeRepair": "Memory is running. Turn it off in Settings → Memory before repairing the runtime.",
"memoryPackageSourceManaged": "Source checkout; automatic package repair is unavailable.",
"backendsTitle": "Agent backends",
"backendsDetail": "Claude · OpenCode · Codex — managed in the Backends tab.",
@@ -1157,8 +1157,19 @@
"latestRecorded": "Latest recorded turn",
"modelNotFound": "Upstream returned model not found",
"errorDetails": "View error details",
- "errorReason": { "invalid_parameter": "Request parameters rejected", "protocol_error": "Protocol error", "tool_incompatible": "Tool incompatible", "stream_interrupted": "Stream interrupted", "engine_down": "Gateway unavailable" },
- "origin": { "automatic": "Automatic", "manual": "Manual", "passthrough": "Passthrough", "unconfigured": "Unconfigured" },
+ "errorReason": {
+ "invalid_parameter": "Request parameters rejected",
+ "protocol_error": "Protocol error",
+ "tool_incompatible": "Tool incompatible",
+ "stream_interrupted": "Stream interrupted",
+ "engine_down": "Gateway unavailable"
+ },
+ "origin": {
+ "automatic": "Automatic",
+ "manual": "Manual",
+ "passthrough": "Passthrough",
+ "unconfigured": "Unconfigured"
+ },
"help": {
"automatic": "Matched by model name.\nSource order follows {{backend}} default routing.",
"manual": "This model has a saved, fixed route.\nDefault routing does not change it. Restore automatic in route settings to follow defaults.",
@@ -1174,7 +1185,11 @@
"undoDone": "Previous manual draft restored.",
"restorePending": "Not saved yet. The saved route is still in use.",
"afterSave": "Route after saving",
- "preview": { "automatic": "After restore: automatic matching", "passthrough": "After restore: original-name passthrough", "unconfigured": "After restore: unconfigured" },
+ "preview": {
+ "automatic": "After restore: automatic matching",
+ "passthrough": "After restore: original-name passthrough",
+ "unconfigured": "After restore: unconfigured"
+ },
"previewLoading": "Reading inherited routing...",
"previewFailed": "Could not preview inherited routing. Nothing has been saved. Retry or undo the restore.",
"draftEmpty": "No route entries in this draft.",
@@ -1278,7 +1293,9 @@
"title": "By day",
"chart": "Metered tokens per day, {{from}} to {{to}}",
"table": "Metered tokens and requests per day, {{from}} to {{to}}",
- "col": { "day": "Day" },
+ "col": {
+ "day": "Day"
+ },
"column": "{{day}} · {{tokens}} tokens · {{requests}} requests",
"peak": "Peak {{tokens}} on {{day}}",
"quiet": "No day in this window carried a metered turn",
@@ -1385,10 +1402,20 @@
"save": "Save",
"saving": "Saving route chain…",
"refreshing": "Route chain saved. Refreshing the model surface…",
- "fail": { "read": "The route chain could not be read", "save": "The route chain was not saved", "unconfirmed": "The save outcome is not confirmed", "reconcileRead": "The current model surface could not be read" },
+ "fail": {
+ "read": "The route chain could not be read",
+ "save": "The route chain was not saved",
+ "unconfirmed": "The save outcome is not confirmed",
+ "reconcileRead": "The current model surface could not be read"
+ },
"retry": "Retry",
"empty": "This model follows default routing, but no eligible provider can route it.",
- "impact": { "title": "The route chain was saved", "detail": "These are the items this save actually removed or interrupted.", "refreshFail": "The route chain was saved, but the model surface could not be refreshed.", "done": "Done" },
+ "impact": {
+ "title": "The route chain was saved",
+ "detail": "These are the items this save actually removed or interrupted.",
+ "refreshFail": "The route chain was saved, but the model surface could not be refreshed.",
+ "done": "Done"
+ },
"hint": "This model has a saved, fixed route. Default routing changes do not overwrite it."
},
"recent": {
@@ -2159,7 +2186,7 @@
"memory_runtime_preparation_scrubber_timeout": "The memory runtime's diagnostic safety check timed out. Retry after checking system load.",
"memory_runtime_preparation_scrubber_failed": "The memory runtime failed its diagnostic safety check. Retry the install.",
"memory_runtime_preparation_sync_contract_failed": "The memory runtime does not match this Avibe version's sync contract. Reinstall the runtime.",
- "memory_runtime_install_requires_disabled_memory": "Turn Memory off in Settings \u2192 Memory before repairing a running Memory runtime.",
+ "memory_runtime_install_requires_disabled_memory": "Turn Memory off in Settings → Memory before repairing a running Memory runtime.",
"memory_reconcile_failed": "Avibe couldn't apply the Memory settings. Check the runtime logs for the failing step.",
"memory_sidecar_unavailable": "The Memory sidecar isn't reachable right now.",
"memory_processing_interrupted": "Memory processing was interrupted before completion could be confirmed.",
@@ -5261,18 +5288,23 @@
"setup": {
"title": "Connect AI. Get to work",
"subtitle": "Install an assistant and connect a model to get started",
- "claudeDescription": "Anthropic’s coding assistant",
- "codexDescription": "OpenAI’s coding assistant",
- "opencodeDescription": "An open-source coding assistant for multiple models",
"install": "Install",
"installed": "Installed",
"notInstalled": "Not installed",
"installFailed": "Installation failed",
"enabled": "Enabled",
+ "enableNamed": "Enable {{name}}",
"subscription": "Subscription",
"api_key": "API Key",
"subscriptionConnected": "Subscription connected",
- "api_keyConnected": "API Key connected"
+ "api_keyConnected": "API Key connected",
+ "claudeGuide": "Sign in with Claude or enter an API key",
+ "codexGuide": "Sign in with ChatGPT or use OPENAI_API_KEY",
+ "opencodeGuide": "Choose either way to connect",
+ "installFirstNamed": "Install {{name}} first",
+ "subscriptionConnectedHint": "Subscription saved. Enter the workspace to use it.",
+ "api_keyConnectedHint": "API Key saved. Enter the workspace to use it.",
+ "forNamed": "For {{name}}"
},
"connection": {
"method": "Connection method",
@@ -5362,6 +5394,10 @@
"authTokenLabel": "Auth Token",
"platformRepair": "Repair saved messaging configuration",
"platformRepairHint": "Your saved {{platform}} configuration is incomplete. Repair its required credentials before entering the workspace."
+ },
+ "brand": {
+ "name": "Avibe",
+ "tagline": "Agent OS"
}
}
}
diff --git a/ui/src/i18n/zh.json b/ui/src/i18n/zh.json
index 9c55e8e87..b8195e1b3 100644
--- a/ui/src/i18n/zh.json
+++ b/ui/src/i18n/zh.json
@@ -1157,8 +1157,19 @@
"latestRecorded": "最近已记录回合",
"modelNotFound": "上游返回模型不存在",
"errorDetails": "查看错误详情",
- "errorReason": { "invalid_parameter": "请求参数被拒绝", "protocol_error": "协议错误", "tool_incompatible": "工具不兼容", "stream_interrupted": "响应中断", "engine_down": "模型网关不可用" },
- "origin": { "automatic": "自动", "manual": "手动", "passthrough": "透传", "unconfigured": "未配置" },
+ "errorReason": {
+ "invalid_parameter": "请求参数被拒绝",
+ "protocol_error": "协议错误",
+ "tool_incompatible": "工具不兼容",
+ "stream_interrupted": "响应中断",
+ "engine_down": "模型网关不可用"
+ },
+ "origin": {
+ "automatic": "自动",
+ "manual": "手动",
+ "passthrough": "透传",
+ "unconfigured": "未配置"
+ },
"help": {
"automatic": "已按模型名自动匹配。\n供应商顺序跟随 {{backend}} 的默认路由。",
"manual": "此模型已保存固定路由。\n不随默认路由调整,可在路由设置中恢复自动。",
@@ -1174,7 +1185,11 @@
"undoDone": "已恢复之前的手动草稿。",
"restorePending": "尚未保存,当前仍使用已保存的路由。",
"afterSave": "保存后的路由",
- "preview": { "automatic": "恢复后:自动匹配", "passthrough": "恢复后:原名透传", "unconfigured": "恢复后:未配置" },
+ "preview": {
+ "automatic": "恢复后:自动匹配",
+ "passthrough": "恢复后:原名透传",
+ "unconfigured": "恢复后:未配置"
+ },
"previewLoading": "正在读取继承路由…",
"previewFailed": "无法预览继承路由,尚未保存任何更改。请重试或撤销恢复。",
"draftEmpty": "草稿中暂无路由条目。",
@@ -1278,7 +1293,9 @@
"title": "按日",
"chart": "每日计量 token,{{from}} 至 {{to}}",
"table": "每日计量 token 与请求数,{{from}} 至 {{to}}",
- "col": { "day": "日期" },
+ "col": {
+ "day": "日期"
+ },
"column": "{{day}} · {{tokens}} tokens · {{requests}} 次请求",
"peak": "峰值 {{tokens}},出现在 {{day}}",
"quiet": "这个区间没有任何一天有计量数据",
@@ -1385,10 +1402,20 @@
"save": "保存",
"saving": "正在保存路由…",
"refreshing": "路由已保存,正在刷新模型页面…",
- "fail": { "read": "路由暂时不可用", "save": "路由没有保存", "unconfirmed": "保存结果还没确认", "reconcileRead": "当前模型页面暂时不可用" },
+ "fail": {
+ "read": "路由暂时不可用",
+ "save": "路由没有保存",
+ "unconfirmed": "保存结果还没确认",
+ "reconcileRead": "当前模型页面暂时不可用"
+ },
"retry": "重试",
"empty": "此模型跟随默认路由,但目前没有符合条件的供应商。",
- "impact": { "title": "路由已保存", "detail": "以下是这次保存实际移除或中断的项目。", "refreshFail": "路由已保存,但模型页面暂时无法刷新。", "done": "完成" },
+ "impact": {
+ "title": "路由已保存",
+ "detail": "以下是这次保存实际移除或中断的项目。",
+ "refreshFail": "路由已保存,但模型页面暂时无法刷新。",
+ "done": "完成"
+ },
"hint": "此模型已保存固定路由,默认路由的调整不会覆盖它。"
},
"recent": {
@@ -5261,18 +5288,23 @@
"setup": {
"title": "连接 AI,开始工作",
"subtitle": "安装助手,连接模型,即可开始工作",
- "claudeDescription": "Anthropic 的 AI 编程助手",
- "codexDescription": "OpenAI 的 AI 编程助手",
- "opencodeDescription": "开源 AI 编程助手,支持多种模型",
"install": "安装",
"installed": "已安装",
"notInstalled": "未安装",
"installFailed": "安装失败",
"enabled": "启用",
+ "enableNamed": "启用 {{name}}",
"subscription": "订阅",
"api_key": "API Key",
"subscriptionConnected": "订阅已连接",
- "api_keyConnected": "API Key 已连接"
+ "api_keyConnected": "API Key 已连接",
+ "claudeGuide": "通过 Claude 登录或填入 API Key",
+ "codexGuide": "通过 ChatGPT 登录或 OPENAI_API_KEY",
+ "opencodeGuide": "选择一种方式连接即可",
+ "installFirstNamed": "先安装 {{name}}",
+ "subscriptionConnectedHint": "订阅已保存,进入工作台即可使用",
+ "api_keyConnectedHint": "API Key 已保存,进入工作台即可使用",
+ "forNamed": "用于 {{name}}"
},
"connection": {
"method": "连接方式",
@@ -5362,6 +5394,10 @@
"authTokenLabel": "Auth Token",
"platformRepair": "修复已保存的消息配置",
"platformRepairHint": "已保存的 {{platform}} 配置不完整。请修复必填凭据后进入工作区。"
+ },
+ "brand": {
+ "name": "Avibe",
+ "tagline": "Agent OS"
}
}
}
diff --git a/ui/src/index.css b/ui/src/index.css
index bab5a9ef8..e29a7d0cc 100644
--- a/ui/src/index.css
+++ b/ui/src/index.css
@@ -208,25 +208,13 @@
--shadow-glow-xl-mint: 0 0 48px -12px rgba(91, 255, 160, 0.44);
- /* `onboarding` is the active-card halo of the approved onboarding reference, the
- one the owner pointed at: a centred 28px mint at #5BFFA060, with no spread and
- brighter than the sized rungs carry. It is a role rather than a rung because
- both of those departures are the reference's, not the scale's -- reaching it by
- stacking `xl` and `lg` was an approximation of an explicit value.
- `37.6%` is that hex's own alpha: 0x60 is 96/255.
-
- It is the one role the design draws at two sizes, because the two frames drew
- it separately: Light's active card (node waUhu) is 16/-4 at #10B98170, which is
- the sized scale's own `sm` geometry and alpha. The hue needs nothing for that
- -- `var(--mint)` already follows whichever mint the theme declares, the way
- `wire` does -- but blur, spread and alpha are numbers, and a number cannot
- follow a palette. They are named here and re-anchored beside the rest of the
- light palette, which is the shape `--brand-glow-blur` already uses and the only
- one that renders: this block is `@theme inline`, so Tailwind substitutes the
- value below into the utilities at build time and a later override of THIS name
- would compile to nothing while looking correct in the file. */
+ /* The onboarding active/hover card halo: the design draws an OFFSET drop shadow,
+ not a centred one, so this role is excused from the scale's centring rule and
+ `glowScale.test.mjs` pins its own geometry per theme. The parts that differ per
+ theme are named numbers re-anchored beside each palette, like `--brand-glow-blur`;
+ the hue follows the declared mint through the mix. */
--shadow-glow-onboarding-mint:
- 0 0 var(--onboarding-glow-blur) var(--onboarding-glow-spread)
+ 0 2px var(--onboarding-glow-blur) var(--onboarding-glow-spread)
color-mix(in srgb, var(--mint) var(--onboarding-glow-alpha), transparent);
--shadow-glow-cta-mint: 0 0 var(--brand-glow-blur) -4px rgba(91, 255, 160, 0.6);
@@ -349,18 +337,26 @@
because it is the one part of that glow that differs per theme. */
--brand-glow-blur: 16px;
- /* Geometry and alpha of the onboarding active-card halo, for the same reason the
- CTA blur is here: they are the parts of that glow that differ per theme, and
- the token itself is inlined into its utilities and so cannot be re-declared. */
- --onboarding-glow-blur: 28px;
+ /* Per-theme geometry and alpha of the onboarding card halo; see the token above. */
+ --onboarding-glow-blur: 12px;
--onboarding-glow-spread: 0px;
- --onboarding-glow-alpha: 37.6%;
-
+ --onboarding-glow-alpha: 22%;
/* Colour of the card wash shadows (`--shadow-mint-card*`). design.pen writes it
as the frame's own brand mint at 0.078, which is why it is the one part of
those shadows that moves between themes. */
--card-wash: rgba(91, 255, 160, 0.078);
+ /* The onboarding enable switch, drawn per theme by the reference: a lit border
+ on the on-state in dark, none in light; a dark thumb on the lit track in dark,
+ a white thumb in light. Named here so both palettes re-anchor them and the
+ component stylesheet holds no literals. */
+ --switch-onboarding-track-off: #1a1a26;
+ --switch-onboarding-border-off: #ffffff24;
+ --switch-onboarding-track-on: #5bffa0;
+ --switch-onboarding-border-on: #5bffa057;
+ --switch-onboarding-thumb-off: #9ba3b8;
+ --switch-onboarding-thumb-on: #080812;
+
/* Page-family gradients (mirror design.pen 1:1). Layers ordered top-most first. */
--gradient-console:
radial-gradient(50% 40% at 5% 5%, rgba(91, 255, 160, 0.20), rgba(91, 255, 160, 0) 100%),
@@ -518,20 +514,24 @@
--bg-page: var(--gradient-console);
/* design.pen's Light frame keeps the dark frame's geometry and 0.078 and
+
swaps only the hue to the light brand mint. */
--card-wash: rgba(16, 185, 129, 0.078);
+ --switch-onboarding-track-off: #d7dce5;
+ --switch-onboarding-border-off: #00000000;
+ --switch-onboarding-track-on: #10b981;
+ --switch-onboarding-border-on: #00000000;
+ --switch-onboarding-thumb-off: #ffffff;
+ --switch-onboarding-thumb-on: #ffffff;
/* Wider CTA glow than dark: the same neon spreads far less over a white card,
so 16px read as almost nothing here (owner decision 2026-08-14). */
--brand-glow-blur: 20px;
- /* The Light frame's own active card (waUhu) draws 16px at -4px spread and
- #10B98170 -- the sized scale's `sm` geometry and its 0.44 alpha, not dark's
- spreadless 28. Only these numbers are re-anchored; the hue stays `var(--mint)`,
- which this block has already swapped to the light brand. */
+ /* Light's own onboarding halo: tighter, inset, and fainter over white. */
--onboarding-glow-blur: 16px;
--onboarding-glow-spread: -4px;
- --onboarding-glow-alpha: 44%;
+ --onboarding-glow-alpha: 14.1%;
}
}
@@ -647,11 +647,17 @@
so 16px read as almost nothing here (owner decision 2026-08-14). */
--brand-glow-blur: 20px;
- /* Light's own active-card geometry - see the prefers-color-scheme block above.
+ /* Light's own onboarding halo - see the prefers-color-scheme block above.
Both light blocks must stay value-identical. */
--onboarding-glow-blur: 16px;
--onboarding-glow-spread: -4px;
- --onboarding-glow-alpha: 44%;
+ --onboarding-glow-alpha: 14.1%;
+ --switch-onboarding-track-off: #d7dce5;
+ --switch-onboarding-border-off: #00000000;
+ --switch-onboarding-track-on: #10b981;
+ --switch-onboarding-border-on: #00000000;
+ --switch-onboarding-thumb-off: #ffffff;
+ --switch-onboarding-thumb-on: #ffffff;
}
html,