diff --git a/aidlc-docs/features/contact-page/aidlc-state.md b/aidlc-docs/features/contact-page/aidlc-state.md index c06d5d0..cf0c422 100644 --- a/aidlc-docs/features/contact-page/aidlc-state.md +++ b/aidlc-docs/features/contact-page/aidlc-state.md @@ -5,7 +5,7 @@ - **Feature Slug**: contact-page - **Project Type**: Brownfield - **Start Date**: 2026-10-24T19:35:48Z -- **Current Stage**: CONSTRUCTION - Build and Test (after review on test) +- **Current Stage**: CONSTRUCTION - Build and Test complete; PR to master - **Branch**: feature/contact-page (rebased onto master 11a5224 after over-mij-page merge) ## Workspace State @@ -60,7 +60,7 @@ - [x] NFR Design - SKIP - [x] Infrastructure Design - SKIP - [x] Code Generation - EXECUTE (per unit) — Unit 1 webPage helper ✅ (now 3c7d00e on master), Unit 2 Shared contact blocks ✅, Unit 3 Contact page ✅ (deploy to test for review) -- [ ] Build and Test - EXECUTE +- [x] Build and Test - EXECUTE ### 🟡 OPERATIONS PHASE - [x] Deployment Setup, Monitoring Setup, Production Readiness Validation - SKIP (Operations = No) diff --git a/aidlc-docs/features/contact-page/audit.md b/aidlc-docs/features/contact-page/audit.md index 8c917b7..cd4be2a 100644 --- a/aidlc-docs/features/contact-page/audit.md +++ b/aidlc-docs/features/contact-page/audit.md @@ -788,3 +788,75 @@ Features "portfolio-page" and "soorten-fotoshoots-page" are also active and stac **Context**: CONSTRUCTION - Code Generation Unit 3 (approved) --- + +## Commit, Push and Deploy to Test (Unit 3) + +**Timestamp**: 2026-10-25T21:30:00Z + +**User Input**: (continuation of "ja pak nu op, dan kan je committen, pushen en deployen naar test") + +**AI Response**: "Committed e92b652 (code) and 9c2601d (docs), pushed feature/contact-page. Sent 'claim test' to Portfolio-pagina. Dispatched workflow continuous_integration.yaml on feature/contact-page with deploy_test=true (HTTP 204) → run 573; following it in the background." + +**Context**: CONSTRUCTION - Code Generation Unit 3 (deploying to test) + +--- + +## Deploy to Test — Run 573 Failed, Re-dispatched as 574 + +**Timestamp**: 2026-10-25T21:45:00Z + +**User Input**: (none — CI result) + +**AI Response**: "Run 573: job check on raspberry-pi-arm64 failed with exit code -1 right after `pnpm install --frozen-lockfile` had finished (cold pnpm store, 839 packages downloaded, chakra typegen done); no tests ran, deploy skipped. No changes to package.json/lockfile since master, where the same install passed (run 572). Exit code -1 from the runner means the process in the job container was terminated rather than a command failing; the exact cause on the Pi (e.g. memory) could not be verified from here. Re-dispatched deploy_test → run 574, following it; test stays claimed." + +**Context**: CONSTRUCTION - deploying unit 3 to test + +--- + +## Deploy to Test — Run 574 Failed (DNS on the Pi) + +**Timestamp**: 2026-10-25T21:55:00Z + +**User Input**: (none — CI result) + +**AI Response**: "Run 574: job check on raspberry-pi-arm64 failed before any step: the runner could not clone the standard actions — 'lookup github.com on 192.168.1.1:53: server misbehaving' (router DNS). Together with the slow downloads (14–33 KiB/s) and the terminated install in run 573 this points to a network/DNS problem on the Pi or router, not the code. Stopped retrying; reported to the user. Test claim kept until the user decides." + +**Context**: CONSTRUCTION - deploying unit 3 to test (blocked by runner network) + +--- + +## Deploy to Test — Retry after DNS Fix + +**Timestamp**: 2026-10-25T22:10:00Z + +**User Input**: "dns werkt weer" + +**AI Response**: "Verified: router 192.168.1.1 resolves github.com again. Re-dispatched deploy_test → run 575; following it." + +**Context**: CONSTRUCTION - deploying unit 3 to test + +--- + +## Deploy to Test — Run 575 Succeeded + +**Timestamp**: 2026-10-25T22:40:00Z + +**User Input**: (none — CI result) + +**AI Response**: "Run 575 on raspberry-pi-arm64: check, deploy-test and lighthouse all success. Contact page (9c2601d) is on test; awaiting the user's review. Test stays claimed." + +**Context**: CONSTRUCTION - unit 3 on test, awaiting review + +--- + +## Review on Test and Build and Test + +**Timestamp**: 2026-10-25T23:10:00Z + +**User Input**: "de versturen-knop van het formulier moet naar rechts. op home en op de contactpagina. Daarna mag je committen, pushen en PR maken. Zodra die PR gemerged is mag je opruimen en updaten en kan je de portfolio-sessie een update geven." + +**AI Response**: "ContactForm submit button alignSelf flex-end (homepage and contact page); the privacy line below it aligned to the end as well (visual check: left-aligned under a right-aligned button looked detached; the gate's line stays centred). Build and Test: 367/367 tests, lint, format, build, prod audit clean; 16 browser checks on the production build (4173 claimed and released). One real defect found: from a scrolled Soorten page on a phone, /contact opened mid-page (scrollY 652) because the ?pakket= clean-up navigation used resetScroll:false and replaced the incoming navigation before the router reset the scroll — fixed by keeping the default reset; BR-CP-12 corrected; rechecked. Wrote construction/build-and-test/ (build, unit, integration, performance instructions and summary). Next: commit, push, PR." + +**Context**: CONSTRUCTION - Build and Test (complete) + +--- diff --git a/aidlc-docs/features/contact-page/construction/build-and-test/build-and-test-summary.md b/aidlc-docs/features/contact-page/construction/build-and-test/build-and-test-summary.md new file mode 100644 index 0000000..ba5f4f1 --- /dev/null +++ b/aidlc-docs/features/contact-page/construction/build-and-test/build-and-test-summary.md @@ -0,0 +1,31 @@ +# Build and Test Summary — contact-page + +Tested on branch `feature/contact-page` (units 1–3 on master a58bc1c, plus the review changes), locally on Windows, 2026-10-25. + +## Build +- **Tool**: pnpm + Vite (`tsc && vite build`) +- **Status**: ✅ Success (0.8 s locally). CI: run 573 failed (runner process terminated after `pnpm install`) and 574 failed (router DNS) — both infrastructure; run 575 (`workflow_dispatch`, deploy_test, `9c2601d`): `check`, `deploy-test`, `lighthouse` ✅ +- **Main bundle**: 149.3 kB gzip (was 169.6 kB: Rolldown moved shared modules into a separate chunk; homepage performance measured identical, see performance) + +## Unit tests +- **Total**: 367 in 71 files. **Passed**: 367. **Failed**: 0. Coverage thresholds met; 92.7% of statements overall +- **Status**: ✅ Pass + +## Integration (browser, production build) +16 checks across the scenarios in `integration-test-instructions.md`, all ✅ after one fix: +- **Found in this stage**: on a phone, "Stuur een berichtje" on Soorten fotoshoots opened `/contact` at the previous scroll position (scrollY 652) instead of the top. Cause: the contact route removes `?pakket=` with a second navigation that used `resetScroll: false` (copied from the homepage, where it serves the `#contact` jump); it replaced the incoming navigation before the router had reset the scroll. Fix: keep the default scroll reset on that navigation (BR-CP-12 corrected). Rechecked at 1440 and 390 px: top of the page. +- Network check: no photo request below 1024 px, priority High from 1024 px. + +## Performance +See `performance-test-instructions.md`: desktop all ≥ 0.99; mobile `/contact` 0.88–0.90 (budget 0.9, kept by the owner) and `/` 0.78–0.80 (pre-existing, owner: separately). Accessibility 1.0 everywhere after the accent-button contrast fix. + +## Additional +- **Security**: `pnpm audit --prod --audit-level high` clean. No new dependencies, external resources or CSP changes (`data:` images were already allowed). No e-mail address in served HTML or JSON-LD. `?pakket=` validated against the package ids and never rendered (property-tested). +- **Contract / E2E suite**: N/A (static front end without an API); the browser checks cover the user flows. + +## Review changes after the test deploy +- Submit button of the contact form right-aligned (homepage and contact page), the privacy line below it aligned with it. + +## Overall +- **Build**: ✅ **Tests**: ✅ **Integration**: ✅ **Performance**: desktop ✅, mobile per the owner's decisions +- **Operations phase**: declined at Requirements Analysis. Next: PR to master (merging also deploys to test). diff --git a/aidlc-docs/features/contact-page/construction/build-and-test/build-instructions.md b/aidlc-docs/features/contact-page/construction/build-and-test/build-instructions.md new file mode 100644 index 0000000..6285460 --- /dev/null +++ b/aidlc-docs/features/contact-page/construction/build-and-test/build-instructions.md @@ -0,0 +1,23 @@ +# Build Instructions — contact-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 for the new accent.deeper token +pnpm build # tsc && vite build +``` + +## Verify +- **Expected output**: `✓ built in …` and no TypeScript errors +- **Artifacts**: `web/dist/`. New in this feature: `dist/assets/contact-*.jpg` and `contact-portret-*.jpg` (hashed), `dist/og-contact.jpg` (stable URL for the preview image), the page chunk `contact-*.js` (4.6 kB) and the shared `ContactForm-*.js` chunk (15 kB), which the homepage and the contact page load on demand +- **Accepted warning**: Vite's chunk-size warning for the main bundle (known, NFR-P-01) + +## Troubleshooting +- **"Port 4173 is already in use"**: a leftover `vite preview` (on Windows, killing the shell does not stop its node process). Check with `Get-NetTCPConnection -LocalPort 4173`, and coordinate with "claim 4173" / "4173 free" with parallel feature sessions. +- **CI `check` ends with exit code -1 after `pnpm install`, or "lookup github.com … server misbehaving"**: a network/DNS problem on the Pi or the router (seen on 2026-10-25, runs 573 and 574), not the code. Check the router's DNS (`nslookup github.com 192.168.1.1`), then dispatch the run again. diff --git a/aidlc-docs/features/contact-page/construction/build-and-test/integration-test-instructions.md b/aidlc-docs/features/contact-page/construction/build-and-test/integration-test-instructions.md new file mode 100644 index 0000000..fcc194a --- /dev/null +++ b/aidlc-docs/features/contact-page/construction/build-and-test/integration-test-instructions.md @@ -0,0 +1,14 @@ +# Integration Test Instructions — contact-page + +Browser checks on the production build (`pnpm build && pnpm preview`, port 4173), across pages and units. A scratchpad puppeteer script (`puppeteer-core` from Lighthouse CI's dependencies, local Chrome) ran them on 2026-10-25; they can be repeated by hand. + +| # | Scenario | Expected | +|---|---|---| +| 1 | Soorten fotoshoots → "Stuur een berichtje" at Newborn (1440 / 390 px) | lands on `/contact` at the top, `?pakket=` removed from the URL, Newborn preselected, gate mail subject "Aanvraag fotoshoot: Newborn" | +| 2 | Soorten fotoshoots → Loveshoot link, "Boek je shoot" | `/contact` | +| 3 | Over mij → "neem contact op", "Boek je shoot" | `/contact` | +| 4 | Homepage price card "Boek …" | stays on the homepage form (`/?pakket=…#contact`) | +| 5 | `/contact` at 320, 390, 768, 1024, 1440 px, scrolled to the end | no horizontal overflow, CLS < 0.1 | +| 6 | Keyboard on `/contact` (1440 px) | tab order: form (gate mail button) before the wide card | +| 7 | Served HTML and JSON-LD of `/contact` | no e-mail address; `ContactPage` present | +| 8 | Network: `/contact` at 390–1023 px vs 1024+ px | no request for `contact.jpg` below 1024 px; one request with priority High from 1024 px (LCP = the photo) | diff --git a/aidlc-docs/features/contact-page/construction/build-and-test/performance-test-instructions.md b/aidlc-docs/features/contact-page/construction/build-and-test/performance-test-instructions.md new file mode 100644 index 0000000..ff15ab9 --- /dev/null +++ b/aidlc-docs/features/contact-page/construction/build-and-test/performance-test-instructions.md @@ -0,0 +1,20 @@ +# Performance Test Instructions — contact-page + +```bash +cd web +pnpm build +pnpm lighthouse # mobile (lighthouserc.cjs), then desktop (lighthouserc.desktop.cjs) +``` + +Announce "claim 4173" to parallel feature sessions first and "4173 free" afterwards; avoid other heavy work on the machine while Lighthouse runs (it measures CPU). + +## Budgets (mobile performance) +| Page | Budget | Measured (2026-10-25) | +|---|---|---| +| `/` | 0.8 | 0.78–0.80 — pre-existing (identical on the unit 2 build, 3 runs each); owner: handle separately | +| `/contact` | 0.9 | 0.88 / 0.90 / 0.88 — owner chose to keep 0.9 | +| `/over-mij`, `/soorten-fotoshoots` | 0.85 | 0.85–0.88 | + +The contact page shares the cause of the photo pages: the page text appears only after the main bundle and the route chunk have run (client rendering), so LCP lands around 3.1–3.2 s in Lighthouse's simulation. Prerendering is the structural fix (NFR-P-01). In CI, performance is report-only (D6), so these do not block a merge; locally `pnpm check` fails on them. + +Desktop: every page ≥ 0.99; `/contact` 0.99 / 1 / 1 / 1. Accessibility, best practices and SEO (indexed pages) are 1.0 everywhere. diff --git a/aidlc-docs/features/contact-page/construction/build-and-test/unit-test-instructions.md b/aidlc-docs/features/contact-page/construction/build-and-test/unit-test-instructions.md new file mode 100644 index 0000000..247ea70 --- /dev/null +++ b/aidlc-docs/features/contact-page/construction/build-and-test/unit-test-instructions.md @@ -0,0 +1,11 @@ +# Unit Test Instructions — contact-page + +```bash +cd web +pnpm test # vitest run --coverage (unit, component, property-based, axe) +``` + +- **Expected**: 71 test files, 367 tests, 0 failures; coverage thresholds met (100% for `src/lib/**`, `seo.ts`, `sitemap.ts`) +- **Property-based tests** print their seed (`fast-check seed: …`); rerun a failure with `FC_SEED= pnpm test` +- **New in this feature**: `lib/contactChannels`, `lib/withReplyTime`, `PrivacyNote`, `ContactPanel`, `ContactDetails`, `contact/ContactAside`, `webPage`/`contactPage` in `seo.test.ts`, the contact route in `app.test.tsx` +- **Note**: run without an output filter (e.g. `rtk proxy pnpm test` in agent shells), so a failing test is visible in full diff --git a/aidlc-docs/features/contact-page/construction/contact-page/functional-design/business-rules.md b/aidlc-docs/features/contact-page/construction/contact-page/functional-design/business-rules.md index 196fbe2..df607f4 100644 --- a/aidlc-docs/features/contact-page/construction/contact-page/functional-design/business-rules.md +++ b/aidlc-docs/features/contact-page/construction/contact-page/functional-design/business-rules.md @@ -39,7 +39,7 @@ Text alternative: from 1024 px the page shows the form with the photo and card b |---|---| | BR-CP-10 | The route keeps `pakket` from the search only when it is text (same `validateSearch` as the homepage). | | BR-CP-11 | `ContactPanel load="eager"` receives it and applies the preselect per BR-CPN-02 (unit 2). | -| BR-CP-12 | After it was applied, the route replaces the URL with `/contact` without search, no history entry, no scroll, no focus move. An invalid value is removed the same way. | +| BR-CP-12 | After it was applied, the route replaces the URL with `/contact` without search, no history entry, no focus move; the page starts at the top. An invalid value is removed the same way. *Corrected at Build and Test: 'no scroll' left a visitor coming from a scrolled page mid-page.* | ## Texts and headings