Marks the portfolio page as built and tested
Continuous Integration / check (pull_request) Successful in 13m30s
Continuous Integration / deploy-test (pull_request) Skipped
Continuous Integration / lighthouse (pull_request) Successful in 14m13s
Continuous Integration / deploy-production (pull_request) Skipped

Records the build and test results (full suite, integration scenarios,
Lighthouse in CI and locally) and completes the feature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 20:25:19 +01:00
co-authored by Claude Opus 5.5
parent 9efa7fc596
commit 2246986d77
8 changed files with 141 additions and 7 deletions
+1 -1
View File
@@ -8,4 +8,4 @@
| 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 | ✅ 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 | 🟢 Construction | 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 | 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 |
@@ -5,7 +5,7 @@
- **Feature Slug**: portfolio-page
- **Project Type**: Brownfield
- **Start Date**: 2026-10-24T19:30:00Z
- **Current Stage**: CONSTRUCTION - Code Generation (Unit 3 Portfolio page, generated, awaiting approval)
- **Current Stage**: Complete
- **Branch**: feature/portfolio-page (rebased onto master 1bf28cb after contact-page PR #10)
- **Worktree**: K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-portfolio
@@ -83,13 +83,13 @@ Parallel features, each in its own worktree (originally stacked on feature/over-
- [ ] NFR Requirements - SKIP
- [ ] NFR Design - SKIP
- [ ] Infrastructure Design - SKIP
- [~] Code Generation - EXECUTE (per unit) — Unit 1 Shared Instagram block ✅ (e013f14 after rebases); Unit 2 Gallery building blocks ✅ (18bf031); Unit 3 Portfolio page: generated, awaiting approval
- [ ] Build and Test - EXECUTE
- [x] Code Generation - EXECUTE (per unit) — Unit 1 Shared Instagram block ✅ (e013f14 after rebases); Unit 2 Gallery building blocks ✅ (18bf031); Unit 3 Portfolio page ✅ (9efa7fc)
- [x] Build and Test - EXECUTE (approved)
### 🟡 OPERATIONS PHASE
- [ ] Deployment Setup, Monitoring Setup, Production Readiness Validation - SKIP (Operations = No)
## Current Status
- **Lifecycle Phase**: CONSTRUCTION
- **Current Stage**: Functional Design — Unit 2 Gallery building blocks
- **Next Stage**: Code Generation — Unit 2
- **Lifecycle Phase**: COMPLETE
- **Current Stage**: Complete
- **Next Stage**: none (Operations = No)
@@ -316,3 +316,31 @@ Feature "portfolio-page" may affect components also touched by active feature "o
**Context**: CONSTRUCTION - Code Generation Unit 3 (generated, awaiting approval)
---
## Code Generation — Unit 3 — Approval; Build and Test Stage
**Timestamp**: 2026-10-28T09:00:00Z
**User Input**: "kan ik het via lan testen?" / "kan je committen en pushen en dan deployen naar test? Dan kan je de lokale server stoppen" / "start de ssh agent weer op" / "ssh key topegevoegd" / "ga verder naar Build en Test"
**AI Response**: "Served the build on the LAN (vite preview --host, http://192.168.1.2:4173) for the user's check, then stopped it. Everything was already committed; pushed feature/portfolio-page and dispatched the CI workflow with deploy_test (run 580: check, deploy-test, lighthouse all success; test.andreaslop.nl serves the portfolio). Restarted the ssh-agent after a reboot (no -t); the user added the key. Unit 3 approved. Build and Test: full test suite 82 files / 460 tests, coverage thresholds met (95.3% overall), build success; integration scenarios covered by route and gallery tests; Lighthouse: CI green, locally /portfolio 0.91 with pre-existing borderline pages unchanged versus master. Wrote construction/build-and-test/{build-instructions, unit-test-instructions, integration-test-instructions, performance-test-instructions, build-and-test-summary}.md."
**Build Status**: Success
**Test Status**: Pass
**Operations Phase Decision**: No (Decided At: Requirements Analysis)
**Context**: CONSTRUCTION - Build and Test (awaiting approval)
---
## Build and Test — Approval; Workflow Complete
**Timestamp**: 2026-10-28T09:15:00Z
**User Input**: "continue to next stage"
**AI Response**: "Build and Test approved. Operations = No (Requirements Analysis), so the workflow completes: active-features.md → ✅ Complete, aidlc-state.md → Complete. Committed the Build and Test docs locally. Presented the Workflow Complete summary; push and PR only on the user's request."
**Context**: Workflow complete (no Operations phase)
---
@@ -0,0 +1,26 @@
# Build and Test Summary — Portfolio Page
## Build
- **Tool**: pnpm + Vite (`tsc && vite build`)
- **Status**: ✅ Success (9efa7fc)
- **Artifacts**: `web/dist/` — route chunk `portfolio-*.js` 2.6 kB gzip, lazy `Lightbox-*.js` 15.4 kB gzip, main bundle +0.1 kB gzip versus master
## Tests
| Kind | Result |
|---|---|
| Unit + component + property-based | ✅ 82 files, 460 tests; coverage thresholds met (100% `lib/**`, `seo.ts`, `sitemap.ts`; 95.3% overall) |
| Integration (route tests, gallery) | ✅ 6 scenarios, see integration-test-instructions.md |
| Accessibility (axe in tests; Lighthouse 1.0) | ✅ incl. the open lightbox |
| Performance (Lighthouse) | ✅ CI run 580 (mobile + desktop); locally `/portfolio` 0.91; pre-existing local borderline on `/`, `/soorten-fotoshoots`, `/contact` (same on master) |
| Security | ✅ no new dependencies; `?shoot=` allowlisted and never rendered (tested with `<script>`); CSP unchanged; `pnpm audit:deps` passes (dev-tool findings are informational, NFR-SEC-05) |
| E2E / browser | Deployed to test (run 580); reviewed by the user before this stage |
## Extension compliance
- **Security Baseline**: SECURITY-04, 05, 09, 10, 11, 13, 15 compliant; others N/A (no data stores, auth, server or infrastructure)
- **PBT**: PBT-01..10 compliant (properties identified in functional design, generators in `src/test/arbitraries.ts`, seed logging, example tests alongside)
## Overall
- **Build**: Success · **Tests**: Pass · **Operations phase**: No (decided at Requirements Analysis)
## Next
Open a PR from `feature/portfolio-page` to master. Merging deploys master to test; production stays a manual `release/*` step.
@@ -0,0 +1,23 @@
# Build Instructions — Portfolio Page
## Prerequisites
- **Build tool**: pnpm 12.11.2 (`packageManager` in `web/package.json`), Node 24
- **Dependencies**: from `web/pnpm-lock.yaml`; no new dependency in this feature
- **Environment variables**: none
- **System**: any OS supported by Node 24; Chrome for Lighthouse
## Build Steps
```bash
cd web
pnpm install --frozen-lockfile # also runs `chakra typegen` (theme: swap duration, filterControl recipe)
pnpm build # tsc && vite build
```
## Verify
- `dist/` with, among others, `assets/portfolio-*.js` (route, ~2.6 kB gzip), `assets/Lightbox-*.js` (lazy chunk, ~15.4 kB gzip), `assets/index-*.js` (main, ~150 kB gzip; +0.1 kB gzip versus master), 20 portfolio photos and `og-portfolio.jpg`
- `sitemap.xml` lists `/portfolio`
- Known warning: chunk size > 500 kB for the main bundle (pre-existing)
## Troubleshooting
- **Type errors on Chakra tokens/recipes** after a theme change: run `pnpm typegen`.
- **Missing photos**: the assets are committed in `web/src/assets/portfolio/`; they were produced once with a local `System.Drawing` script (not part of the build).
@@ -0,0 +1,16 @@
# Integration Test Instructions — Portfolio Page
The units meet in the route tests (`web/src/app.test.tsx`, real route tree and router) and in `PortfolioGallery.test.tsx`; both run in `pnpm test`.
## Scenarios
| # | Units | Scenario | Covered by |
|---|---|---|---|
| 1 | 1 + 3 | `/portfolio` and `/` both render the shared `InstagramGrid`; without a valid Instagram link it is left out | `app.test.tsx` (portfolio, homepage) |
| 2 | 2 + 3 | Filter → grid → lightbox: filtered list, caption from the shoot type, counter within the filter, lightbox closes on a filter change | `PortfolioGallery.test.tsx` |
| 3 | 3 + router | `?shoot=gezin` starts filtered; `onzin`, `loveshoot`, `<script>` show "Alles"; choosing a filter replaces the URL (no history entry); canonical without parameters | `app.test.tsx` |
| 4 | 3 + Soorten fotoshoots | "Bekijk meer …foto's" only for newborn, zwangerschap, gezin while `/portfolio` is indexed | `app.test.tsx` (shoot types page) |
| 5 | 3 + SEO registry | `/portfolio` indexed, in the sitemap and in Lighthouse's indexed paths (sync test) | `app.test.tsx`, `sitemap.test.ts` |
| 6 | 2 + hero | Hero swipe and wrap unchanged after moving to `useSwipe` / `wrapIndex` | Hero tests (unchanged) |
## Manual check on test
After `deploy_test` (done: run 580), open https://test.andreaslop.nl/portfolio on desktop and phone: masonry 1/2/3 columns without shifting, filter row on one line, lightbox (tap, swipe, bottom bar on phones, Escape, focus back to the photo), and the three links on /soorten-fotoshoots.
@@ -0,0 +1,26 @@
# Performance Test Instructions — Portfolio Page
No load testing: static site. Performance is measured with Lighthouse CI.
```bash
cd web
pnpm lighthouse # lhci autorun (mobile) && lhci autorun --config=lighthouserc.desktop.cjs
```
## Targets and results
| Page | Mobile target | Local result | CI (run 580, Pi) |
|---|---|---|---|
| `/portfolio` | 0.9 | 0.91 (dedicated runs) | ✅ pass |
| `/` | 0.8 | 0.77 (master 0.78) | ✅ pass |
| `/soorten-fotoshoots` | 0.85 | 0.84–0.86 (master 0.84) | ✅ pass |
| `/contact` | 0.9 | 0.87 (master 0.87) | ✅ pass |
| all pages, desktop | 0.9 | ✅ | ✅ pass |
Accessibility, best practices and SEO: 1.0 on every page (mobile and desktop).
## Findings fixed in this feature
- Filter bar re-wrapping when the web font loaded caused CLS 0.119 → single non-wrapping row, CLS 0.001
- Three eager (but fading-in) grid photos delayed the fonts and the intro text (LCP 4.5 s) → no eager photos, LCP 2.9 s (user decision)
## Known, pre-existing
Locally `/`, `/soorten-fotoshoots` and `/contact` sit at or just below their mobile budgets on this PC, equally on master; CI on the Pi passes. Tracked in the memory note "Open follow-ups".
@@ -0,0 +1,15 @@
# Unit Test Execution — Portfolio Page
```bash
cd web
pnpm test # vitest run with v8 coverage; fast-check seed is logged (config/testSeed.ts)
```
## Expected
- 82 test files, 460 tests, 0 failures (as of 9efa7fc)
- Coverage thresholds met: 100% for `src/lib/**`, `src/seo.ts`, `src/sitemap.ts` (incl. the new `portfolioFilters`, `wrapIndex`, `swipeDirection`, `masonryRowSpan`, `neighbourIndexes`, `lightboxReducer`, `galleryImages`); overall 95.3% statements
- Property-based tests (PBT-02..07): round-trip (`wrapIndex`, `shootFromSearch`), invariants, idempotence (`filterPhotos`, `wrapIndex`), oracles (`neighbourIndexes`, `shootTypesWithPhotos`, `toGalleryItems`), stateful (`lightboxReducer`); a failure prints the seed and the shrunk counterexample — rerun with that seed
## jsdom limits handled in tests (documented in the test files)
- The dialog's focus trap needs layout boxes: the focus test stubs `getClientRects`
- Chakra removes a closed dialog after its fade-out, which needs real animation events: tests check `data-state="closed"` and the callbacks