Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions apps/web/src/routes/-chatIndexTitlebar.test.ts
Original file line number Diff line number Diff line change
@@ -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('<Empty className="flex-1">', 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-/);
});
});
2 changes: 1 addition & 1 deletion apps/web/src/routes/_chat.index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function HostedStaticOnboardingState() {
<div className="flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-background">
<header
className={cn(
"border-b border-border px-3 py-2 transition-[padding-left] duration-200 ease-linear motion-reduce:transition-none sm:px-5 sm:py-3",
"workspace-topbar border-b border-border px-3 transition-[padding-left] duration-200 ease-linear motion-reduce:transition-none sm:px-5",
COLLAPSED_SIDEBAR_TITLEBAR_INSET_CLASS,
)}
>
Expand Down
Loading