diff --git a/apps/web/src/routes/-chatIndexTitlebar.test.ts b/apps/web/src/routes/-chatIndexTitlebar.test.ts new file mode 100644 index 000000000000..5e74103a5421 --- /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 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(/(?:^|\s)(?:[\w-]+:)*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() {