From e714fc2ecf3ddda1cd13bfbddfaac1540df3ee59 Mon Sep 17 00:00:00 2001 From: David McKay Date: Sat, 21 Nov 2026 18:29:11 -0800 Subject: [PATCH] Onboarding: Connect your AI keeps the frame's space above the phone's buttons On a phone the onboarding frame now keeps the fade's height above its pinned buttons for every step. Connect your AI still added room of its own below Sign out for the same fade, so scrolled to the end the step left about twice the gap the terms step and Welcome do. The step's own room is gone, and Sign out stops just above the fade like every other step's last line. The phone test now holds Sign out to within a pixel of the fade's top. It fails on main (48px over) and passes now. --- app/src/components/onboarding/ai-step.tsx | 8 ++++---- app/tests/connect-your-ai.test.tsx | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/src/components/onboarding/ai-step.tsx b/app/src/components/onboarding/ai-step.tsx index 2a29a00ede..8b6fec26e6 100644 --- a/app/src/components/onboarding/ai-step.tsx +++ b/app/src/components/onboarding/ai-step.tsx @@ -72,11 +72,11 @@ export function useAiStep(): OnboardingStep {
{/* - * Room below it for the fade above the phone's pinned buttons (`before:h-8` in the frame's - * footer) and the frame's 16px gutter past it, so scrolled to the end, Sign out reads - * clear of it. + * No room of its own below: the frame keeps the fade's height above the phone's pinned + * buttons for every step, so scrolled to the end Sign out stops just above the fade, as + * Welcome's and the terms step's last lines do. */} -
+
diff --git a/app/tests/connect-your-ai.test.tsx b/app/tests/connect-your-ai.test.tsx index 82231aff63..b7b4d7c960 100644 --- a/app/tests/connect-your-ai.test.tsx +++ b/app/tests/connect-your-ai.test.tsx @@ -846,7 +846,7 @@ describe.skipIf(!asked)("Connect your AI on OpenBot Cloud", () => { for (const engine of engines) for (const theme of THEMES) - test(`at a phone's width, scrolled to the end, Sign out clears the buttons' fade, in ${engine}, ${theme}`, async () => { + test(`at a phone's width, scrolled to the end, Sign out stops just above the buttons' fade as every step's last line does, in ${engine}, ${theme}`, async () => { const server = new FakeServer("none", true); server.acme = personalFor("organization"); const page = await open("/", server, engine, theme, PHONE); @@ -874,7 +874,11 @@ describe.skipIf(!asked)("Connect your AI on OpenBot Cloud", () => { ); }); expect(room).not.toBeNull(); - expect(room ?? -1).toBeGreaterThanOrEqual(0); + // Clear of the fade, and no further: the frame keeps the fade's height above the + // buttons for every step, so a step adding room of its own doubles the gap. Within a + // pixel, for the sub-pixel sizes text is drawn at (styles.css scales it by 15/16). + expect(room ?? -2).toBeGreaterThanOrEqual(-1); + expect(room ?? Number.POSITIVE_INFINITY).toBeLessThanOrEqual(8); if (shots) { mkdirSync(shots, { recursive: true }); await page.screenshot({