Adds a preview server that follows the real server rules

Lighthouse and the browser tests need a real 404 status, the .html mapping and
the production headers, which vite preview does not give. It is not wired into
the scripts yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 18:20:22 +01:00
co-authored by Claude Opus 5.5
parent 2c2e27e337
commit 0b964b5466
5 changed files with 863 additions and 19 deletions
@@ -33,8 +33,8 @@ Notes:
| V6 | Code splitting; router plugin unused | 4 (30 later) | Start's plugin includes `tanstackRouterGenerator` and `tanStackRouterCodeSplitter` itself (client and server environments), so route code splitting is on without an option and `@tanstack/router-plugin` is not needed as a direct dependency. Removed with `pnpm remove @tanstack/router-plugin`; only Start's own copy (1.168.48) remains. | Client build has one chunk per route (`over-mij-*.js`, `contact-*.js`, `portfolio-*.js`, `newborn-*.js`, ..., `_-*.js` for the catch-all), plus `ContactForm`, `Lightbox`, `TestimonialCarousel` chunks. Step 30 re-checks. | OK |
| V7 | Sitemap in the client environment only | 4 | `this.environment.name === 'client'` identifies the client build in `generateBundle` (Vite 8.3.1, Start environments `client` and `ssr`). | `dist/client/sitemap.xml` exists once (10 `<loc>`, no `/privacyverklaring`, no `/404`); `find dist -name sitemap.xml` gives only that file; `public/` has no `sitemap.xml`. | OK |
| V8 | Lazy `ContactForm` in HTML and hydration | 27 | open (first look: `contact.html` contains `data-testid="contact-form"` and its fields; `/contact` hydrates in Chrome without console output) | | open |
| V9 | Testimonials in HTML, hidden slides | 21, 27 | open | | open |
| V10 | Placeholder sizes, CLS below 0.01 | 17, 34 | open | | open |
| V9 | Testimonials in HTML, hidden slides | 21, 27 | Code part (step 18, 21): `renderToString` of `Testimonials` holds the quote of every visible review; the copies besides the longest sit in a `VisuallyHidden` wrapper with `aria-hidden` and `inert`; axe has no violations in jsdom with the placeholder showing. Layout and reading order in a browser: step 27. | `Testimonials.test.tsx` (4 new tests) | open |
| V10 | Placeholder sizes, CLS below 0.01 | 17, 34 | First estimates (step 17), not measured: footer item `minH` 44px below `lg`, `1lh` from `lg` (one line of the list item); contact card item `minH` 44px; gate notice inline block `38ch` (lead " Mail me voor nu op " 20 + address 18 characters, from the parts without assembling) plus a hidden button with the recipe and label. To be measured in 27 and 34. | `Footer.tsx`, `ContactDetails.tsx`, `ContactFormGate.tsx` | open |
| V11 | One title, one noindex meta | 4 (normal pages), 27 (`404.html`) | Normal pages in the prerendered HTML: one `<title>`, one `description`, one `canonical`, no `data-fallback`, a robots meta only on `/privacyverklaring`. `404.html`: one `<title>` ("Pagina niet gevonden \| Andrea Slop Fotografie") and one `<meta name="robots" content="noindex">`, no description or canonical. React writes `<meta charSet="utf-8">` with a capital S (valid, attribute names are case-insensitive). | `scripts.mjs` counts per file. After hydration in Chrome: `/`, `/over-mij`, `/contact` still 1 title. Caution for Step 27: `/soorten-fotoshoots/onbekend` showed 2 titles and 2 robots metas after React error #418 (the two extra 404 buttons render before hydration; Step 16 fixes that); `/onbekend` is clean. | OK (normal pages); `404.html` source OK, final check in 27 |
| V12 | 404 hydration with real shell | 27 | open (first look, before Step 16: `/onbekend` hydrates clean; `/soorten-fotoshoots/onbekend` gives #418, which Step 16 `hydrated && isShootSectionPath` should remove) | | open |
| V13 | Timestamps and build paths | 4, 13 | Repeated on the final output of the runner (HTML plus the 16 moved script files plus all JS/CSS/XML/TXT/JSON): no build timestamp (`YYYY-MM-DDTHH:MM`) in any text file, no `.map` file, no repository root path (forward slashes, backslashes or doubled backslashes) in any text file. File names are content hashes, so they cannot carry a timestamp. | Scan in the scratch run (`repoPathFiles: 0`, `timestampFiles: 0`, `maps: 0`); the runner's own BUILD_PATH_LEAK check reported nothing. | OK |