From 3b0619528d0177c45ae626f628493427b4963870 Mon Sep 17 00:00:00 2001 From: "t3-code[bot]" <269035359+t3-code[bot]@users.noreply.github.com> Date: Wed, 12 Aug 2026 09:09:05 +0000 Subject: [PATCH 1/2] fix(web): align mobile onboarding header Co-authored-by: Utkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com> --- .../web/src/routes/-chatIndexTitlebar.test.ts | 20 +++++++++++++++++++ apps/web/src/routes/_chat.index.tsx | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 apps/web/src/routes/-chatIndexTitlebar.test.ts diff --git a/apps/web/src/routes/-chatIndexTitlebar.test.ts b/apps/web/src/routes/-chatIndexTitlebar.test.ts new file mode 100644 index 000000000000..b27d56288844 --- /dev/null +++ b/apps/web/src/routes/-chatIndexTitlebar.test.ts @@ -0,0 +1,20 @@ +// @effect-diagnostics nodeBuiltinImport:off - Regression coverage compares the onboarding header with the shared titlebar contract. +import * as NodeFS from "node:fs"; + +import { describe, expect, it } from "vite-plus/test"; + +describe("hosted static onboarding header", () => { + it("uses the shared workspace topbar geometry", () => { + const routeSource = NodeFS.readFileSync(new URL("./_chat.index.tsx", import.meta.url), "utf8"); + const onboardingHeader = routeSource.slice( + routeSource.indexOf("function HostedStaticOnboardingState()"), + routeSource.indexOf( + '', + routeSource.indexOf("function HostedStaticOnboardingState()"), + ), + ); + + expect(onboardingHeader).toContain("workspace-topbar"); + expect(onboardingHeader).not.toMatch(/(?:^|:)py-/); + }); +}); diff --git a/apps/web/src/routes/_chat.index.tsx b/apps/web/src/routes/_chat.index.tsx index 6e8dbe33ff5f..12bbdf666c43 100644 --- a/apps/web/src/routes/_chat.index.tsx +++ b/apps/web/src/routes/_chat.index.tsx @@ -145,7 +145,7 @@ function HostedStaticOnboardingState() {
From 864cca20c473d8f946d5db8ce141ba4c1f0b02af Mon Sep 17 00:00:00 2001 From: "t3-code[bot]" <269035359+t3-code[bot]@users.noreply.github.com> Date: Wed, 12 Aug 2026 09:13:43 +0000 Subject: [PATCH 2/2] test(web): strengthen onboarding header regression Co-authored-by: Utkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com> --- apps/web/src/routes/-chatIndexTitlebar.test.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/web/src/routes/-chatIndexTitlebar.test.ts b/apps/web/src/routes/-chatIndexTitlebar.test.ts index b27d56288844..5e74103a5421 100644 --- a/apps/web/src/routes/-chatIndexTitlebar.test.ts +++ b/apps/web/src/routes/-chatIndexTitlebar.test.ts @@ -6,15 +6,15 @@ import { describe, expect, it } from "vite-plus/test"; describe("hosted static onboarding header", () => { it("uses the shared workspace topbar geometry", () => { const routeSource = NodeFS.readFileSync(new URL("./_chat.index.tsx", import.meta.url), "utf8"); - const onboardingHeader = routeSource.slice( - routeSource.indexOf("function HostedStaticOnboardingState()"), - routeSource.indexOf( - '', - routeSource.indexOf("function HostedStaticOnboardingState()"), - ), - ); + const onboardingStart = routeSource.indexOf("function HostedStaticOnboardingState()"); + const onboardingEnd = routeSource.indexOf('', onboardingStart); + + expect(onboardingStart).toBeGreaterThanOrEqual(0); + expect(onboardingEnd).toBeGreaterThan(onboardingStart); + + const onboardingHeader = routeSource.slice(onboardingStart, onboardingEnd); expect(onboardingHeader).toContain("workspace-topbar"); - expect(onboardingHeader).not.toMatch(/(?:^|:)py-/); + expect(onboardingHeader).not.toMatch(/(?:^|\s)(?:[\w-]+:)*py-/); }); });