| author | |
| committer | |
| log | 6fd088af9f77933745c8ecb93dda98fa0938ea4d |
| tree | bdb1653dbb348a0cbe993147c49b54a89eb67c4e |
| parent | b54bfc9312b030bad9d89771fbf561ccbfb2d315 |
| signature | Signed by PGP key B5690EEEBB952194 |
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Utkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com>2 files changed, 21 insertions(+), 1 deletions(-)
apps/web/src/routes/-chatIndexTitlebar.test.ts created+20| ... | @@ -0,0 +1,20 @@ | ||
| 1 | // @effect-diagnostics nodeBuiltinImport:off - Regression coverage compares the onboarding header with the shared titlebar contract. | ||
| 2 | import * as NodeFS from "node:fs"; | ||
| 3 | |||
| 4 | import { describe, expect, it } from "vite-plus/test"; | ||
| 5 | |||
| 6 | describe("hosted static onboarding header", () => { | ||
| 7 | it("uses the shared workspace topbar geometry", () => { | ||
| 8 | const routeSource = NodeFS.readFileSync(new URL("./_chat.index.tsx", import.meta.url), "utf8"); | ||
| 9 | const onboardingStart = routeSource.indexOf("function HostedStaticOnboardingState()"); | ||
| 10 | const onboardingEnd = routeSource.indexOf('<Empty className="flex-1">', onboardingStart); | ||
| 11 | |||
| 12 | expect(onboardingStart).toBeGreaterThanOrEqual(0); | ||
| 13 | expect(onboardingEnd).toBeGreaterThan(onboardingStart); | ||
| 14 | |||
| 15 | const onboardingHeader = routeSource.slice(onboardingStart, onboardingEnd); | ||
| 16 | |||
| 17 | expect(onboardingHeader).toContain("workspace-topbar"); | ||
| 18 | expect(onboardingHeader).not.toMatch(/(?:^|\s)(?:[\w-]+:)*py-/); | ||
| 19 | }); | ||
| 20 | }); | ||
apps/web/src/routes/_chat.index.tsx+1-1| ... | @@ -145,7 +145,7 @@ function HostedStaticOnboardingState() { | ... | @@ -145,7 +145,7 @@ function HostedStaticOnboardingState() { |
| 145 | <div className="flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-background"> | 145 | <div className="flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-background"> |
| 146 | <header | 146 | <header |
| 147 | className={cn( | 147 | className={cn( |
| 148 | "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", | 148 | "workspace-topbar border-b border-border px-3 transition-[padding-left] duration-200 ease-linear motion-reduce:transition-none sm:px-5", |
| 149 | COLLAPSED_SIDEBAR_TITLEBAR_INSET_CLASS, | 149 | COLLAPSED_SIDEBAR_TITLEBAR_INSET_CLASS, |
| 150 | )} | 150 | )} |
| 151 | > | 151 | > |