From fe1ec5db3dccc3cec395ece67575c49da2aff175 Mon Sep 17 00:00:00 2001 From: Sluijsens Date: Sat, 31 Oct 2026 18:25:41 +0100 Subject: [PATCH] Wires the script step and preview server into the build The build now moves inline scripts and fails on a violation. Lighthouse audits /404.html, because it refuses a page with a real 404 status. Co-Authored-By: Claude Opus 5.5 --- .../plans/start-migration-code-generation-plan.md | 2 +- .../start-migration/code/verification-log.md | 13 +++++++++++-- web/eslint.config.js | 6 ++++++ web/lighthouserc.cjs | 2 +- web/package.json | 7 ++++--- web/src/app.test.tsx | 3 +++ web/tsconfig.json | 8 +++++++- web/vite.config.ts | 9 +++------ 8 files changed, 36 insertions(+), 14 deletions(-) diff --git a/aidlc-docs/features/prerendering/construction/plans/start-migration-code-generation-plan.md b/aidlc-docs/features/prerendering/construction/plans/start-migration-code-generation-plan.md index fd000b2..2bd458e 100644 --- a/aidlc-docs/features/prerendering/construction/plans/start-migration-code-generation-plan.md +++ b/aidlc-docs/features/prerendering/construction/plans/start-migration-code-generation-plan.md @@ -388,7 +388,7 @@ Disjoint from B2 and B4. Runs only targeted `vitest run` commands. The editing o ## Part F: Integration (batch B5; after CP2) -### Step 24: Wire the build, preview and configuration [ ] +### Step 24: Wire the build, preview and configuration [x] - Executor: Haiku. - Implements: BR-BLD-01, 03, 04, 09, 10 (client path); BR-SRV-08; BR-SEC-01; CP3. diff --git a/aidlc-docs/features/prerendering/construction/start-migration/code/verification-log.md b/aidlc-docs/features/prerendering/construction/start-migration/code/verification-log.md index 3e4d778..6100509 100644 --- a/aidlc-docs/features/prerendering/construction/start-migration/code/verification-log.md +++ b/aidlc-docs/features/prerendering/construction/start-migration/code/verification-log.md @@ -29,9 +29,9 @@ Notes: | V2 | `RouterProvider` in jsdom renders `shellComponent` | 5 | Yes, Router calls the root `shellComponent` (`Match.js`: `ShellComponent = route.isRoot && route.options.shellComponent`). React 19 treats `html`/`head`/`body` as singletons, so no `` lands in the RTL container (container has 0 html/head/body), but it sets `lang="nl"` on `document.documentElement` and wraps `ChakraProvider` a second time. Variant used: `renderApp` replaces the root route's `shellComponent` by a test shell (`HeadContent` + children) on its router instance; production code untouched. | Probe test (removed) printed `shellComponent: function`, `html=0 head=0 body=0`, `document.documentElement lang=nl`. All 888 tests pass with the test shell (with the real shell, 45 of 46 in `app.test.tsx` passed; the one failure was the `/$` register test). | OK | | V3 | Inline scripts per real page | 4 (first look), 13 (final) | Final list from the real runner on a scratch copy of the Step 4 output (12 HTML files): every page has 3 moved scripts, `/contact` has 5, 16 distinct files in total. (1) router scroll restoration, 613 chars, no attributes, same file on all pages; (2) Start bootstrap `data-tsr-stream-part=""`, 916 to 1349 chars, one file per page; (3) boundary `document.currentScript.remove();/*$tsr-stream-boundary*/`, 56 chars, same file everywhere; only `/contact`: (4) `