Skip to content

fix(site): build before Playwright starts the preview server - #413

Merged
byronwall merged 1 commit into
mainfrom
claude/site-test-build-first-4740f5
Nov 22, 2026
Merged

byronwall merged 1 commit into
mainfrom
claude/site-test-build-first-4740f5

Conversation

@byronwall

Copy link
Copy Markdown
Owner

pnpm test in site/ now passes on a clean checkout. Playwright's web server runs pnpm build before vite preview, so you no longer have to build by hand first.

User impact: None. The public site does not change.

Why

The nightly main check on c3f3ab7a failed in site:test. That check runs typecheck and test but not build. vite preview then stopped with The directory "dist" does not exist. Did you build your project?.

Proof

I deleted site/dist and site/.ssr, ran pnpm install, then ran pnpm test in site/ on this branch:

[WebServer] $ pnpm typecheck && vite build && vite build --ssr src/server.tsx --outDir .ssr && node scripts/prerender.mjs
[WebServer] $ tsc --noEmit
[WebServer] $ vite preview --host 127.0.0.1 --port 18588 --strictPort

Running 7 tests using 1 worker
  ✓  1 [chromium] › tests/site.spec.ts:5:1 › every guide has readable static HTML and valid local links (1.7s)
  ...
  ✓  7 [chromium] › tests/site.spec.ts:145:1 › copy feedback resets when copying successive code blocks (1.5s)

  7 passed (23.4s)

pnpm typecheck in site/ also passes. This is a config change, so command output is the strongest proof.

Limits

  • .github/workflows/site.yml still runs pnpm build before pnpm test, so CI now builds the site twice. The build takes a few seconds. Remove that step if you don't want the second build.
  • If a preview server already runs on port 18588 locally, Playwright reuses it and skips the build, as before.

🤖 Generated with Claude Code

The site tests failed on a clean checkout because `vite preview` needs
`site/dist`. Playwright's web server now runs `pnpm build` first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@byronwall
byronwall enabled auto-merge (squash) November 22, 2026 04:10
@byronwall
byronwall merged commit 919b881 into main Nov 22, 2026
7 checks passed
@byronwall
byronwall deleted the claude/site-test-build-first-4740f5 branch November 22, 2026 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant