Adds the build-and-test results and the content handoff
Continuous Integration / deploy-test (pull_request) Canceled after 0s
Continuous Integration / lighthouse (pull_request) Canceled after 0s
Continuous Integration / deploy-production (pull_request) Canceled after 0s
Continuous Integration / check (pull_request) Canceled after 16s
Continuous Integration / deploy-test (pull_request) Canceled after 0s
Continuous Integration / lighthouse (pull_request) Canceled after 0s
Continuous Integration / deploy-production (pull_request) Canceled after 0s
Continuous Integration / check (pull_request) Canceled after 16s
The shoot-type pages are code-complete but wait for Andrea's texts, answers to the open questions and extra photos. content-pending.md describes how to finish them and what must hold before the merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,4 +9,4 @@
|
||||
| Feature | soorten-fotoshoots-page | ✅ Complete | feature/soorten-fotoshoots-page | web/src/routes/soorten-fotoshoots.tsx, new web/src/content/shootTypes.ts, new web/src/assets/shoots/, new shared CallToAction, MediaText (reverse prop), Pricing (id="prijzen" only), siteContent (service area), own entries in sitePages.ts / lighthouserc.cjs, JSON-LD via the shared webPage() helper in seo.ts | 2026-10-24 |
|
||||
| Feature | contact-page | ✅ Complete | feature/contact-page | web/src/routes/contact.tsx, web/src/content, possibly ContactForm/ContactSection, PageIntro, MediaText/FramedImage, web/src/seo.ts, sitePages/sitemap | 2026-10-24 |
|
||||
| Feature | portfolio-page | ✅ Complete | feature/portfolio-page (based on master after over-mij merge; worktree ../AndreaSlopFotografie-portfolio) | web/src/routes/portfolio.tsx, web/src/content, new PortfolioGrid + Lightbox, InstagramGrid (moved to shared), own entries in sitePages.ts / lighthouserc.cjs, ImageGallery JSON-LD via the shared webPage() helper | 2026-10-24 |
|
||||
| Feature | shoot-type-pages | 🟢 Construction | feature/shoot-type-pages (worktree ../AndreaSlopFotografie-shoot-type-pages) | new route(s) per shoot type under web/src/routes, web/src/content (shootTypes.ts extension, timeline content), shared Timeline component, links from soorten-fotoshoots, seo.ts (webPage helper), sitePages.ts / sitemap, lighthouserc.cjs | 2026-10-29 |
|
||||
| Feature | [shoot-type-pages](features/shoot-type-pages/content-pending.md) | ⏸️ Waiting for content | feature/shoot-type-pages (worktree ../AndreaSlopFotografie-shoot-type-pages) | new route(s) per shoot type under web/src/routes, web/src/content (shootTypes.ts extension, timeline content), shared Timeline component, links from soorten-fotoshoots, seo.ts (webPage helper), sitePages.ts / sitemap, lighthouserc.cjs | 2026-10-29 |
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
- **Feature Slug**: shoot-type-pages
|
||||
- **Project Type**: Brownfield
|
||||
- **Start Date**: 2026-10-29T17:19:19Z
|
||||
- **Current Stage**: CONSTRUCTION - Code Generation complete, awaiting approval to continue to Build and Test
|
||||
- **Current Stage**: CONSTRUCTION - Build and Test complete; ⏸️ waiting for content (Andrea) before merge — see content-pending.md
|
||||
- **Branch**: feature/shoot-type-pages (from master 18e81d0)
|
||||
- **Worktree**: K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-shoot-type-pages
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
- [ ] NFR Design - SKIP
|
||||
- [ ] Infrastructure Design - SKIP
|
||||
- [x] Code Generation - EXECUTE (per unit): 1 Content and SEO foundation ✅ (e5f4348) → 2 Shoot page UI ✅ ∥ 3 Navigation submenu ✅ (7af2069; plus FR-ST-14); open: unit 2 Step 23 mobile Lighthouse gezin/loveshoot < 0.85 (owner keeps fade-in)
|
||||
- [ ] Build and Test - EXECUTE
|
||||
- [x] Build and Test - EXECUTE (build and 888 tests pass at d3bc1d7; content pending, see content-pending.md)
|
||||
|
||||
### 🟡 OPERATIONS PHASE
|
||||
- [ ] Deployment Setup, Monitoring Setup, Production Readiness Validation - SKIP (Operations = No)
|
||||
|
||||
@@ -394,3 +394,30 @@
|
||||
**Context**: CONSTRUCTION - Code Generation
|
||||
|
||||
---
|
||||
|
||||
## Code Generation — Approved; Build and Test started
|
||||
**Timestamp**: 2026-10-30T23:28:05Z
|
||||
**User Input**: "ga verder naar de volgende stage. de teksten en extra foto's komen later die zijn nog niet gereed dus dat moeten we even ergens vastleggen zodat andere sessies dat eventueel ook kunnen oppakken."
|
||||
**AI Response**: Code Generation approved. Build and Test started: Haiku runs the full checks at d3bc1d7 and writes construction/build-and-test/*. Content pending recorded for other sessions: Sonnet writes content-pending.md (pick-up guide for texts, open questions, 25 photos, merge gate) and sets the active-features row to "⏸️ Waiting for content"; orchestrator added a project memory pointing to it.
|
||||
**Context**: CONSTRUCTION - Build and Test
|
||||
|
||||
---
|
||||
|
||||
## Build and Test Stage
|
||||
**Timestamp**: 2026-10-30T23:33:42Z
|
||||
**Build Status**: Success (pnpm build at d3bc1d7; main chunk 152.56 kB gzip)
|
||||
**Test Status**: Pass (113 files, 888 tests, seed 1594855861; coverage thresholds met; lint, format, tsc, audit:deps clean). Lighthouse from 2026-10-30 combined-unit runs: known items open (mobile / and /contact as on master; gezin/loveshoot < 0.85, owner keeps fade-in).
|
||||
**Files Generated**:
|
||||
- build-instructions.md
|
||||
- unit-test-instructions.md
|
||||
- integration-test-instructions.md
|
||||
- performance-test-instructions.md
|
||||
- security-test-instructions.md
|
||||
- e2e-test-instructions.md
|
||||
- build-and-test-summary.md
|
||||
- ../../content-pending.md (pick-up guide for the pending texts and photos)
|
||||
**Operations Phase Decision**: No (Decided At: Requirements Analysis)
|
||||
**User Input**: "je mag alles committen en pushen en dan een PR aanmaken"
|
||||
**AI Response**: Unit-3 code summary corrected (Steps 17–18 passed, not pending); content-pending.md corrected (branch already contains master 1416497). active-features status "⏸️ Waiting for content" instead of "✅ Complete" because the merge is blocked on content (CON-ST-03). Committing, pushing and opening a WIP PR to master; the WIP title keeps it from being merged before the content is final.
|
||||
|
||||
---
|
||||
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
# Build and Test Summary
|
||||
|
||||
Feature: shoot-type-pages. Branch `feature/shoot-type-pages`, worktree `AndreaSlopFotografie-shoot-type-pages`.
|
||||
Verified at HEAD `d3bc1d7` (Build and Test stage, run with pnpm 12.11.2, Node v24.16.0, Windows 11 / Git Bash).
|
||||
Lighthouse was not run in this stage; its figures are the measurements from two days ago (see Performance).
|
||||
|
||||
## Build Status
|
||||
- **Build Tool**: Vite 8 with `tsc` (`pnpm build` = `tsc && vite build`), pnpm 12.11.2
|
||||
- **Build Status**: Success (exit 0; `pnpm install --frozen-lockfile` also exit 0)
|
||||
- **Build Artifacts**: `web/dist/` (gitignored)
|
||||
- Main chunk `dist/assets/index-C65n6UdK.js`: 536.65 kB raw, 152.56 kB gzip
|
||||
- Main chunk against unit 1 (`index-D0huvRmx.js`, 150.69 kB gzip): +1.87 kB gzip, limit 2.5 kB (NFR-ST-03): pass
|
||||
- Five shoot route chunks plus `-shootPageSources-*.js`; five OG images (`og-<id>.jpg`, 88.9 to 97.6 kB)
|
||||
- **Build Time**: Vite `built in 1.24s`; 7.8 s wall-clock including `tsc`
|
||||
- **Warning**: Vite chunk-size warning (main chunk above 500 kB). Accepted for this stage.
|
||||
|
||||
## Test Execution Summary
|
||||
|
||||
### Unit Tests (full suite, all three units)
|
||||
- **Command**: `pnpm test` (`vitest run --coverage`)
|
||||
- **Total Tests**: 888 in 113 files
|
||||
- **Passed**: 888
|
||||
- **Failed**: 0
|
||||
- **fast-check seed**: 1594855861 (replay: `FC_SEED=1594855861 pnpm test`)
|
||||
- **Coverage** (v8): statements 96.5% (1161/1203), branches 93.94% (854/909), functions 95.61% (436/456), lines 96.81% (1033/1067). Thresholds 100% for `src/lib/**`, `seo.ts`, `sitemap.ts`: met.
|
||||
- **Status**: Pass
|
||||
|
||||
### Integration Tests (cross-unit scenarios)
|
||||
- **Test Scenarios**: 6 (submenu from shootTypes to the shoot routes; exactly three `aria-current` per shoot page; overview "Lees meer" links; sitePages/sitemap/lighthouserc sync; OG images in the registry; FR-ST-14 404 under `/soorten-fotoshoots/`)
|
||||
- **Passed**: 6 (run inside the full suite above)
|
||||
- **Failed**: 0
|
||||
- **Real-browser navigation check**: 110/110 checks pass (Step 17 of the navigation-submenu plan, recorded in `audit.md`)
|
||||
- **Status**: Pass
|
||||
- **Details**: `integration-test-instructions.md`
|
||||
|
||||
### Performance Tests (Lighthouse CI, measured two days ago, not re-run)
|
||||
- **Desktop performance**: 0.99 to 1.00 on every page (budget 0.9). Target: 0.9. Status: pass.
|
||||
- **Mobile performance, below budget (known, open)**:
|
||||
- `/` home: pooled median 0.77 (budget 0.8; master 0.78; unit-1 baseline 0.77)
|
||||
- `/contact`: 0.87 (budget 0.9; master 0.87)
|
||||
- `/soorten-fotoshoots/loveshoot`: 0.83 (budget 0.85)
|
||||
- `/soorten-fotoshoots/gezin`: 0.84 to 0.85 (budget 0.85, borderline)
|
||||
- **Mobile performance, passing**: newborn 0.86, zwangerschap 0.85, portret 0.85 (budget 0.85)
|
||||
- **Cause of the shoot-page misses**: the `Reveal` fade-in on the first story photo paints about 2.9 s after the main bundle. The owner decided on 2026-10-30 to keep the fade-in for now.
|
||||
- **Status**: Fail (known, open). `pnpm check` is not green because of these budgets.
|
||||
- **Details**: `performance-test-instructions.md`
|
||||
|
||||
### Additional Tests
|
||||
- **Contract Tests**: N/A (no API or service boundary; static site)
|
||||
- **Security Tests**: Pass for the production audit and the headers and input tests. Development-tool audit: 22 advisories (2 low, 9 moderate, 11 high), non-blocking under NFR-SEC-05 and unchanged from master. Details: `security-test-instructions.md`.
|
||||
- **E2E Tests**: Not run in this stage. Manual checklist for the test environment (five shoot pages, submenu on desktop and mobile, keyboard path, `/soorten-fotoshoots/bestaat-niet`): `e2e-test-instructions.md`.
|
||||
|
||||
## Static Checks (run in this stage)
|
||||
|
||||
| Check | Result |
|
||||
|---|---|
|
||||
| `pnpm install --frozen-lockfile` | Pass |
|
||||
| `pnpm lint` (eslint .) | Pass |
|
||||
| `pnpm format:check` (prettier) | Pass |
|
||||
| `pnpm exec tsc --noEmit` | Pass |
|
||||
| `pnpm test` | Pass (888 tests, 113 files) |
|
||||
| `pnpm build` | Pass |
|
||||
| `pnpm audit:deps` (prod, high) | Pass (no known vulnerabilities) |
|
||||
| `pnpm audit:dev` | 22 advisories, exit 0 by design (script has an echo fallback), non-blocking |
|
||||
| `DRAFT(CON-ST-03)` markers in `web/src` | 98 |
|
||||
| `OPEN(CON-ST-04)` markers in `web/src` | 7 |
|
||||
|
||||
## Content Status (blocks merge)
|
||||
- **DRAFT(CON-ST-03)**: 98 markers, awaiting Andrea's approval. Per file: newborn 15, zwangerschap 14, gezin 13, loveshoot 13, portret 13, shared 19, overview 1, registry (`sitePages.ts`) 10.
|
||||
- **OPEN(CON-ST-04)**: 7 open facts for Andrea (deposit scope and remainder timing, online gallery for Loveshoot and Portret, Loveshoot and Portret durations, Portret locations). Per file: loveshoot 1, portret 3, shared 3.
|
||||
- Full list and status: [content-pending.md](../../content-pending.md)
|
||||
|
||||
## Overall Status
|
||||
- **Build**: Success
|
||||
- **All Tests**: Pass (888 unit and integration tests, 0 failures)
|
||||
- **Ready for Operations**: N/A (Include Operations Phase = No, `aidlc-state.md`)
|
||||
- **Ready to Merge**: **No**
|
||||
- Content is pending: 98 DRAFT and 7 OPEN markers (see Content Status).
|
||||
- Lighthouse items are open: mobile `/` (0.77 vs 0.8), mobile `/contact` (0.87 vs 0.9, same on master), mobile loveshoot (0.83) and gezin (0.84 to 0.85) against 0.85. The fade-in decision is recorded; the items stay open.
|
||||
- `pnpm check` is not green because of the Lighthouse assertions.
|
||||
|
||||
## Next Steps
|
||||
Build and test passes. The branch is not ready to merge until:
|
||||
1. Andrea reviews the 98 drafts and answers the 7 open facts ([content-pending.md](../../content-pending.md)).
|
||||
2. The Lighthouse items are resolved or re-accepted by the owner: `/` and `/contact` (known baseline on master), loveshoot and gezin (fade-in decision).
|
||||
3. Commit and push happen only when the user asks (none in this stage).
|
||||
|
||||
Operations is not included, so the workflow completes after this stage once the above is settled.
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
# Build Instructions
|
||||
|
||||
Feature: shoot-type-pages (branch `feature/shoot-type-pages`, worktree `AndreaSlopFotografie-shoot-type-pages`).
|
||||
Verified at HEAD `d3bc1d7`.
|
||||
|
||||
## Prerequisites
|
||||
- **Build Tool**: pnpm 12.11.2 (`packageManager` in `web/package.json`), run from `web/`. Vite 8, TypeScript ~6.0.2 (`tsc` runs as the first step of `pnpm build`).
|
||||
- **Runtime**: Node.js v24.16.0 (verified on the build machine).
|
||||
- **Dependencies**: installed from `web/pnpm-lock.yaml` only. Do not run an unfrozen install. The `postinstall` hook runs `chakra typegen ./src/theme.ts`.
|
||||
- **Environment Variables**: none are needed for a build. Optional:
|
||||
- `FC_SEED=<seed>`: replays a fast-check run (tests only, see `unit-test-instructions.md`).
|
||||
- `LIGHTHOUSE_PERFORMANCE=warn`: Lighthouse performance reports a warning instead of failing (CI only, see `performance-test-instructions.md`).
|
||||
- `LIGHTHOUSE_CHROME_FLAGS`: Chrome flags for the CI container (`--no-sandbox`).
|
||||
- **System Requirements**: Windows 11 with Git Bash (the commands below are Git Bash syntax). Disk: the pnpm store may sit on another drive (at verification it was `K:\.pnpm-store\v11`, a harmless pnpm warning). No Docker, no database, no external service.
|
||||
|
||||
## Build Steps
|
||||
|
||||
### 1. Install Dependencies
|
||||
```bash
|
||||
cd web
|
||||
pnpm install --frozen-lockfile
|
||||
```
|
||||
- Expected: `Lockfile is up to date, resolution step is skipped`, `Done`, exit 0.
|
||||
- Harmless messages: the store-location warning, and `Agent skills awaiting approval: @tanstack/router-plugin` (informational; no approval needed for this build).
|
||||
|
||||
### 2. Configure Environment
|
||||
No configuration is needed for a local build. Do not copy or create `.env` files for this stage.
|
||||
|
||||
### 3. Build All Units
|
||||
```bash
|
||||
cd web
|
||||
pnpm build
|
||||
```
|
||||
`pnpm build` runs `tsc && vite build`. The type check covers all five shoot routes, the navigation submenu and the shared components together, because they are built as one app.
|
||||
|
||||
### 4. Verify Build Success
|
||||
- **Expected Output**: `✓ built in ~1.2s` from Vite; exit 0.
|
||||
- **Build Artifacts**: `web/dist/` (gitignored). Routes are split into chunks. The main chunk is `dist/assets/index-C65n6UdK.js`:
|
||||
- 536.65 kB raw, 152.56 kB gzip (verified at HEAD).
|
||||
- Against unit 1 (`index-D0huvRmx.js`, 528.98 kB / 150.69 kB gzip): +1.87 kB gzip, under the 2.5 kB limit of NFR-ST-03.
|
||||
- Shoot page route chunks (`newborn-*.js`, `zwangerschap-*.js`, `gezin-*.js`, `loveshoot-*.js`, `portret-*.js`, `-shootPageSources-*.js`) are separate files, so the shoot pages are not in the main chunk.
|
||||
- The five OG images (`og-<id>.jpg`, 88.9 to 97.6 kB each) are copied to `dist/`.
|
||||
- **Common Warnings** (acceptable):
|
||||
- Vite: `Some chunks are larger than 500 kB after minification`. The main chunk is 536.65 kB. Accepted for this stage; splitting it is a follow-up (see the Lighthouse notes in `performance-test-instructions.md`).
|
||||
- jsdom `Not implemented: HTMLCanvasElement's getContext()` and `Not implemented: navigation to another Document` lines appear in test output, not in the build.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Build Fails with Dependency Errors
|
||||
- **Cause**: lockfile out of date, or `node_modules` from another branch.
|
||||
- **Solution**: run `pnpm install --frozen-lockfile` again. If it still fails, do not change the lockfile in this stage. Report the failure with its output.
|
||||
|
||||
### Build Fails with Compilation Errors
|
||||
- **Cause**: `tsc` errors. The shoot routes import `routeTree.gen.ts`, which is generated by the TanStack router plugin during `vite build`.
|
||||
- **Solution**: read the first `error TS` line. If it is in `src/routeTree.gen.ts`, run `pnpm exec vite build` once to regenerate it, then run `pnpm build` again. Do not hand-edit the generated file.
|
||||
|
||||
### Build Fails on the Route Tree Check
|
||||
- **Cause**: a shoot route file was added or renamed without regenerating the tree.
|
||||
- **Solution**: as above. The route tree was regenerated in unit 1 and has no diff after the build at HEAD.
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
# End-to-End Test Instructions (Manual Check)
|
||||
|
||||
## Purpose
|
||||
A short manual check of the complete user paths on the test environment, after the CI deploy-test. There is no automated browser suite for this feature. The checks below cover what the jsdom tests cannot: real layout, real keyboard focus in the browser, and the real 404 response.
|
||||
|
||||
## Environment
|
||||
- **Target**: the test deployment of `feature/shoot-type-pages` (CI deploy-test job). Base URL: `<test-environment-url>` (fill in from the CI run; not recorded in this stage).
|
||||
- **Browsers**: desktop Chrome or Edge at 1280 px wide; mobile emulation at 375 × 667 in the browser's device mode (touch on).
|
||||
- **Prerequisite**: the deploy-test job of the CI run is green, and the URL loads the home page.
|
||||
|
||||
## Test Steps
|
||||
|
||||
### 1. Five shoot pages
|
||||
Open each page and check: one `h1`, the breadcrumb "Kruimelpad" at the top with the current page last, the process section "Zo werkt het", the package block (price or on-request variant), the FAQ (all items closed at load), and the closing call to action.
|
||||
|
||||
| # | URL | Expected |
|
||||
|---|---|---|
|
||||
| 1 | `<test-environment-url>/soorten-fotoshoots/newborn` | Photo mosaic with 3 tiles; package with price |
|
||||
| 2 | `<test-environment-url>/soorten-fotoshoots/zwangerschap` | No mosaic; package with price |
|
||||
| 3 | `<test-environment-url>/soorten-fotoshoots/gezin` | No mosaic; package with price |
|
||||
| 4 | `<test-environment-url>/soorten-fotoshoots/loveshoot` | No mosaic; on-request package |
|
||||
| 5 | `<test-environment-url>/soorten-fotoshoots/portret` | No mosaic; on-request package |
|
||||
|
||||
Also check the draft text is visible (the content is still in review, see `aidlc-docs/features/shoot-type-pages/content-pending.md`); this is not a failure of the check.
|
||||
|
||||
### 2. Submenu on desktop (1280 px)
|
||||
1. Open `<test-environment-url>/` and hover or click "Soorten fotoshoots" in the header. The panel is not opened by hover; it opens by click.
|
||||
2. Check the panel shows five items, in this order: Newborn, Zwangerschap, Gezin, Loveshoot, Portretten.
|
||||
3. Click "Gezin". The page `/soorten-fotoshoots/gezin` opens, the header item "Soorten fotoshoots" has the section underline, and the "Gezin" link in the panel has `aria-current="page"` (check with the browser's inspector).
|
||||
4. Click outside the panel or press Escape: the panel closes.
|
||||
|
||||
### 3. Submenu on mobile (375 × 667)
|
||||
1. Open the menu with the hamburger. Expand "Soorten fotoshoots".
|
||||
2. Check the five sub-links are listed under it.
|
||||
3. Tap "Loveshoot". The menu closes and `/soorten-fotoshoots/loveshoot` opens.
|
||||
4. Reopen the menu on the shoot page: the group is expanded, and the "Loveshoot" sub-link is the current one.
|
||||
5. Press the browser back button: the menu closes.
|
||||
|
||||
### 4. Keyboard path through the desktop submenu
|
||||
Use only the keyboard (Tab, Enter, Escape, no mouse):
|
||||
1. Tab until the "Soorten fotoshoots" toggle is focused. Press Enter: the panel opens.
|
||||
2. Tab through the five links in order: Newborn, Zwangerschap, Gezin, Loveshoot, Portretten. Each has a visible focus ring.
|
||||
3. Press Escape: focus returns to the toggle and the panel closes.
|
||||
4. Open the panel again with Enter, Tab out of the last link: the panel closes.
|
||||
5. Arrow keys do nothing in the submenu (no arrow-key menu pattern).
|
||||
|
||||
### 5. Not-found under the section
|
||||
Open `<test-environment-url>/soorten-fotoshoots/bestaat-niet`.
|
||||
- Expected: the 404 page (not the overview, not the shell's generic error). Two buttons in this order: "Terug naar Soorten fotoshoots" (links to `/soorten-fotoshoots`) and "Terug naar home".
|
||||
- Check the HTTP response status of the page (browser network panel): the app is a single-page app, so the status is from the host's SPA fallback. Record the actual status as observed; the page itself is a client-side 404.
|
||||
- Check the page title has the 404 title and the page is not indexed (`noindex` in the head).
|
||||
|
||||
### 6. Overview links
|
||||
Open `<test-environment-url>/soorten-fotoshoots`. Each shoot block has a "Lees meer over de …" link. Click one: it opens the shoot page.
|
||||
|
||||
## Expected Results
|
||||
- All five shoot pages load and show their sections in the order of the page structure.
|
||||
- Desktop and mobile submenu open, navigate and close as described.
|
||||
- The keyboard path reaches all items and returns focus correctly.
|
||||
- `/soorten-fotoshoots/bestaat-niet` shows the 404 with the two buttons.
|
||||
|
||||
## Record the Result
|
||||
For each step, write pass or fail and the URL and browser used. For a failure, record the URL, a screenshot and the browser console message. Do not fix anything in this stage; log it for the next change.
|
||||
|
||||
## Cleanup
|
||||
None. The check creates no data.
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
# Integration Test Instructions
|
||||
|
||||
## Purpose
|
||||
Test the interactions between the three units: the content and SEO foundation (unit 1), the shoot page UI (unit 2) and the navigation submenu (unit 3). Each scenario below runs the real app through `renderApp(path)` (`web/src/test/renderApp.tsx`) or the real navigation, not a single component in isolation.
|
||||
|
||||
The scenarios run inside `pnpm test` (see `unit-test-instructions.md`). There is no separate integration command and no service to start. All tests run in jsdom, so no browser, server or database is needed. The real-browser navigation check is recorded in the navigation-submenu plan (see Scenario 2 below).
|
||||
|
||||
## Test Scenarios
|
||||
|
||||
### Scenario 1: Shoot types (unit 1 content) → submenu → shoot routes
|
||||
- **Description**: `shootTypes` in `web/src/content/shootTypes.ts` is the single source. The desktop and mobile submenu items are built from it (`shootNavItems`, `navigation.ts`), and each item links to the route of that shoot (`/soorten-fotoshoots/<id>`). A new or renamed shoot must appear in the menu and resolve to its page.
|
||||
- **Setup**: none (uses the content as it is).
|
||||
- **Test Steps**: the test renders the app on each shoot route and on the overview, opens the desktop submenu and checks the panel items against `shootTypes`.
|
||||
- **Expected Results**: the panel has one item per shoot, in `shootTypes` order, with the shoot name as its label and the route as its target. Every target renders its page without a 404.
|
||||
- **Cleanup**: none.
|
||||
- **Test files**:
|
||||
- `web/src/navSubmenu.test.tsx`: "keeps the panel in step with the shoot types (single source)" and "desktop submenu and the router" tests.
|
||||
- `web/src/navigation.test.ts`: "heeft de vijf shoots als kinderen, in de volgorde van de shoottypes" and "heeft een menu-item voor elk shoottype en niets extra".
|
||||
- `web/src/components/NavigationBar/NavSubmenu.test.tsx` (desktop panel) and `MobileNav.test.tsx` (mobile group).
|
||||
|
||||
### Scenario 2: Exactly three `aria-current` per shoot page
|
||||
- **Description**: on a shoot page, the current page is marked in three places and nowhere else: the breadcrumb (in `main`), the desktop header submenu link, and the mobile sub-link in `#mobile-nav`. The footer has none. The parent item is marked by `data-section-current` only, not by `aria-current`.
|
||||
- **Setup**: none.
|
||||
- **Test Steps**: for each of the five shoot ids, render the page, query `[aria-current]` in `main`, the header, the footer and `#mobile-nav`, and check the value.
|
||||
- **Expected Results**: exactly one `aria-current="page"` in `main` (breadcrumb), one in the header submenu, one in `#mobile-nav`, none in the footer. In total, `document.querySelectorAll('[aria-current="page"]')` returns 3 items.
|
||||
- **Cleanup**: none.
|
||||
- **Test files**:
|
||||
- `web/src/shootPages.test.tsx`: "%s marks only the page itself as current: once in main (breadcrumb) and once in each menu (submenu link)" (`it.each` over the five shoots).
|
||||
- `web/src/shootPages.test.tsx`: "$id has a breadcrumb that ends at the page itself, and nothing else in main is current".
|
||||
- `web/src/navSubmenu.test.tsx`: "current page in the navigation (D4)" block (marks the parent and the footer on the overview, no panel link on another page, trailing slash, case variant).
|
||||
- Router rule: `web/src/components/NavigationBar/activeOptions.test.tsx` (exact matching with `includeSearch: false`).
|
||||
|
||||
### Scenario 3: Overview "Lees meer" links → shoot pages
|
||||
- **Description**: each shoot block on `/soorten-fotoshoots` has a "Lees meer over de …" link to its page, first in its row, with a unique accessible name.
|
||||
- **Setup**: none.
|
||||
- **Test Steps**: render the overview, find the link per shoot by name (`readMoreLabel(shoot)`), check its href and position in the row, and check that no shoot path is linked more than once.
|
||||
- **Expected Results**: five links, one per shoot, each to `/soorten-fotoshoots/<id>`. The overview anchors and the old links still work. No other `/soorten-fotoshoots/…` path is linked.
|
||||
- **Cleanup**: none.
|
||||
- **Test files**:
|
||||
- `web/src/shootPages.test.tsx`: "overview page" describe, tests "gives every shoot a \"Lees meer\" link to its page, first in its row, with a unique name", "keeps the anchors and the old links" and "links to each shoot page exactly once and to no other shoot path".
|
||||
- `web/src/components/shoots/ShootBlock/ShootBlock.test.tsx` and `ShootList.test.tsx`.
|
||||
|
||||
### Scenario 4: sitePages, sitemap and Lighthouse lists stay in sync
|
||||
- **Description**: the five shoot pages must be in the router, in `sitePages.ts` (registry), in the sitemap, and in the Lighthouse URL lists (`web/lighthouserc.cjs`, `indexedPaths` and `photoPagePaths`). A missing entry in one place must fail a test.
|
||||
- **Setup**: none.
|
||||
- **Test Steps**: compare the route ids, the registry keys, the sitemap output and `lighthouseConfig.indexedPaths`.
|
||||
- **Expected Results**: identical sets of the five shoot paths in all four places. `photoPagePaths` contains the five shoot paths (mobile budget 0.85).
|
||||
- **Cleanup**: none.
|
||||
- **Test files**:
|
||||
- `web/src/app.test.tsx`: "has every shoot page in the router, registry, sitemap and Lighthouse lists" (line ~594), and the `it.each(Object.keys(sitePages))` head test.
|
||||
- `web/src/sitemap.test.ts`: "contains the indexed pages" and "bevat precies de geindexeerde pagina, elk een keer (oracle)".
|
||||
- `web/src/seo.test.ts` (service ids and page graph match the route paths).
|
||||
|
||||
### Scenario 5: OG images are registered and used
|
||||
- **Description**: each shoot page has `ogImage` in `sitePages.ts` (1200 × 630, JPEG, at most 150 KB, Dutch alt text) and the page emits that image as `og:image`. No image is used twice in the registry.
|
||||
- **Setup**: none. Files: `web/public/og-newborn.jpg`, `og-zwangerschap.jpg`, `og-gezin.jpg`, `og-loveshoot.jpg`, `og-portret.jpg`.
|
||||
- **Test Steps**: for each shoot, read the registry entry, check the file (dimensions, JPEG marker and size), and render the page to check `og:image`.
|
||||
- **Expected Results**: the `og:image` of each page equals the registered path. Every file exists and passes the size and dimension checks. The five paths are unique.
|
||||
- **Cleanup**: none.
|
||||
- **Test files**:
|
||||
- `web/src/shootPages.test.tsx`: "preview images of the shoot pages" describe (`%s has a registered 1200 x 630 JPEG of at most 150 KB`, "uses no preview image twice in the registry").
|
||||
- `web/src/app.test.tsx`: "%s has its own head and structured data" (`og:image` per shoot, `ogImage!.path`).
|
||||
|
||||
### Scenario 6: FR-ST-14 404 under `/soorten-fotoshoots/`
|
||||
- **Description**: an unknown path under `/soorten-fotoshoots/` shows the 404 page with two buttons in fixed order: "Terug naar Soorten fotoshoots" (`/soorten-fotoshoots`) and "Terug naar home". Outside that section there is only one button (home). The prefix match is case-insensitive, like the router.
|
||||
- **Setup**: none.
|
||||
- **Test Steps**: render `/soorten-fotoshoots/niet-bestaande-shoot`, `/soorten-fotoshoots/onzin`, `/soorten-fotoshoots/newborn/extra`, `/bestaat-niet`, and a case variant of the prefix.
|
||||
- **Expected Results**: under the section: two links in the order above, the first to `/soorten-fotoshoots`. Elsewhere: one link, to home. Status page keeps its own title and `noindex`. The `/soorten-fotoshoots/Newborn` case renders the Newborn page with the lowercase canonical (router rule, see Scenario 2).
|
||||
- **Cleanup**: none.
|
||||
- **Test files**:
|
||||
- `web/src/components/StatusPage/StatusPage.test.tsx`: "toont onder /soorten-fotoshoots/ twee knoppen in vaste volgorde", "herkent het prefix hoofdletterongevoelig", "houdt buiten de sectie één knop", "biedt een link naar home en zet noindex".
|
||||
- `web/src/app.test.tsx`: "toont een onbekende URL als 404 binnen de shell" (`/bestaat-niet`) and "%s … /soorten-fotoshoots/onzin, /soorten-fotoshoots/newborn/extra" (`it.each`).
|
||||
- `web/src/lib/isShootSectionPath.test.ts` (property-based).
|
||||
|
||||
## Setup Integration Test Environment
|
||||
None. The tests run in jsdom with the app's router. Do not start `pnpm dev` or `pnpm preview` for these tests.
|
||||
|
||||
## Run Integration Tests
|
||||
|
||||
### 1. Execute Integration Test Suite
|
||||
```bash
|
||||
cd web
|
||||
pnpm test
|
||||
```
|
||||
Run the scenario files only, for a quick check:
|
||||
```bash
|
||||
cd web
|
||||
pnpm exec vitest run src/navSubmenu.test.tsx src/shootPages.test.tsx src/app.test.tsx src/sitemap.test.ts src/components/StatusPage/StatusPage.test.tsx
|
||||
```
|
||||
|
||||
### 2. Verify Service Interactions
|
||||
- **Test Scenarios**: 6 cross-unit scenarios above (Scenarios 1 to 6).
|
||||
- **Expected Results**: all pass in the full run at HEAD `d3bc1d7` (113 files, 888 tests, 0 failures).
|
||||
- **Real-browser check (navigation submenu)**: recorded in `construction/navigation-submenu/plans/navigation-submenu-code-generation-plan.md` (Step 17, 110/110 checks pass). It covers widths 1024, 1100 and 1280 px, the open panel, keyboard, reduced motion and mobile at 375 × 480 and 360 × 560. The unit-3 code summary still says Step 17 is pending; the plan and `audit.md` record it as passed.
|
||||
- **Logs Location**: terminal output of `pnpm test`; per-file HTML coverage in `web/coverage/`.
|
||||
|
||||
### 3. Cleanup
|
||||
None. Test runs leave only the gitignored `web/coverage/` folder.
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
# Performance Test Instructions
|
||||
|
||||
## Purpose
|
||||
Check the Lighthouse performance budgets of the site with the three units combined, and record the bundle size against the limit. This is a static site: there is no load or stress test, because there is no server-side work to load.
|
||||
|
||||
## Performance Requirements
|
||||
- **Lighthouse performance (mobile)**, budgets from `web/lighthouserc.cjs`:
|
||||
- `/` (home): 0.8 (exception, NFR-P-01, returns to 0.9 with responsive images and prerendering).
|
||||
- Photo pages (`photoPagePaths`: `/over-mij`, `/soorten-fotoshoots`, and the five shoot pages): 0.85 (exception: the photo paints after the main bundle, see Results).
|
||||
- All other indexed pages: 0.9.
|
||||
- `/privacyverklaring` and `/bestaat-niet`: no performance budget in the mobile matrix (the noindex and 404 entries check SEO and best practices only).
|
||||
- **Lighthouse performance (desktop)**: 0.9 on every URL (`web/lighthouserc.desktop.cjs` raises all entries to 0.9).
|
||||
- **Accessibility and best practices**: 1.0 on every checked URL (`quality` in `lighthouserc.cjs`).
|
||||
- **SEO**: 1.0 on indexed pages.
|
||||
- **Main bundle (NFR-ST-03)**: at most +2.5 kB gzip against unit 1.
|
||||
|
||||
## Setup Performance Test Environment
|
||||
|
||||
### 1. Prepare Test Environment
|
||||
- Build first (`pnpm build`, see `build-instructions.md`). Lighthouse runs against the built site.
|
||||
- Port 4173 must be free. The server is started by Lighthouse CI itself: `pnpm preview --port 4173 --strictPort`. `--strictPort` makes the run fail instead of moving to another port.
|
||||
- Chrome must be installed (Lighthouse CI uses it). In the CI container Chrome runs as root and needs `LIGHTHOUSE_CHROME_FLAGS` with `--no-sandbox`. Locally this is not needed.
|
||||
- No other process may use 4173 (the navigation check and a dev server use the same port).
|
||||
|
||||
### 2. Configure Test Parameters
|
||||
- **Runs**: `numberOfRuns: 1` per URL in `lighthouserc.cjs`. Shoot pages were re-measured three times in unit 2 because the scores vary by 0.01 to 0.02.
|
||||
- **Urls**: the indexed paths, the noindex path and `/bestaat-niet` from `lighthouserc.cjs` (12 URLs).
|
||||
- **Strictness**: locally `LIGHTHOUSE_PERFORMANCE` is unset, so a performance miss is an error and fails the run. In CI `LIGHTHOUSE_PERFORMANCE=warn` reports misses without failing.
|
||||
- **Reports**: `web/lighthouse-reports/mobile/` and `web/lighthouse-reports/desktop/` (HTML and JSON).
|
||||
|
||||
## Run Performance Tests
|
||||
|
||||
### 1. Execute Lighthouse (mobile and desktop)
|
||||
```bash
|
||||
cd web
|
||||
pnpm build
|
||||
pnpm lighthouse
|
||||
```
|
||||
`pnpm lighthouse` runs `lhci autorun` (mobile) and then `lhci autorun --config=lighthouserc.desktop.cjs`.
|
||||
|
||||
Full gate, which also runs lint, format, tests, build and both audits:
|
||||
```bash
|
||||
cd web
|
||||
pnpm check
|
||||
```
|
||||
Note: `pnpm check` ends with `pnpm lighthouse`. At HEAD the mobile Lighthouse assertions fail on `/` and `/soorten-fotoshoots/loveshoot` (and `/soorten-fotoshoots/gezin` on some runs), so `pnpm check` is not green. This is the open item below, not a setup error.
|
||||
|
||||
### 2. Execute the Bundle Check
|
||||
```bash
|
||||
cd web
|
||||
pnpm build
|
||||
```
|
||||
Read `dist/assets/index-*.js` from the build output: the gzip size of the main chunk is compared with unit 1 (`index-D0huvRmx.js`, 150.69 kB gzip).
|
||||
|
||||
### 3. Analyze Performance Results
|
||||
- **Desktop**: performance 0.99 to 1.00 on every page (budget 0.9). Pass.
|
||||
- **Mobile, indexed pages**: see the table below.
|
||||
- **Bundle**: main chunk `index-C65n6UdK.js` 152.56 kB gzip, +1.87 kB gzip against unit 1 (limit 2.5 kB). Pass.
|
||||
- **Results Location**: `web/lighthouse-reports/mobile/`, `web/lighthouse-reports/desktop/`.
|
||||
|
||||
## Results (measured before this stage, not re-run here)
|
||||
|
||||
Per the stage instructions, Lighthouse was not run in Build and Test. These are the measurements from two days ago on the combined units (unit 1 + unit 2 + unit 3), recorded in `audit.md` and the unit code summaries.
|
||||
|
||||
### Desktop
|
||||
| Page group | Performance | Budget | Status |
|
||||
|---|---|---|---|
|
||||
| All URLs | 0.99 to 1.00 | 0.9 | Pass |
|
||||
|
||||
### Mobile
|
||||
| Page | Performance (measured) | Budget | Master | Status |
|
||||
|---|---|---|---|---|
|
||||
| `/` (home) | pooled median 0.77 | 0.8 | 0.78 | Below budget. Same as the unit-1 baseline (0.77). Known, open. |
|
||||
| `/contact` | 0.87 | 0.9 | 0.87 | Below budget. Same as master. Known, open. |
|
||||
| `/soorten-fotoshoots/newborn` | 0.86 | 0.85 | n/a | Pass |
|
||||
| `/soorten-fotoshoots/zwangerschap` | 0.85 | 0.85 | n/a | Pass |
|
||||
| `/soorten-fotoshoots/portret` | 0.85 | 0.85 | n/a | Pass |
|
||||
| `/soorten-fotoshoots/gezin` | 0.84 to 0.85 | 0.85 | n/a | Below or at the budget (borderline). Open. |
|
||||
| `/soorten-fotoshoots/loveshoot` | 0.83 | 0.85 | n/a | Below budget. Open. |
|
||||
|
||||
Note on `/`: the unit-2 code summary lists a single run at 0.75 (unit-1 baseline 0.76). The pooled median of 0.77 is the figure recorded at the unit-3 Lighthouse step (`audit.md`, Unit 3 Step 18) and is the one used here.
|
||||
|
||||
### Diagnosis of the shoot pages (open item)
|
||||
- The first story photo is not the bottleneck: it is 153 kB on loveshoot and 117 kB on gezin and loads in about 15 to 24 ms.
|
||||
- The cause is the `Reveal` fade-in on the first story photo. The photo paints after the main bundle has run, about 2.9 s after the render starts (LCP about 3.7 to 3.8 s, FCP 2.6 s on every page). The shoot pages dropped 0.05 to 0.07 against unit 1's shell-only numbers because the first story now renders through `MediaText` and `Reveal` inside the lazy route chunk.
|
||||
- Decision (owner, 2026-10-30, `audit.md`): keep the fade-in for now. The item stays open.
|
||||
- Mitigations listed in the code summary, none applied: remove the fade-in on the first story; cap the first photo's column to reduce its pixels (the earlier notes say fewer image bytes do not move the score); prerendering or a smaller main bundle (the same route as `/` and the photo pages, NFR-P-01).
|
||||
|
||||
### Bundle
|
||||
- Main chunk: 536.65 kB raw, 152.56 kB gzip (unit 1: 150.69 kB gzip). +1.87 kB gzip, under the 2.5 kB limit. Pass.
|
||||
|
||||
## Performance Optimization
|
||||
|
||||
If a budget fails:
|
||||
1. Open the HTML report for the URL in `web/lighthouse-reports/mobile/`.
|
||||
2. Check the LCP element and the render delay. For the shoot pages it is the first story photo.
|
||||
3. Make one change, rebuild (`pnpm build`), and re-run that URL three times, because single runs vary by 0.01 to 0.02.
|
||||
4. Do not lower a budget in `lighthouserc.cjs` to make a run pass. Record the miss as an open item instead.
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
# Security Test Instructions
|
||||
|
||||
## Purpose
|
||||
Check the dependencies, the HTTP security headers and the code-level risks of the shoot pages, navigation and SEO data for this feature. The Security Baseline extension is enabled for this project (`aidlc-state.md`, Extension Configuration: Security Baseline = Yes, decided at Requirements Analysis). The per-rule compliance tables are in the code summaries (`construction/*/code/code-summary.md`).
|
||||
|
||||
## Security Test Scope
|
||||
- **Dependency audit (production)**: `pnpm audit:deps`.
|
||||
- **Dependency audit (development tools)**: `pnpm audit:dev` (non-blocking by design, NFR-SEC-05).
|
||||
- **HTTP security headers and CSP**: unit tests in `web/config/securityHeaders.test.ts` and `web/config/serverConfig.test.ts`. The headers file (`web/config/securityHeaders.ts`) is unchanged by this feature.
|
||||
- **Raw HTML injection**: grep for `dangerouslySetInnerHTML`.
|
||||
- **Input handling**: route parameters and the `?pakket=` query are checked against known values (unit tests, see below).
|
||||
- **Lockfile**: `pnpm install --frozen-lockfile` (no change to `package.json` or `pnpm-lock.yaml` by this feature).
|
||||
|
||||
## Run Security Tests
|
||||
|
||||
### 1. Dependency Audits
|
||||
```bash
|
||||
cd web
|
||||
pnpm audit:deps
|
||||
pnpm audit:dev
|
||||
```
|
||||
|
||||
- **`pnpm audit:deps`** (`pnpm audit --prod --audit-level high`): verified at HEAD: `No known vulnerabilities found`, exit 0. Pass. The earlier `seroval` advisories from unit 1 are gone (the lockfile resolves `seroval@1.7.3`, patched).
|
||||
- **`pnpm audit:dev`** (`pnpm audit || echo ...`): verified at HEAD: `22 vulnerabilities found`, `Severity: 2 low | 9 moderate | 11 high`. The script exits 0 by design because of the `|| echo` (NFR-SEC-05: development tools do not block). These findings are in devDependencies only (paths under `@testing-library/jest-dom>vitest`, `@vitest/coverage-v8>vitest`, `@lhci/cli`, and the Vite dev server). None is in the production bundle. Status: accepted for this stage; see the open items.
|
||||
- Vite (`GHSA-9jrq-w75r-8gcw`, low): vulnerable `>=8.3.0 <=8.3.2`, patched `>=8.3.3`. Dev server only.
|
||||
- `tmp` via `@lhci/cli` (`GHSA-52f5-9888-hmc6`): build-time tool, not shipped.
|
||||
- **Result**: production audit pass; development audit reports 22 advisories (non-blocking, as on master).
|
||||
|
||||
### 2. Security Headers and CSP Tests
|
||||
```bash
|
||||
cd web
|
||||
pnpm exec vitest run config/securityHeaders.test.ts config/serverConfig.test.ts
|
||||
```
|
||||
- **Expected**: both files pass (they are included in the 888 passing tests of `pnpm test`).
|
||||
- **What they check**: the security headers that `config/securityHeaders.ts` defines and the server config that applies them. The shoot pages add no inline script and no new external resource, so no CSP change was needed. JSON-LD is the only script-like content, and it goes through `StructuredData` (see below).
|
||||
- **Lighthouse**: best practices 1.0 on every URL (the real headers of the built site are checked through Lighthouse, see `performance-test-instructions.md`).
|
||||
|
||||
### 3. Raw HTML Injection Check
|
||||
From `web/`:
|
||||
```bash
|
||||
cd web
|
||||
grep -rn "dangerouslySetInnerHTML" src config public index.html
|
||||
```
|
||||
- **Expected**: one code use, the JSON-LD script of `StructuredData`.
|
||||
- **Verified at HEAD**:
|
||||
- `src/components/StructuredData/StructuredData.tsx:8` (comment: the only place the shoot pages use `dangerouslySetInnerHTML`, and only with the escaped JSON-LD of `jsonLdScript`).
|
||||
- `src/components/StructuredData/StructuredData.tsx:15` (`dangerouslySetInnerHTML={{ __html: jsonLdScript(data) }}`).
|
||||
- No match in `config`, `public` or `index.html`.
|
||||
- **Result**: pass. Any new use outside `StructuredData` is a finding and must be reviewed.
|
||||
- **Note**: `rg` was not on PATH in the verification shell; `grep -rn` was used. The same result with `rg -n` if it is installed.
|
||||
|
||||
### 4. Input Validation (unit tests)
|
||||
- Shoot ids and slugs accept only known values: `shootIdFromSlug` and `shootIdFromPath` (`web/src/lib/shootPages.ts`). Hostile slugs (`onzin`, `%3Cscript%3E`, `newborn/extra`) give the 404, tested in `web/src/app.test.tsx` (`it.each(['onzin', 'loveshoot', '%3Cscript%3E'])`) and `web/src/app.test.tsx` (`/soorten-fotoshoots/onzin`, `/soorten-fotoshoots/newborn/extra`).
|
||||
- The `?pakket=` value comes only from `shootPackage` (`web/src/lib/shootPackage.ts`), so an unknown value is ignored.
|
||||
- Heading ids are built with `headingId` (`web/src/lib/headingId.ts`) from known prefixes; hostile strings are covered by property-based tests (`headingId.test.ts`).
|
||||
- The pathname used by the navigation is only compared (`navCurrent`), never rendered; the comparison is property-tested with hostile strings.
|
||||
|
||||
### 5. Security Baseline Extension
|
||||
- **Status**: enabled (`aidlc-docs/features/shoot-type-pages/aidlc-state.md`, Extension Configuration table: Security Baseline = Yes, Requirements Analysis).
|
||||
- **Compliance** (from the code summaries, final tables): SECURITY-04 (headers), -05 (input validation), -09 (hardening: no debug output, no placeholders), -10 (supply chain: frozen lockfile, unchanged `package.json`), -11 (secure design), -13 (no external asset), -15 (fail-safe). The backend and infrastructure rules are N/A (front-end only).
|
||||
- **Open**: none under the Security Baseline. The dev-tool advisories above are accepted under NFR-SEC-05.
|
||||
|
||||
## Analyze Security Test Results
|
||||
- **Dependencies (prod)**: 0 known vulnerabilities. Pass.
|
||||
- **Dependencies (dev)**: 22 advisories (2 low, 9 moderate, 11 high), non-blocking, unchanged from master.
|
||||
- **Headers and CSP**: unit tests pass; no change to the headers file.
|
||||
- **Raw HTML**: one use, in `StructuredData`. Pass.
|
||||
- **Input handling**: unit tests pass.
|
||||
|
||||
## Remediation
|
||||
- For a production advisory: update the package, rerun `pnpm install --frozen-lockfile`, rerun `pnpm audit:deps`. Do not edit the lockfile by hand.
|
||||
- For a new `dangerouslySetInnerHTML`: move the content to a typed React element, or pass it through `jsonLdScript` in `StructuredData`.
|
||||
- Development-tool advisories: track them, update when a patched version is available in the same major version.
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
# Unit Test Execution
|
||||
|
||||
Runs the full suite of all three units together (unit 1 content and SEO, unit 2 shoot page UI, unit 3 navigation submenu). Verified at HEAD `d3bc1d7`.
|
||||
|
||||
## Run Unit Tests
|
||||
|
||||
### 1. Execute All Unit Tests
|
||||
```bash
|
||||
cd web
|
||||
pnpm test
|
||||
```
|
||||
`pnpm test` is `vitest run --coverage` (Vitest 5.0.5, jsdom, Testing Library, axe-core, fast-check 4). Watch mode for development: `pnpm test:watch`.
|
||||
|
||||
### 2. Review Test Results
|
||||
- **Expected**: 113 test files, 888 tests, 0 failures. Verified at HEAD: `Test Files 113 passed (113)`, `Tests 888 passed (888)`, exit 0. Duration about 65 s.
|
||||
- **fast-check seed** (printed on the second line of output, from `web/config/testSeed.ts`): verified run `fast-check seed: 1594855861 (opnieuw: FC_SEED=1594855861 pnpm test)`.
|
||||
- **Test Coverage** (v8, verified at HEAD):
|
||||
|
||||
| Metric | Result |
|
||||
|---|---|
|
||||
| Statements | 96.5% (1161/1203) |
|
||||
| Branches | 93.94% (854/909) |
|
||||
| Functions | 95.61% (436/456) |
|
||||
| Lines | 96.81% (1033/1067) |
|
||||
|
||||
Coverage thresholds (`web/vite.config.ts`): 100% for `src/lib/**`, `src/seo.ts` and `src/sitemap.ts`. The run passed these thresholds (no threshold error in the output).
|
||||
- **Test Report Location**: `web/coverage/` (gitignored). Open `web/coverage/index.html` for the per-file report; `web/coverage/coverage-final.json` and `clover.xml` for tools.
|
||||
|
||||
### 3. Property-Based Tests (fast-check) and Seed Replay
|
||||
The PBT tests (for example `shootPageBands`, `storyLayout`, `mosaicLayout`, `headingId`, `isShootSectionPath`, `navCurrent`, `navMenuState` with a model-based stateful run, `shootNavItems`) use a seed that is printed on every run. If a property fails, replay the same run with that seed:
|
||||
|
||||
```bash
|
||||
cd web
|
||||
FC_SEED=1594855861 pnpm test
|
||||
```
|
||||
|
||||
PowerShell equivalent: `$env:FC_SEED=1594855861; pnpm test`. Use the seed from the failing run, not the one above. Shrinking is on, so the failure output includes the minimal counterexample.
|
||||
|
||||
### 4. Accessibility Tests (axe)
|
||||
- axe-core runs in the component tests for the new components and on the five shoot pages (`src/shootPages.test.tsx`, test "%s has a clean heading outline and the sections its data says" and the axe checks in the same file). The navigation submenu and mobile menu have axe checks in both the open and closed state (`src/components/NavigationBar/NavigationBar.test.tsx`, `MobileNav.test.tsx`).
|
||||
- There is no separate axe command. A failing axe check fails `pnpm test`.
|
||||
- The Lighthouse accessibility score (1.0 on the indexed pages) is a separate check, see `performance-test-instructions.md`.
|
||||
|
||||
### 5. Fix Failing Tests
|
||||
If tests fail:
|
||||
1. Review test output in the terminal, or re-run one file: `pnpm exec vitest run src/shootPages.test.tsx`.
|
||||
2. For a PBT failure, replay with `FC_SEED=<seed from the output>`.
|
||||
3. Fix code issues. Do not edit tests to make them pass unless the test is wrong, and say so in the change.
|
||||
4. Rerun `pnpm test` until all pass.
|
||||
|
||||
## Known Notes
|
||||
- The jsdom messages `Not implemented: HTMLCanvasElement's getContext()` and `Not implemented: navigation to another Document` are expected and do not fail tests.
|
||||
- Vitest suggests a faster pool for jsdom (`pool: 'vmThreads'`). This is a speed note only.
|
||||
+11
-11
@@ -4,8 +4,8 @@ Plan: [navigation-submenu-code-generation-plan.md](../../plans/navigation-submen
|
||||
|
||||
## Status
|
||||
- Steps 1–16 and 19–20 done (checked in the plan).
|
||||
- Step 17 (real-browser check: 1024 px fit, transparent header, short phone): **pending — run by orchestrator after unit 2's build**.
|
||||
- Step 18 (Lighthouse, needs the port 4173 claim): **pending — run by orchestrator after unit 2's build**.
|
||||
- Step 17 (real-browser check: 1024 px fit, transparent header, short phone): **passed** (110/110 checks, 2026-10-30).
|
||||
- Step 18 (Lighthouse, needs the port 4173 claim): **passed** (mobile `/` pooled median 0.77 = unit-1 baseline 0.77).
|
||||
- Gates (Step 15): lint, format:check and `tsc` green. `pnpm test`: 106 files, 801 tests passing, fast-check seed 1525740974. The coverage failure reported at that moment came from a file written mid-run by another task. `lib/isShootSectionPath.ts` has 100 % coverage when run on its own, and a full re-run happens at the joint verification.
|
||||
|
||||
## Commits
|
||||
@@ -54,8 +54,8 @@ None. The unit is uncommitted in the worktree. A commit (and a push) is made onl
|
||||
| Requirement / rule | Where | Tests |
|
||||
|---|---|---|
|
||||
| FR-ST-10 Navigation submenu | `navigation.ts`, `shootNavItems.ts`, `NavigationBar/*`, `Footer.tsx`, `navMenuState.ts` | `navigation.test.ts`, `shootNavItems.test.ts`, `navMenuState.test.ts`, `NavigationBar.test.tsx`, `NavSubmenu.test.tsx`, `MobileNav.test.tsx`, `navSubmenu.test.tsx`, `Footer.test.tsx` |
|
||||
| NFR-ST-01 Accessibility (disclosure pattern, keyboard, focus, 44 px, reduced motion, axe) | `NavSubmenu`, `MobileNavGroup`, `MobileNav`, `NavLink`, `ChevronIcon`, `useDismiss` | `NavigationBar.test.tsx` and `MobileNav.test.tsx` (axe open and closed, focus, Escape, keyboard), `useDismiss.test.tsx`, `NavLink.test.tsx`; the visual part is Step 17 (pending) |
|
||||
| NFR-ST-03 Performance (D5 gate) | `navigation.ts` imports `shootTypes` | Step 16 bundle check; Steps 17–18 pending |
|
||||
| NFR-ST-01 Accessibility (disclosure pattern, keyboard, focus, 44 px, reduced motion, axe) | `NavSubmenu`, `MobileNavGroup`, `MobileNav`, `NavLink`, `ChevronIcon`, `useDismiss` | `NavigationBar.test.tsx` and `MobileNav.test.tsx` (axe open and closed, focus, Escape, keyboard), `useDismiss.test.tsx`, `NavLink.test.tsx`; the visual part is Step 17 (passed) |
|
||||
| NFR-ST-03 Performance (D5 gate) | `navigation.ts` imports `shootTypes` | Step 16 bundle check; Steps 17–18 passed |
|
||||
| NFR-ST-06 Testing (PBT + example + registry consistency) | `test/navArbitraries.ts`, `test/navViewport.ts` | PBT in `shootNavItems`, `navCurrent`, `navMenuState` (model-based stateful run); registry "a nav child per shoot" in `navigation.test.ts`; example tests as listed |
|
||||
| D4 current state | `navCurrent.ts`, `NavLink` (`sectionCurrent`), exact `activeOptions` in every nav and footer link | `activeOptions.test.tsx` (12 tests), `navCurrent.test.ts` (20), `navSubmenu.test.tsx` (18), `Footer.test.tsx` |
|
||||
| D5 nav source | `navigation.ts` → `shootNavItems(shootTypes)` (single source) | `navigation.test.ts`, `navSubmenu.test.tsx` (every panel name matches `shootTypes`) |
|
||||
@@ -63,8 +63,8 @@ None. The unit is uncommitted in the worktree. A commit (and a push) is made onl
|
||||
| BR-NAV-10..12 content | `shootNavItems.ts`, `navigation.ts` | `shootNavItems.test.ts`, `navigation.test.ts` |
|
||||
| BR-NAV-20..29 desktop submenu (click, Escape, outside, Tab out, no hover, no arrow keys, closed panel not reachable) | `NavSubmenu.tsx`, `useDismiss.ts`, `navMenuState.ts` | `NavSubmenu.test.tsx` (13), `NavigationBar.test.tsx` (27), `useDismiss.test.tsx` (9), `navMenuState.test.ts` (27) |
|
||||
| BR-NAV-30..36 mobile menu (group state, collapse, close on choice, Escape to hamburger, scroll, scroll lock) | `MobileNav.tsx`, `MobileNavGroup.tsx`, `navMenuState.ts` | `MobileNav.test.tsx` (18), `navSubmenu.test.tsx` (back navigation, group expanded on a shoot page) |
|
||||
| BR-NAV-40..43 layout, touch targets, motion, focus ring | `NavSubmenu`, `MobileNavGroup`, `MobileNav` (`_motionReduce`) | `NavigationBar.test.tsx` and `MobileNav.test.tsx` (reduced-motion rules via `cssRulesFor`); the browser measurements are Step 17 (pending) |
|
||||
| BR-NAV-50 bundle and Lighthouse | Step 16, Step 18 | Step 16 done; Step 18 pending |
|
||||
| BR-NAV-40..43 layout, touch targets, motion, focus ring | `NavSubmenu`, `MobileNavGroup`, `MobileNav` (`_motionReduce`) | `NavigationBar.test.tsx` and `MobileNav.test.tsx` (reduced-motion rules via `cssRulesFor`); the browser measurements are Step 17 (passed) |
|
||||
| BR-NAV-50 bundle and Lighthouse | Step 16, Step 18 | Steps 16 and 18 done |
|
||||
|
||||
## Test results
|
||||
- Step 15 gate: lint, format:check, tsc green; `pnpm test` 106 files, 801 tests, seed 1525740974 (see Status for the coverage remark).
|
||||
@@ -94,11 +94,11 @@ Consequence for the case variant: on `/soorten-fotoshoots/Newborn` the page rend
|
||||
- The Newborn-only string ("Uit eerdere newbornshoots") is only in `newborn-*.js`; the five shoot page chunks are still separate files.
|
||||
- The separate `shootTypes` chunk is gone (now in the main chunk); `dist/assets` has 119 files (121 at baseline).
|
||||
|
||||
## Browser check (Step 17) — pending
|
||||
Pending — run by orchestrator after unit 2's build. The checklist is in the plan: widths at 1024, 1100 and 1280 px (no wrapping, no overlap, real widths against the FD estimate of about 715 px of 848 px), open panel (visibility, bounding box, solid background, white chevron on the transparent header), keyboard run, reduced motion, mobile at 375 × 480 and 360 × 560. The `mx` fallback on `NavLink` is not applied unless the 1024 px check needs it (record it then).
|
||||
## Browser check (Step 17) — passed
|
||||
110/110 checks with `puppeteer-core` from a scratchpad script outside the repo, on the combined build of units 2 and 3. Desktop at 1024, 1100 and 1280 px on `/`, `/portfolio` and a shoot page: the five items fit on one row (711 px, at 1024 px from 180 to 890 of 848 px client width), no overlap with the logo. The panel opens visible inside the viewport with a solid background; the chevron is white on the transparent header. Keyboard: Enter, Tab, Escape and Tab-out all work. Reduced motion gives 0 s transitions. On mobile (375 × 480 and 360 × 560) the expanded group scrolls to Contact. The `mx` fallback was not needed.
|
||||
|
||||
## Lighthouse (Step 18) — pending
|
||||
Pending — run by orchestrator after unit 2's build (needs the port 4173 claim). Plan: median mobile performance of `/` after the unit, against the same-session baseline of the unit-1 build; unit-1 measurement was 0.76 on `/` (budget 0.8). Full set and failing budgets to be recorded then.
|
||||
## Lighthouse (Step 18) — passed
|
||||
Mobile `/`, two batches of three runs per build, alternated in one session. The current build has a pooled median of 0.77 (batch medians 0.78 and 0.76); the unit-1 baseline has 0.77. That is no regression beyond the 0.02 limit. Both builds are below the absolute 0.8 budget, as master is (0.78). Accessibility, best practices and SEO are 1.0.
|
||||
|
||||
## Deviations from the design
|
||||
- **Exact matching:** `{ exact: true, includeSearch: false }` instead of `{ exact: true }` (router truth table above).
|
||||
@@ -112,7 +112,7 @@ Pending — run by orchestrator after unit 2's build (needs the port 4173 claim)
|
||||
1. **No focus trap in the mobile menu** (BR-NAV-35): not added in this unit; the menu is a full-screen overlay with Escape and the hamburger return.
|
||||
2. **Desktop `NavLink` box height:** the existing desktop `NavLink` boxes are about 35 px high. Outside this unit (existing styling of the header).
|
||||
3. **Case-insensitive route vs exact `aria-current`:** see the consequence above; the router matches case-insensitively but `aria-current` is exact, so `/soorten-fotoshoots/Newborn` shows the page with no `aria-current` on the links. Decision for the orchestrator together with the unit-1 open decision on `caseSensitive`.
|
||||
4. Steps 17 and 18 (browser check, Lighthouse) are pending, see above.
|
||||
4. Steps 17 and 18 (browser check, Lighthouse) passed, see above.
|
||||
|
||||
## Security and PBT compliance (final)
|
||||
| Rule | Status | Evidence |
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
# Shoot-type pages: content still pending
|
||||
|
||||
Date: 2026-10-31
|
||||
Branch: `feature/shoot-type-pages` (commits `e5f4348`, `7af2069`, `d3bc1d7`). **Do not merge to master until everything below is done.**
|
||||
|
||||
## 1. Status and blocker
|
||||
|
||||
| Item | State |
|
||||
|---|---|
|
||||
| Code for all three units (content/SEO foundation, shoot page UI, navigation submenu, FR-ST-14) | Done and committed. The test deploy was green (CI run 586) |
|
||||
| OG images (5 x 1200x630) | Done, approved by the owner on 2026-10-30 |
|
||||
| All draft texts (98 `DRAFT(CON-ST-03)` markers) | **Waiting**: Andrea has to approve or change them |
|
||||
| Answers to the open questions (7 `OPEN(CON-ST-04)` markers) | **Waiting**: Andrea |
|
||||
| Extra photos (25 in total) | **Waiting**: Andrea. The pages work without them, but look emptier |
|
||||
|
||||
Blocker: Andrea has not returned approved texts, answers or photos ("they come later, they are not ready yet"). She delivers via Bryan (the owner). Nothing in the code blocks the merge; only content does (CON-ST-03 in `requirements.md`; NFR-ST-05 SECURITY-09: no draft markers in production).
|
||||
|
||||
## 2. Where things are
|
||||
|
||||
Paths are relative to `aidlc-docs/features/shoot-type-pages/` unless they start with `web/`.
|
||||
|
||||
| What | Where |
|
||||
|---|---|
|
||||
| Review doc sent to Andrea (Dutch). The .docx in an earlier session's scratchpad is temporary; this is the durable copy | `construction/content-review/andrea-review.md`: ch. 2 questions (1-7 plus two optional), ch. 3 shared texts, ch. 4 texts per shoot, ch. 5 photos. The last column "Ref." gives the `file:line` of each text |
|
||||
| Draft list (98 lines) | `construction/content-and-seo-foundation/code/draft-list.txt` |
|
||||
| Open list (7 lines) | `construction/content-and-seo-foundation/code/open-list.txt` |
|
||||
| Content sources | `web/src/content/shootPages/{newborn,zwangerschap,gezin,loveshoot,portret}.ts`, `web/src/content/shootPageShared.ts` (texts on all pages), `web/src/sitePages.ts` (page titles and descriptions), `web/src/content/shootTypes.ts` (Gezin overview text) |
|
||||
| Rules | `inception/requirements/requirements.md` (CON-ST-01..05, FR-ST-05, FR-ST-14); D3 and D6 in `inception/application-design/application-design.md` |
|
||||
| Code summaries | `construction/*/code/code-summary.md` (three units) |
|
||||
|
||||
The `file:line` numbers in the two lists and the review doc date from commit time. Regenerate the lists after edits (run from `web/`):
|
||||
|
||||
```bash
|
||||
rg -n "DRAFT\(CON-ST-03\)" src
|
||||
rg -n "OPEN\(CON-ST-04\)" src
|
||||
```
|
||||
|
||||
A text can carry both markers (the DRAFT line with the OPEN line directly below it).
|
||||
|
||||
## 3. Texts, step by step
|
||||
|
||||
### 3.1 Apply an approved or changed text
|
||||
|
||||
1. Find the text via the "Ref." column in `andrea-review.md` or via the `rg` command above.
|
||||
2. Andrea marked "Akkoord": keep the string and delete the `// DRAFT(CON-ST-03): awaiting Andrea's approval` line directly above it.
|
||||
3. Andrea marked "Aanpassen": replace the string with her wording exactly as she wrote it, then delete the DRAFT line.
|
||||
4. One marker covers one field or one object (for example a whole story block with `eyebrow`, `title` and `paragraphs`). Check that every field below the marker is approved before removing it.
|
||||
5. Keep placeholders: `{aanbetaling}`, `{opleverduur}`, `{locatie}`, `{duur}`. Never type 50 or "2-3 weken" into a text.
|
||||
6. Texts in `shootPageShared.ts` appear on all five pages (breadcrumb, steps, FAQ "Wanneer krijg ik de foto's?" and "Hoe leg ik de datum vast?", button labels, "Prijs op aanvraag"). A change there changes every shoot; tell Andrea.
|
||||
7. Other places with DRAFT markers: `shootTypes.ts` (the Gezin overview text, 1 marker) and `sitePages.ts` (titles and descriptions, 10 markers).
|
||||
8. Run `pnpm test` from `web/`. `src/content/shootPages/shootPages.test.ts` checks, among others: unknown placeholders, bracket placeholders, e-mail addresses, cancellation text, 3 to 5 FAQ items, duration versus package (D6), photo alt text and size.
|
||||
|
||||
### 3.2 Resolve the open questions (`OPEN(CON-ST-04)`)
|
||||
|
||||
Question numbers are those of `andrea-review.md` chapter 2. Remove an OPEN line once its answer is processed.
|
||||
|
||||
| Marker (file:line at commit time) | Question | What changes, depending on the answer |
|
||||
|---|---|---|
|
||||
| `loveshoot.ts:80` | Q1: duration of a loveshoot | Duration given: set `process.duration` to her wording, e.g. "N uur fotografie, ...", and fix any other text that mentions the duration. Loveshoot has no package, so the D6 test (`names the duration of its package`) does not apply; if a package is added later, its feature "N uur fotografie" must be the start of `process.duration`. No answer: keep "We stemmen de duur samen af." (only if Andrea accepts that text) |
|
||||
| `portret.ts:82` | Q2: duration of a portrait shoot (possibly different for natuur and zakelijk) | As Q1, in `portret.ts` `process.duration`. For two durations use one sentence with both; do not invent one |
|
||||
| `portret.ts:54` (story `locatie`) and `portret.ts:79` (`process.location`) | Q3: locations for portrait shoots (natuur / zakelijk) | Add only the places she names, to the story paragraph and to `process.location`, and keep the two consistent. No answer: the generic "We kiezen samen een plek ..." stays |
|
||||
| `shootPageShared.ts:18` (`bookingFaq`) and `shootPageShared.ts:90` (`deposit.note`) | Q4: does the EUR 50 deposit also apply to Loveshoot and Portret? Q5: when exactly is the remainder paid (right after the shoot, or before delivery)? | Q4 yes: nothing changes, remove the OPEN lines. Q4 no: these texts are shared by all shoots, so they need a per-shoot variant (type change in `web/src/content/types.ts`, `web/src/lib/shootPageView.ts`, tests and fast-check generators); ask Bryan first. Q5: reword "het restbedrag betaal je na de shoot" with her wording in both places and keep them identical |
|
||||
| `shootPageShared.ts:81` (step `oplevering`) | Q6: do Loveshoot and Portret also get a personal online gallery? | Yes: remove the OPEN line. No: the step text is shared, so add a per-shoot override or reword it so it is true for all five; ask Bryan first (type-level change as above) |
|
||||
|
||||
Not in the open list: Q7 (Newborn block 4 title "1 tot 2 uur, op het ritme van je baby", `newborn.ts:91`) and the optional Q8/Q9 (photo counts for Loveshoot and Portret) have no `OPEN` marker. Treat Q7 as an ordinary text: keep or reword the title, and keep it consistent with `newborn.ts:112` and the package feature "1-2 uur fotografie". Q8/Q9: use only a number she actually gives (CON-ST-04: do not invent numbers) and discuss with Bryan where it would go.
|
||||
|
||||
### 3.3 Newborn birth-date exception (CON-ST-01)
|
||||
|
||||
Newborn keeps its sentence about a provisional date that moves with the birth ("We zetten een voorlopige datum rond je uitgerekende datum en schuiven mee als jullie baby eerder of later komt": FAQ 1 at `newborn.ts:147`; the closing text at `newborn.ts:189` also mentions the due date). It is a Newborn-only planning fact, decided by the owner on 2026-10-29. Do not copy it to other shoots and do not remove it as "cleanup". Other shoots say nothing about cancelling or rescheduling (Clarification 2 = B); a test enforces that.
|
||||
|
||||
### 3.4 Fact rules (CON-ST-01, CON-ST-04)
|
||||
|
||||
- No invented facts, prices, durations, photo counts, locations or equipment (the design's "ik neem dekens en doeken mee" and "korte checklist" were left out for this reason).
|
||||
- Fixed facts: deposit EUR 50 (settled against the total, remainder after the shoot), delivery 2-3 weken, reply within 1-2 werkdagen, six steps, prices from `web/src/content/packages.ts` (Newborn 185, Zwangerschap 175, Gezin 175; Loveshoot and Portret "Prijs op aanvraag").
|
||||
- One source per fact (NFR-ST-04): use the placeholders and `packages.ts`, never retype a figure.
|
||||
- Andrea's own wording wins over the draft.
|
||||
|
||||
## 4. Photos, step by step
|
||||
|
||||
### 4.1 What is needed
|
||||
|
||||
Slot shapes (`andrea-review.md` ch. 5): blocks 1, 3 and 4 portrait 4:5; block 2 landscape 3:2; mosaic of up to 4 tiles (1 large portrait, 1 wide landscape, 2 small near-square, cropped to fill); package block square 1:1. A photo may appear **once per page** (D14: the view drops duplicates and a test fails on them).
|
||||
|
||||
| Shoot | Extra photos | Which |
|
||||
|---|---|---|
|
||||
| Newborn | 1 | portrait or landscape, small mosaic tile (the mosaic shows 3 now) |
|
||||
| Zwangerschap | 5 | 1 portrait (block 4 story); mosaic: 1 portrait, 1 landscape, 2 free |
|
||||
| Gezin | 5 | same as Zwangerschap. The current Gezin photos (`assets/shoots/gezin*`) show families with a newborn |
|
||||
| Loveshoot | 7 | 1 landscape (block 2), 2 portrait (blocks 3 and 4); mosaic: 1 portrait, 1 landscape, 2 free |
|
||||
| Portret | 7 | same as Loveshoot |
|
||||
| **Total** | **25** | |
|
||||
|
||||
### 4.2 Mosaic rule
|
||||
|
||||
The mosaic (FR-ST-05) is rendered only when at least `MOSAIC_MIN_PHOTOS = 2` (`web/src/lib/shootPageView.ts`) photos are left that the page does not use elsewhere. Zwangerschap and Gezin hide it now because their two mosaic photos are already in blocks 2 and 3, so **they get a mosaic as soon as 2 new photos are in `photos.images`**. Loveshoot and Portret list only their main and detail photo (both used by the story and the package), so they too need 2 photos beyond those. Maximum 4 tiles (`MOSAIC_MAX_PHOTOS`).
|
||||
|
||||
### 4.3 Where files go and how they are imported
|
||||
|
||||
1. Put the files in `web/src/assets/`: shoot photos in `assets/shoots/` (`<shoot>.jpg`, `<shoot>-detail.jpg`), portfolio photos in `assets/portfolio/` (`f41aNNNN.jpg`).
|
||||
2. Import them at the top of the page file, like the current ones: `import f41a7883 from '../../assets/portfolio/f41a7883.jpg';`. Vite hashes and bundles them; there is no image pipeline or image library in `web/`.
|
||||
3. Add a `ContentImage` `{ src, alt, width, height }` with the real pixel size in `web/src/content/shootPages/<shoot>.ts`: as `image:` of a story block for blocks 1-4, or appended to `photos.images` for the mosaic. The order in `photos.images` is the tile order (large portrait, wide landscape, two small; see `web/src/lib/mosaicLayout.ts`). Adding photos is a data-only change (FR-ST-11): no component changes.
|
||||
4. The package-block photo is the shoot's `detailImage` in `web/src/content/shootTypes.ts` (square). Today 480x480; the review doc asks for at least 960x960 for sharpness.
|
||||
5. Sizes: existing photos are 800 px wide (portrait 800x1200, landscape 800x534). `-groot` variants (1067x1600 / 1600x1067) are used **only by the portfolio Lightbox** (`web/src/content/portfolioContent.ts`); the shoot pages never import them. Only create a `-groot` file when the photo is also added to the portfolio, which is a separate change. Keep the files light: mobile Lighthouse on these pages is already at the budget (section 5).
|
||||
6. If a file is already in the portfolio or the shoot list, reuse its exact `alt`, `width` and `height` (test `reuses the description and size a photo has elsewhere`).
|
||||
|
||||
### 4.4 Alt text rules
|
||||
|
||||
Dutch; describe what is in the photo (who, what, setting), not the shoot or keywords; identical wherever the same file appears; never empty (tests check this). The alt of a new photo is a text we write, so mark it with the DRAFT line and have Andrea approve it together with the photo (CON-ST-02).
|
||||
|
||||
### 4.5 OG images
|
||||
|
||||
The five `web/public/og-<shoot>.jpg` files (1200x630) were approved by the owner on 2026-10-30. New photos do not change them. **Changing any OG image needs the owner's approval.** Loveshoot and Portret are upscaled about 1.42x from the shoot photo because no landscape photo existed, so better sources may be wanted later. Method: take the largest source, crop to 1200:630 with a vertical offset chosen by eye (faces and hands inside the crop), scale with .NET `System.Drawing` (`HighQualityBicubic`) onto a fresh bitmap (this strips EXIF and ICC; sRGB), encode as JPEG, file at most 100 KB. The earlier script was a temporary scratchpad script and is gone. Show the result to the owner before committing, and check the `ogImage` alt in `web/src/sitePages.ts` still matches the photo.
|
||||
|
||||
## 5. Definition of done before merge
|
||||
|
||||
- [ ] `rg -n "DRAFT\(CON-ST-03\)" web/src` returns nothing (from the repo root; from `web/` use `src`).
|
||||
- [ ] `rg -n "OPEN\(CON-ST-04\)" web/src` returns nothing.
|
||||
- [ ] Andrea's approval is logged in `audit.md` (what, when, via Bryan).
|
||||
- [ ] The branch is up to date with master. On 2026-10-31 it already contained master `1416497`, including the seroval patch from PR #12, so `audit:deps` passes. Merge master again if it has moved since.
|
||||
- [ ] `pnpm check` from `web/` is green (lint, format, `tsc`, tests with 100 % coverage on `src/lib/**`, build, audits, Lighthouse).
|
||||
- [ ] Known Lighthouse items, judged in context:
|
||||
- mobile `/` (0.75, budget 0.8) and `/contact` (0.87, budget 0.9) are below budget on master as well, so not caused by this feature;
|
||||
- mobile gezin (0.84-0.85) and loveshoot (0.83) are below the 0.85 budget because the owner keeps the `Reveal` fade-in on the first story (decision 2026-10-30), which delays the first photo. Real photos may shift these numbers, so re-measure after adding photos. If still below, the options in the unit 2 code summary are: no fade-in on the first story, cap the first photo's column, or accept the limit. That is the owner's decision.
|
||||
- [ ] `LAYOUT.md` (section "Shoot page", block "Photos") is updated if the mosaic now appears on more shoots than it describes; follow `.ai/layout-conventions.md`.
|
||||
- [ ] Test deploy checked: push, Gitea CI `deploy-test`, then look at the five pages on desktop and phone, the submenu, and `/soorten-fotoshoots/niet-bestaande-shoot` (404 with two buttons, FR-ST-14).
|
||||
- [ ] PR to master on Gitea per the usual flow (source `~/.ssh/agent.env` before pushing; CI on the PR; merge when green). Commit and push only when the owner asks.
|
||||
|
||||
## 6. How to pick it up
|
||||
|
||||
- Worktree: `../AndreaSlopFotografie-shoot-type-pages` (`K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-shoot-type-pages`), branch `feature/shoot-type-pages`. Work in the worktree, not in the main checkout.
|
||||
- AI-DLC state is in `aidlc-state.md` (Construction, Build and Test). `audit.md` is append-only: add new entries at the end, never edit old ones. Overview row: `aidlc-docs/active-features.md` ("Waiting for content").
|
||||
- Content edits after approval are a small follow-up within this feature: no new stages and no new feature folder. Log each batch (what changed, who approved, date) in `audit.md`; update `aidlc-state.md` when the feature completes.
|
||||
- Order: (1) get Andrea's review back via Bryan; (2) texts and answers (section 3); (3) photos (section 4); (4) checks (section 5); (5) PR.
|
||||
Reference in New Issue
Block a user