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.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
fix(setup): put all three setup screens' bottom text on one line (#2158)
Max2a8ce221283f
diff --git a/ui/e2e/onboarding-fidelity/geometry.spec.ts b/ui/e2e/onboarding-fidelity/geometry.spec.tsindex c52eb9bb8..3ee23a938 100644--- a/ui/e2e/onboarding-fidelity/geometry.spec.ts+++ b/ui/e2e/onboarding-fidelity/geometry.spec.ts@@ -421,7 +421,7 @@ test.describe('desktop reference geometry', () => {const travelling = name.startsWith('handoff') || name === 'return-to-pm';await expect(page.getByTestId('handoff-pulse')).toHaveCount(travelling ? 1 : 0);await settleEffects(page);- await page.locator('.onboarding-collaboration').screenshot({ path: info.outputPath(`phase-${name}.png`) });+ await page.locator('.onboarding-story').screenshot({ path: info.outputPath(`phase-${name}.png`) });}expect(denied).toEqual([]);});@@ -575,7 +575,7 @@ const expectSamePair = async (page: Page, before: Pair) => {*/test.describe('shared screen anchors', () => {for (const viewport of [{ width: 1132, height: 664 }, { width: 1440, height: 900 }, { width: 1920, height: 1080 }]) {- test(`${viewport.width} desktop captions share one horizontal line`, async ({ page }) => {+ test(`${viewport.width} desktop captions sit on their own lines`, async ({ page }) => {await page.setViewportSize(viewport);await serveProduct(page);await serveModelHub(page);@@ -584,16 +584,39 @@ test.describe('shared screen anchors', () => {const rect = await box(page, selector);return rect.y + rect.height / 2;};+ const fontSize = (selector: string) =>+ page.locator(selector).first().evaluate((node) => getComputedStyle(node).fontSize);+ // The welcome caption is a label cut into the return wire, and the wire's run is the+ // line the other screens set their bottom text on: half a summary row above the+ // stage's floor. The loop hangs from the cards' floor, so its legs leave the cards.+ const loop = await box(page, '.onboarding-return');+ const stage = await box(page, '[data-setup-screen-root]:not([hidden]) .onboarding-stage');+ const summaryHalf = await page.locator('.onboarding-shell').evaluate((node) =>+ parseFloat(getComputedStyle(node).getPropertyValue('--ob-summary-h')) / 2);+ expect(loop.y + loop.height).toBeCloseTo(stage.y + stage.height - summaryHalf, 0);+ const cards = await boxes(page, '.onboarding-collaboration-card');+ expect(loop.y).toBeCloseTo(cards[0].y + cards[0].height, 0);const welcome = await center('.onboarding-story-caption');+ expect(welcome).toBeCloseTo(loop.y + loop.height, 0);+ const welcomeSize = await fontSize('.onboarding-story-caption');await page.getByRole('button', { name: '立即开始' }).click();await page.clock.runFor(950);await expect(page.locator('.setup-provider-summary')).toContainText('已选');const providers = await center('.setup-provider-summary');+ // On the same line even where the welcome is the tallest screen and this diagram+ // is shorter than its stage (the 1920 tier): the summary rests on the stage floor.+ const summary = await box(page, '.setup-provider-summary');+ const providersStage = await box(page, '[data-setup-screen-root]:not([hidden]) .onboarding-stage');+ expect(summary.y + summary.height).toBeCloseTo(providersStage.y + providersStage.height, 0);+ expect(welcomeSize).toBe(await fontSize('.setup-provider-summary'));await page.locator('.onboarding-setup-hint button').click();await page.clock.runFor(950);const assistants = await center('.onboarding-setup-hint');- expect(welcome).toBeCloseTo(providers, 0);expect(assistants).toBeCloseTo(providers, 0);+ // The rescan link is centred on the sentence it follows, in the same type.+ expect(await center('.onboarding-setup-hint-line > button')).toBeCloseTo(await center('.onboarding-setup-hint-line > span'), 0);+ expect(await fontSize('.onboarding-setup-hint-line > span')).toBe(welcomeSize);+ expect(await fontSize('.onboarding-setup-hint-line > button')).toBe(welcomeSize);});}@@ -1049,7 +1072,7 @@ test.describe('narrow identity alignment', () => {expect(smallest).toBeGreaterThanOrEqual(10);await settleEffects(page);- await page.locator('.onboarding-collaboration').screenshot({+ await page.locator('.onboarding-story').screenshot({path: info.outputPath(`identity-${size(viewport)}-${lang}.png`),});expect(denied).toEqual([]);diff --git a/ui/src/components/onboarding/CollaborationStory.tsx b/ui/src/components/onboarding/CollaborationStory.tsxindex 051399035..d53c794dc 100644--- a/ui/src/components/onboarding/CollaborationStory.tsx+++ b/ui/src/components/onboarding/CollaborationStory.tsx@@ -1,4 +1,4 @@-import { useEffect, useId, useState } from 'react';+import { useEffect, useId, useLayoutEffect, useRef, useState } from 'react';import { Check, CodeXml, FileText, ListChecks } from 'lucide-react';import { useTranslation } from 'react-i18next';import { BackendIcon } from '../visual';@@ -7,20 +7,19 @@ import { ASSISTANT_ORDER, WORK_LINES, collaborationFrame } from './collaborationimport { useOnboardingMotion } from './motion';/**- * Wire geometry in the 976x350 wire box, which the stylesheet sizes at the card's+ * Handoff 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.+ * midline at every tier rather than only at the authored one. 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. The return loop is not in this box: see `ReturnWire`.*/-const WIRES = [- 'M299 150H339',- 'M637 150H677',- 'M826 300V322Q826 338 810 338H165Q149 338 149 322V300',-];+const WIRES = ['M299 150H339', 'M637 150H677'];+/** The wire index the timeline gives the return from the third card to the first. */+const RETURN_WIRE = 2;+/** The return loop's legs and corner radius, in the same 976 space as the handoffs. */+const RETURN_LEGS = { from: 826, to: 149, radius: 16 };/** Only the four handoff ends are drawn: the return loop leaves its cards unmarked. */const PORTS: [number, number][] = [[299, 150], [339, 150], [637, 150], [677, 150]];const ICONS = [FileText, CodeXml, ListChecks];@@ -106,27 +105,36 @@ function Skeleton({ backend, done, written }: { backend: string; done: boolean;);}+type Handoff = { wire: number; progress: number } | null;++/** A single dash of a 100-unit path crossing it once, fading in and out at its ends. */+function Pulse({ d, progress, glowId }: { d: string; progress: number; glowId: string }) {+ const style = {+ strokeDashoffset: 16 - 100 * progress,+ opacity: Math.max(0, Math.min(1, progress / 0.08, (1 - progress) / 0.06)),+ };+ return (+ <g data-testid="handoff-pulse">+ <path className="onboarding-pulse-halo" d={d} pathLength={100} style={{ ...style, filter: `url(#${glowId})` }} />+ <path className="onboarding-pulse-core" d={d} pathLength={100} style={style} />+ </g>+ );+}++function Glow({ id }: { id: string }) {+ return <defs><filter id={id} x="-100%" y="-500%" width="300%" height="1100%"><feGaussianBlur stdDeviation="3" /></filter></defs>;+}+/** The wires are stretched to the card grid, so every coordinate stays proportional. */-function Circuit({ handoff }: { handoff: { wire: number; progress: number } | null }) {+function Circuit({ handoff }: { handoff: Handoff }) {const glowId = useId();- const pulse = handoff && {- strokeDashoffset: 16 - 100 * handoff.progress,- 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 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>+ <Glow id={glowId} />{WIRES.map((d, index) => (<g key={d}><path className="onboarding-wire" d={d} />- {handoff?.wire === index && (- <g data-testid="handoff-pulse">- <path className="onboarding-pulse-halo" d={d} pathLength={100} style={{ ...pulse, filter: `url(#${glowId})` }} />- <path className="onboarding-pulse-core" d={d} pathLength={100} style={pulse ?? undefined} />- </g>- )}+ {handoff?.wire === index && <Pulse d={d} progress={handoff.progress} glowId={glowId} />}</g>))}{PORTS.map(([x, y]) => <circle key={`${x}-${y}`} className="onboarding-port" cx={x} cy={y} r={3} />)}@@ -134,6 +142,50 @@ function Circuit({ handoff }: { handoff: { wire: number; progress: number } | nu);}+/**+ * The return loop and the caption cut into it. The stylesheet hangs this box from the+ * cards' floor down to the line the other setup screens set their summary on, which is+ * the stage's floor rather than the diagram's — so its height is whatever the window+ * leaves, and a stretched viewBox would bend the corners differently at every size.+ * The path is drawn in the box's own pixels instead: the legs keep their 976-space+ * tracks and the corners stay round.+ */+function ReturnWire({ handoff, returning, caption }: { handoff: Handoff; returning: boolean; caption: string }) {+ const glowId = useId();+ const ref = useRef<HTMLDivElement>(null);+ const [size, setSize] = useState({ width: 0, height: 0 });+ useLayoutEffect(() => {+ const node = ref.current;+ if (!node) return;+ const measure = () => {+ const { width, height } = node.getBoundingClientRect();+ setSize((current) => (current.width === width && current.height === height ? current : { width, height }));+ };+ measure();+ if (typeof ResizeObserver === 'undefined') return;+ const observer = new ResizeObserver(measure);+ observer.observe(node);+ return () => observer.disconnect();+ }, []);+ const { width, height } = size;+ const scale = width / 976;+ const from = RETURN_LEGS.from * scale;+ const to = RETURN_LEGS.to * scale;+ const radius = Math.min(RETURN_LEGS.radius * scale, height);+ const d = `M${from} 0V${height - radius}Q${from} ${height} ${from - radius} ${height}`+ + `H${to + radius}Q${to} ${height} ${to} ${height - radius}V0`;+ return (+ <div ref={ref} className="onboarding-return">+ <svg className="onboarding-return-wire" fill="none" aria-hidden="true">+ <Glow id={glowId} />+ <path className="onboarding-wire" d={d} />+ {handoff?.wire === RETURN_WIRE && <Pulse d={d} progress={handoff.progress} glowId={glowId} />}+ </svg>+ <p className="onboarding-story-caption" data-returning={returning}>{caption}</p>+ </div>+ );+}+/** The design has no playback controls, so the loop starts with the screen and owns itself. */export function CollaborationStory({ active = true }: { active?: boolean }) {const { t } = useTranslation();@@ -195,10 +247,9 @@ export function CollaborationStory({ active = true }: { active?: boolean }) {);})}</div>- <p className="onboarding-story-caption" data-returning={frame.returning}>- {t(frame.returning ? 'onboarding.story.returnCaption' : 'onboarding.story.caption')}- </p></div>+ <ReturnWire handoff={frame.handoff} returning={frame.returning}+ caption={t(frame.returning ? 'onboarding.story.returnCaption' : 'onboarding.story.caption')} /></section>);}diff --git a/ui/src/components/onboarding/onboarding-providers.css b/ui/src/components/onboarding/onboarding-providers.cssindex f0587a42e..e345d1b10 100644--- a/ui/src/components/onboarding/onboarding-providers.css+++ b/ui/src/components/onboarding/onboarding-providers.css@@ -398,6 +398,16 @@text-align: center;}.setup-provider-summary[data-tone='error'] { color: var(--destructive-ink); }+/* The summary rests on the stage's floor, the line the welcome's return wire and the+ assistants hint share, even at a tier where another screen is the tallest and this+ diagram is shorter than its stage. The stage fills that room and splits the slack+ between the two auto margins, so the diagram above stays exactly where centring put+ it and only the summary drops to the floor. */+@media (min-width: 760px) {+ .onboarding-stage > .setup-provider-stage { flex: 1; }+ .setup-provider-stage > .setup-provider-grid,+ .setup-provider-stage > .setup-provider-summary { margin-top: auto; }+}/* ---- Add-source dialog --------------------------------------------------- */diff --git a/ui/src/components/onboarding/onboarding.css b/ui/src/components/onboarding/onboarding.cssindex a20775990..7d3de626f 100644--- a/ui/src/components/onboarding/onboarding.css+++ b/ui/src/components/onboarding/onboarding.css@@ -516,7 +516,10 @@/* ---- Collaboration story ------------------------------------------------ */-.onboarding-story { position: relative; width: 100%; display: flex; align-items: flex-start; justify-content: center; }+/* The story fills its stage and centres the diagram in it, which is where the stage+ alone would put it — but it makes the story's box the stage's box, so the return+ loop below can hang from the cards to the stage's own floor. */+.onboarding-story { position: relative; width: 100%; flex: 1; display: flex; align-items: center; justify-content: center; }/* The diagram is the card plus the return wire's band beneath it: the reference drawsa 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. It keeps that box even where the stage around it@@ -796,12 +799,8 @@100% { color: var(--mint-ink); border-color: var(--ob-check-border); background: var(--ob-check-done); }}-/* 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. */+ top: the handoffs then sit on the cards' midline at every tier. */.onboarding-wires {position: absolute;top: 0;@@ -845,23 +844,36 @@92%, 100% { stroke-dashoffset: -100; opacity: 0; }}-/* The caption rides the return wire rather than the container floor: the wire's- 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+/* The return loop runs from the third card's floor to the first's along the line the+ other setup screens set their bottom text on: half a summary row above the stage's+ floor. The diagram is centred in the story, so the cards' floor is the story's middle+ less half the diagram plus a card; the box spans the diagram's width, and its bottom+ edge is the wire's horizontal run. */+.onboarding-return {+ position: absolute;+ left: 50%;+ width: min(100%, var(--ob-content-w));+ transform: translateX(-50%);+ top: calc(50% - var(--ob-diagram-h) / 2 + var(--ob-card-h));+ bottom: calc(var(--ob-summary-h) / 2);+ pointer-events: none;+}+.onboarding-return-wire { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }+/* The caption is centred on the run, which 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 itinstead of being erased — a mask, not a patch. */.onboarding-story-caption {position: absolute;- top: calc(var(--ob-card-h) * 338 / 300);+ top: 100%;left: 50%;transform: translate(-50%, -50%);padding: 0 12px;border-radius: 999px;background: color-mix(in srgb, var(--background) 90%, transparent);color: var(--ob-caption);- font-size: 10px;- line-height: 18px;+ /* The same size as the providers screen's summary line, the caption's counterpart. */+ font-size: var(--ob-cap-fs);+ line-height: 1.5;white-space: nowrap;transition: color 300ms;}@@ -1293,7 +1305,7 @@/* The story becomes the stack the connection already is. The wires go with thecolumns — 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.+ and so do the return loop and the caption it carries.The cards take the rest of the reserved height in three equal rows, which is howthe introduction reaches the same floor as the connection. */.onboarding-story { flex: 1; align-items: stretch; }@@ -1305,8 +1317,7 @@height: auto;flex: 1;}- .onboarding-wires { display: none; }- .onboarding-story-caption { position: static; transform: none; align-self: center; }+ .onboarding-wires, .onboarding-return { display: none; }.onboarding-assistants-list { grid-template-columns: minmax(0, 1fr); gap: var(--ob-stack-gap); }/* 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. */@@ -1414,15 +1425,7 @@desktop tier, 60 on a phone — and it is the step that carries the OpenCode permissionblock, the tallest thing the slot ever holds. 48 is what every tier can give itwithout reaching the cards; the block scrolls inside that. */-/* Align the captions without moving the shared heading, card, or action anchors. */@media (min-width: 760px) {- .onboarding-shell {- --ob-caption-drop: calc(var(--ob-story-band) - var(--ob-summary-h) / 2 - var(--ob-card-h) * 38 / 300);- --ob-caption-nudge: 36px;- }- [data-setup-screen-root="intro"] .onboarding-story-caption {- top: calc(var(--ob-card-h) * 338 / 300 + (var(--ob-stage-h) - var(--ob-diagram-h)) / 2 + var(--ob-caption-drop) + var(--ob-caption-nudge));- }/* The hint grows around the caption line inside the room above the action. */.onboarding-step[data-setup-screen="assistants"] > .onboarding-screens > .onboarding-action-aside:not(:empty) {--ob-aside-half: calc(var(--ob-card-h) * 38 / 300 - 8px);@@ -1432,12 +1435,6 @@justify-content: center;}}-@media (max-height: 800px) and (min-width: 760px) {- .onboarding-shell { --ob-caption-nudge: 37.5px; }-}-@media (min-width: 1600px) and (min-height: 950px) {- .onboarding-shell { --ob-caption-nudge: 19.5px; }-}@media (max-width: 759px) {.onboarding-step[data-setup-screen="assistants"] { --ob-aside-max: 48px; }}@@ -1445,8 +1442,11 @@/* Sentence centred on the action's axis, rescan beside it: equal flanking columns putthe middle one in the middle of the slot whatever the link costs, and the link startswhere the sentence ends. Both columns can give all their width back, so a narrow- window wraps the sentence instead of pushing the link off the screen. */-.onboarding-setup-hint-line { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 6px; }+ window wraps the sentence instead of pushing the link off the screen.+ The line wears the providers summary's type, and the link is centred on the sentence+ rather than baseline-aligned: its icon would otherwise lift it above the text. */+.onboarding-setup-hint-line { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }+.onboarding-setup-hint-line, .onboarding-setup-hint-line > * { font-size: var(--ob-cap-fs); line-height: 1.5; }.onboarding-setup-hint-line > span { grid-column: 2; }.onboarding-setup-hint-line > :not(span) { grid-column: 3; justify-self: start; }@@ -1472,5 +1472,4 @@}@media (max-width: 759px) {.onboarding-shell { --ob-provider-card-h: 116px; --ob-provider-card-pad: 10px; --ob-provider-card-gap: 6px; --ob-provider-card-logo: 25px; --ob-provider-card-name: 13px; --ob-provider-card-key: 10px; --ob-wire-h: 42px; --ob-gap: 7px; --ob-destination-h: 120px; --ob-content-w: 460px; }- .onboarding-story-caption { display: none; }}diff --git a/ui/src/components/steps/AgentDetection.tsx b/ui/src/components/steps/AgentDetection.tsxindex 5504106df..422b46eff 100644--- a/ui/src/components/steps/AgentDetection.tsx+++ b/ui/src/components/steps/AgentDetection.tsx@@ -670,7 +670,7 @@ export const AgentDetection: React.FC<AgentDetectionProps> = ({ data, onNext, onsentence rather than beside the action, so it reads as part of the explanationinstead of a second control competing with the button. */const rescan = (- <Button type="button" variant="link" size="xs" className="h-auto p-0 align-baseline text-xs"+ <Button type="button" variant="link" size="xs" className="h-auto p-0"onClick={() => void detectAll()} disabled={isAnyInstalling || Object.values(detectingAgents).some(Boolean)}><RefreshCw size={12} />{t('agentDetection.rescan')}</Button>@@ -680,7 +680,7 @@ export const AgentDetection: React.FC<AgentDetectionProps> = ({ data, onNext, onsentence is what gets centred. The rescan rides in the flanking columnbeside it — inside one centred line it pulled the sentence off theaction's axis by half its own width. */- <p className="onboarding-setup-hint-line text-xs text-muted">+ <p className="onboarding-setup-hint-line text-muted"><span>{t('onboarding.connection.entryHint')}</span>{rescan}</p>