diff --git a/aidlc-docs/active-features.md b/aidlc-docs/active-features.md index ba5df61..373a58f 100644 --- a/aidlc-docs/active-features.md +++ b/aidlc-docs/active-features.md @@ -6,4 +6,4 @@ | Feature | frontend-shell | ✅ Complete | feature/frontend-shell | web/src (AppShell, NavigationBar, Footer, Hero socials, new BackToTop/SkipLink/404/error pages, routes, theme.ts, main.tsx), web/vite.config.js, web/package.json | 2026-10-14 | | Feature | homepage-sections | ✅ Complete | feature/homepage-sections | web/src/routes/index.tsx, new homepage section components, web/src/content (types + static content), possibly web/config/securityHeaders.ts (contact form) | 2026-10-19 | | Feature | over-mij-page | ✅ Complete | feature/over-mij-page | web/src/routes/over-mij.tsx, web/src/content, possibly shared components (PageIntro, FramedImage, SectionHeading) and web/src/seo.ts | 2026-10-22 | -| Feature | soorten-fotoshoots-page | 🟢 Construction | 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 | 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 | diff --git a/aidlc-docs/features/soorten-fotoshoots-page/aidlc-state.md b/aidlc-docs/features/soorten-fotoshoots-page/aidlc-state.md index 22df808..12d1120 100644 --- a/aidlc-docs/features/soorten-fotoshoots-page/aidlc-state.md +++ b/aidlc-docs/features/soorten-fotoshoots-page/aidlc-state.md @@ -5,7 +5,7 @@ - **Feature Slug**: soorten-fotoshoots-page - **Project Type**: Brownfield - **Start Date**: 2026-10-24T19:30:00Z -- **Current Stage**: CONSTRUCTION - Code Generation unit 2 Soorten fotoshoots page (review changes done, texts approved, PR #8 updated; awaiting approval) +- **Current Stage**: Complete (PR #8 to master, auto-merge by the owner) - **Branch**: feature/soorten-fotoshoots-page (fast-forwarded to master 11a5224 after over-mij-page merged, PR #7) - **Worktree**: K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-soorten-fotoshoots @@ -76,8 +76,8 @@ Agreed with the parallel sessions (contact-page, portfolio-page, over-mij-page) - [x] NFR Requirements - SKIP - [x] NFR Design - SKIP - [x] Infrastructure Design - SKIP -- [~] Code Generation - EXECUTE (per unit): 1 Shared blocks and content ✅ (eb23536 / befe97a / 6cf9095) → 2 Soorten fotoshoots page (generated, verified, awaiting review on test) -- [ ] Build and Test - EXECUTE +- [x] Code Generation - EXECUTE (per unit): 1 Shared blocks and content ✅ (eb23536 / befe97a / 6cf9095) → 2 Soorten fotoshoots page ✅ (4521539, d2c1d2c) +- [x] Build and Test - EXECUTE (approved) ### 🟡 OPERATIONS PHASE - [x] Deployment Setup, Monitoring Setup, Production Readiness Validation - SKIP (Operations = No) diff --git a/aidlc-docs/features/soorten-fotoshoots-page/audit.md b/aidlc-docs/features/soorten-fotoshoots-page/audit.md index a6b430a..6ea1d3e 100644 --- a/aidlc-docs/features/soorten-fotoshoots-page/audit.md +++ b/aidlc-docs/features/soorten-fotoshoots-page/audit.md @@ -311,3 +311,27 @@ **Context**: CONSTRUCTION - Code Generation unit 2 (complete, awaiting approval) --- + +## Build and Test + +**Timestamp**: 2026-10-25T16:00:00Z + +**User Input**: "Ga verder naar Build en Test" + +**AI Response**: "Code Generation unit 2 approved. Build and Test at d12665c: build ✅, 325 unit tests ✅ (coverage 92.4%), 19/19 browser integration checks on the production build ✅ (one check corrected: ContactSection removes ?pakket= from the URL by design), Lighthouse within all budgets (soorten 0.89/0.85 mobile, 1.0 desktop). Wrote construction/build-and-test/ (build, unit, integration, performance instructions and summary). Operations phase declined earlier, so the next step after approval is completing the workflow; merging PR #8 is the owner's call." + +**Context**: CONSTRUCTION - Build and Test (complete, awaiting approval) + +--- + +## Build and Test — Approval and Workflow Complete + +**Timestamp**: 2026-10-25T16:10:00Z + +**User Input**: "Ga verder. Ik merge de PR met auto-merge. zodra die gemerged is mag je opruimen en maste rupdaten. dan is deze sessie klaar en kunnen de andere siessies verder" + +**AI Response**: "Build and Test approved; Operations phase stays declined, so the workflow is complete: aidlc-state.md set to Complete, active-features.md to ✅ Complete. Committed and pushed the Build and Test docs to PR #8; announced the merge (which also deploys to test) to the parallel sessions. After the owner's auto-merge: clean up the worktree and local branch, update master, and send the merge commit to the other sessions so they can rebase." + +**Context**: Workflow complete (merge by the owner) + +--- diff --git a/aidlc-docs/features/soorten-fotoshoots-page/construction/build-and-test/build-and-test-summary.md b/aidlc-docs/features/soorten-fotoshoots-page/construction/build-and-test/build-and-test-summary.md new file mode 100644 index 0000000..4e1f322 --- /dev/null +++ b/aidlc-docs/features/soorten-fotoshoots-page/construction/build-and-test/build-and-test-summary.md @@ -0,0 +1,52 @@ +# Build and Test Summary — soorten-fotoshoots-page + +Tested commit: `d12665c` (unit 1 shared blocks and content + unit 2 Soorten fotoshoots page, incl. the review changes), locally on Windows, 2026-10-25. + +## Build +- **Tool**: pnpm + Vite (`tsc && vite build`) +- **Status**: ✅ Success (0.9 s locally). CI run 568 (`workflow_dispatch`, deploy_test) on `ce2cb92`: `check`, `deploy-test` and `lighthouse` ✅; PR run 569 on `ce2cb92` ✅; PR run 570 on `d12665c` in progress at the time of writing +- **Artifacts**: `web/dist/` +- **Main bundle**: 169.6 kB gzip (+0.3 kB against master) + +## Unit tests +- **Total**: 325 in 65 files. **Passed**: 325. **Failed**: 0. +- **Coverage**: thresholds met; 92.4% of statements overall +- **Status**: ✅ Pass + +## Integration (browser, production build) +19 checks across the 12 scenarios in `integration-test-instructions.md`, all ✅: + +| Scenario | Result | +|---|---| +| Newborn contact link → package preselected, Contact below the header (1440 / 390) | ✅ 68 / 66 px | +| Loveshoot contact link, "de pakketten", "Boek je shoot" (1440 / 390) | ✅ all land below the header | +| Anchor `#gezin` (1440 / 390) | ✅ | +| Main menu → page at the top, h1 and title | ✅ | +| Outline and article names | ✅ | +| JSON-LD (5 services, anchors, provider, area, no prices) and head tags | ✅ | +| No e-mail in served HTML or JSON-LD | ✅ | +| Layout shift while scrolling, 10 photos loaded (1440 / 390) | ✅ CLS 0.0000 | +| No horizontal overflow, 3 pages × 5 widths | ✅ | +| Keyboard order, focus ring, touch targets | ✅ contact links 44 px, button 53 px | + +### Found in this stage +- **The Newborn contact-link check first failed, but the check was wrong, not the page.** It expected `?pakket=newborn` in the final URL. The homepage's ContactSection takes `?pakket=` over into the form and then removes it from the address bar on purpose (as with the price cards). The check now reads the link's `href` and confirms the preselected package; it passes. + +## Performance (Lighthouse CI, production build) +| Page | Mobile (budget) | Desktop | +|---|---|---| +| Homepage | 0.80 (0.8) | 0.99 | +| Over mij | 0.91 (0.85) | 1.0 | +| Soorten fotoshoots | 0.89 (0.85) | 1.0 | +| Other pages | 0.94–0.95 (0.9) | 1.0 | + +Accessibility and best practices are 1.0 on every page; SEO 1.0 on the indexed pages. Why the photo pages have a mobile budget of 0.85: see `performance-test-instructions.md`. + +## Additional +- **Security**: `pnpm audit --prod --audit-level high` clean. The full `pnpm audit` reports 17 findings in development tools only (same as master, NFR-SEC-05). No new dependencies, no new external resources, CSP unchanged. Query parameters on outgoing links only come from our own package and shoot ids (PBT). +- **Contract / E2E suite**: N/A (static front end without an API). The browser checks above cover the user flows. + +## Overall +- **Build**: ✅ **Tests**: ✅ **Performance budgets**: ✅ +- **Owner review**: texts approved; layout changed on review (smaller photos with detail photos, alternating bands, narrower text) and approved locally; no second deploy to test at the owner's request +- **Operations phase**: declined at Requirements Analysis. The next step is merging PR #8 (also deploys to test; announce it to the parallel feature sessions first). diff --git a/aidlc-docs/features/soorten-fotoshoots-page/construction/build-and-test/build-instructions.md b/aidlc-docs/features/soorten-fotoshoots-page/construction/build-and-test/build-instructions.md new file mode 100644 index 0000000..45194f8 --- /dev/null +++ b/aidlc-docs/features/soorten-fotoshoots-page/construction/build-and-test/build-instructions.md @@ -0,0 +1,23 @@ +# Build Instructions — soorten-fotoshoots-page + +Unchanged from over-mij-page: this feature adds no dependencies, build steps or environment variables. + +## Prerequisites +- **Node.js** 24 and **pnpm** (version pinned in `web/package.json`) +- **Environment variables**: none for the build. `LIGHTHOUSE_PERFORMANCE=warn` only in CI. + +## Build steps +```bash +cd web +pnpm install # also runs `chakra typegen` (postinstall); needed after the new frame.* theme tokens +pnpm build # tsc && vite build +``` + +## Verify +- **Expected output**: `✓ built in …` and no TypeScript errors (0.9 s locally at d12665c) +- **Artifacts**: `web/dist/`. New in this feature: ten shoot photos under `dist/assets/` (hashed names), `dist/og-soorten-fotoshoots.jpg` (copied from `public/`, stable URL for the preview image) and the page's own chunk `soorten-fotoshoots-*.js` (the shoot texts and structured data load with it, not with the main bundle) +- **Accepted warning**: Vite's chunk-size warning for the main bundle (known, NFR-P-01) + +## Troubleshooting +- **Lighthouse or preview fails with "port in use"**: another preview on 4173 (another worktree, or a leftover `vite preview`: on Windows, killing the shell does not stop its node process). Check with `Get-NetTCPConnection -LocalPort 4173` and coordinate via "claim 4173" with the parallel feature sessions. +- **A theme token is missing in types after a cherry-pick of the shoot types commit**: run `pnpm typegen`. diff --git a/aidlc-docs/features/soorten-fotoshoots-page/construction/build-and-test/integration-test-instructions.md b/aidlc-docs/features/soorten-fotoshoots-page/construction/build-and-test/integration-test-instructions.md new file mode 100644 index 0000000..0dc38ef --- /dev/null +++ b/aidlc-docs/features/soorten-fotoshoots-page/construction/build-and-test/integration-test-instructions.md @@ -0,0 +1,25 @@ +# Integration Test Instructions — soorten-fotoshoots-page + +Unit 1 (shared blocks, shoot types, service area) and unit 2 (the page) meet on the shoot types page, on the homepage (the pricing anchor and the contact section the shoot links lead to) and on Over mij (which uses the extended `MediaText` with its defaults). + +## Automated (in `pnpm test`) +- `src/app.test.tsx`: `/soorten-fotoshoots`, `/` and `/over-mij` through the real route tree +- `src/sitemap.test.ts` and the Lighthouse sync test: `/soorten-fotoshoots` indexed in `sitePages.ts`, in the sitemap and in the Lighthouse indexed and photo-page paths + +## In a real browser (production build) +Run against `pnpm build && npx vite preview --port 4180 --strictPort` (a port other than 4173, which Lighthouse uses), with headless Chrome via the `puppeteer-core` that Lighthouse already installs. Desktop viewport 1440 × 900, phone 390 × 900. The one-off script used for this run lives in the session scratchpad (`integration.mjs`); the scenarios below are what it checks. + +| # | Scenario | Expected | +|---|---|---| +| 1 | Click Newborn's "Stuur een berichtje" (1440 and 390 px) | href `/?pakket=newborn#contact`; on the homepage the form has Newborn selected, the URL becomes `/#contact` (ContactSection removes `?pakket=` by design) and Contact's top lines up with the sticky header's bottom | +| 2 | Click Loveshoot's "Stuur een berichtje" | `/#contact` without a package, lands below the header | +| 3 | Click "de pakketten" in the closing block | `/#prijzen`, the pricing section lands below the header | +| 4 | Click "Boek je shoot" | `/#contact` | +| 5 | Open `/soorten-fotoshoots#gezin` | the Gezin article lands below the header | +| 6 | Main menu "Soorten fotoshoots" from `/` | `/soorten-fotoshoots` at scroll 0, h1 "Soorten fotoshoots", title "Soorten fotoshoots \| Andrea Slop Fotografie" | +| 7 | Rendered DOM | h1 → h2 Newborn, Zwangerschap, Gezin, Loveshoot, Portretten → h2 "Benieuwd naar de prijzen?"; every article named by its h2 | +| 8 | Structured data and head | `WebPage` with an `ItemList` of 5 `Service`s, `@id` = page URL + anchor, provider = the business `@id`; the business's `areaServed` is Huizen + Gooi en Vechtstreek; no prices; no robots meta; canonical and `og:image` `/og-soorten-fotoshoots.jpg` | +| 9 | E-mail address | not in the served HTML and not in the JSON-LD | +| 10 | Scroll the page top to bottom (1440 and 390 px) | CLS < 0.1; all 10 photos (5 main, 5 detail) loaded, each with alt, width and height | +| 11 | `/`, `/over-mij`, `/soorten-fotoshoots` at 320, 390, 768, 1024 and 1440 px | `scrollWidth ≤ innerWidth`: no horizontal overflow | +| 12 | Tab through the page's main content | the 5 contact links (by their full accessible name), "de pakketten", "Boek je shoot", in that order, each with a ≥ 2 px focus ring; contact links and the button ≥ 44 px high | diff --git a/aidlc-docs/features/soorten-fotoshoots-page/construction/build-and-test/performance-test-instructions.md b/aidlc-docs/features/soorten-fotoshoots-page/construction/build-and-test/performance-test-instructions.md new file mode 100644 index 0000000..8a97feb --- /dev/null +++ b/aidlc-docs/features/soorten-fotoshoots-page/construction/build-and-test/performance-test-instructions.md @@ -0,0 +1,24 @@ +# Performance Test Instructions — soorten-fotoshoots-page + +A static site, so there is no load testing. Performance means page-load performance, measured with Lighthouse CI on the production build. + +```bash +cd web +pnpm build +pnpm lighthouse # mobile (lighthouserc.cjs) then desktop (lighthouserc.desktop.cjs) +``` + +Before running: send "claim 4173" to the parallel feature sessions and keep the machine quiet; afterwards "4173 free". + +## Budgets +- **Performance, mobile**: homepage ≥ 0.8 (NFR-P-01); **photo pages `/over-mij` and `/soorten-fotoshoots` ≥ 0.85 (new in this feature)**; every other page ≥ 0.9 +- **Performance, desktop**: every page ≥ 0.9 (`lighthouserc.desktop.cjs` now raises every entry, not only the homepage's) +- **Accessibility and best practices**: 1.0 on every page +- **SEO**: 1.0 on the indexed pages; the basic audits on noindex pages + +## Measuring reliably +Check `environment.benchmarkIndex` in the JSON report: around 3900–4300 on this PC. One homepage run at 0.69 had a benchmarkIndex of 1909 (the machine at half speed during that measurement); such a run says nothing about the code. + +## Why the photo pages get 0.85 on mobile +Lighthouse simulates a slow mobile connection (lantern). On a page whose largest paint is a photo, that photo can only be requested after the main bundle and the page's own chunk have run, so `/over-mij` and `/soorten-fotoshoots` both land on LCP 3.22 s and a score of about 0.897 (FCP 0.72, SI 0.98, LCP 0.72, TBT 0.99, CLS 1.0). That rounds to 0.89 or 0.90 from run to run. +Tried during this feature and measured: fewer bytes on the LCP photo (848×1060 instead of an upscaled 960×1200) and no fade-in on the priority photo; neither moved the LCP. Moving the page's JSON-LD out of `head()` kept the main bundle 1 kB (gzip) smaller. The structural fix is prerendering or a smaller main bundle (NFR-P-01); then the photo pages go back to 0.9. diff --git a/aidlc-docs/features/soorten-fotoshoots-page/construction/build-and-test/unit-test-instructions.md b/aidlc-docs/features/soorten-fotoshoots-page/construction/build-and-test/unit-test-instructions.md new file mode 100644 index 0000000..c6d938a --- /dev/null +++ b/aidlc-docs/features/soorten-fotoshoots-page/construction/build-and-test/unit-test-instructions.md @@ -0,0 +1,17 @@ +# Unit Test Execution — soorten-fotoshoots-page + +```bash +cd web +pnpm test # vitest run --coverage +``` + +- **Expected**: 65 files, 325 tests, 0 failures (at d12665c; 60 files / 273 tests on master before this feature, plus 6 from contact-page's cherry-picked `webPage()` tests) +- **Coverage**: thresholds met; `src/lib/` and `src/seo.ts` at 100%; overall 92.4% of statements +- **Includes, new in this feature**: + - `shootTypes` content: ids and order, existing package ids, frame colours that exist in the theme, alt texts, 4:5 photos + - `FramedImage` (`frameColor`) and `MediaText` (`reverse`, `mediaSize`, `detailImage`), with the existing callers unchanged; the generated CSS rules are read with `src/test/cssRules.ts`, since jsdom applies neither media queries nor pseudo-elements + - `CallToAction`, `RichParagraph` (moved), `Pricing` anchor `#prijzen` + - `ShootBlock` and `ShootList`: articles with anchors, link targets and names, alternation, bands, priority photo, axe + - the `/soorten-fotoshoots` route through the real route tree: outline, articles, contact links incl. `?pakket=`, portfolio links only when `/portfolio` is indexed, head tags, `WebPage` JSON-LD + - property-based tests (fast-check): `shootContactLink` (only a visible package's id goes into `?pakket=`, always the contact section), `shootPortfolioLink`, `areaServed` (named areas in order, only towns and regions), `shootServices` (one service per shoot in order, distinct anchor `@id`s, provider and area, first paragraph, no e-mail or prices), `absoluteUrl` (invariant and idempotency) +- **Report**: terminal output plus `web/coverage/`