feat(ui): BRGM restoration layer popups and canal risk factor breakdown #127
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/restoration-layer-canal-breakdown"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Renders BRGM peat restoration infrastructure markers (
SEKAT_KANAL,SUMUR_BOR,EMBUNG) on the MapLibre canvas with high-contrast inspection popups and physical condition indicators (green#22c55efor BAIK, red#ef4444for RUSAK), and integrates canal hydrology telemetry intoRiskFactorBreakdownandClusterDetailDrawerreflecting canal proximity penalties (+15 pts) and sekat kanal mitigation credits (-10 pts).Closes #58
Closes #59
Principles applied
principle-model-the-domain: Typed restoration features against canonicalRestorationInfrastructurecontract (@/types/restoration) and factor items againstFactorBreakdown.principle-boundary-discipline: Validated geojson properties at layer click boundaries before mounting React DOM popups, keeping UI renderers deterministic.principle-subtract-before-you-add: Reused existing MapLibre circle/symbol layering patterns and danger-score telemetry structure without adding extraneous state or libraries.principle-test-behavior-not-implementation: Tested observable DOM content and badge classes in static markup across popup, factor breakdown, and drawer components across 299 passing tests.principle-prove-it-works: Verified cleanvp check, 43/43 passing test suites (299 tests), and successful Next.js production build.Executed playbook:
skill://poteto-mode/playbooks/feature.mdImpact
Verification proof
pnpm exec vp check: Pass (0 errors, 0 warnings across 143 files).pnpm test: All 43 test suites and 299 unit tests passed.pnpm build: Next.js production build compiled successfully.node scripts/verify-pr.mjs: Verified against PR quality and architectural gate.a20fc148dd7c73238171Code Review & Ponytail Audit Summary: BRGM Restoration Layer Popups and Canal Risk Factor Breakdown
1. Mechanical Verification Gate (
scripts/verify-pr.mjs)Closes #58andCloses #59.2. Subsystem Boundary & Discipline
src/components/controls/layer-toggles.tsx,src/components/dashboard/dashboard-client.tsx,src/components/drawer/cluster-detail-drawer.tsx,src/components/drawer/risk-factor-breakdown.tsx,src/components/map/layers/restoration-layer.tsx,src/components/map/map-view.tsx,src/components/map/popups/restoration-popup.tsx, and corresponding unit tests.3. Ponytail Audit & Implementation Quality
RestorationInfrastructurecontract (@/types/restoration) and factor items againstFactorBreakdown.#22c55efor BAIK, rose#ef4444for RUSAK), exact distance metrics to nearest canal and canal block, and interactive inspection popups with close and zoom-to-feature actions.4. Verification Gates
vp check: All 314 files correctly formatted, 0 warnings or lint errors.pnpm test: All 303 tests passed across 44 test files.next build: Turbopack production build succeeded cleanly.5. Acceptance Criteria
Decision: APPROVED for squash merge into
main.