feat(map): historical burn scars charred polygon vector layer #128

Merged
yuris merged 1 commit from feat/burn-scars-layer into main 2026-10-16 01:40:24 +00:00
Owner

Summary

Renders historical burn scar perimeters across Indonesian peatlands as a MapLibre vector tile layer (burn_scars_historical.pmtiles) using deep charred burgundy styling (#3f1d24 fill at 0.5 opacity, #7f1d1d outline at 1.5 width) and adds dynamic year filtering (2015, 2019, 2023, ALL) with toggle controls in LayerToggles.

Closes #71

Principles applied

  • principle-model-the-domain: Typed year filter options against canonical HistoricalBurnYear contract (@/types/burn-scars) without duplicate enums.
  • principle-boundary-discipline: Validated vector filter specifications and coerced numeric years through MapLibre expressions to prevent tile filtering runtime errors.
  • principle-subtract-before-you-add: Reused resolveTileUrl("burn_scars_historical") PMTiles resolver and unified layer toggle primitives without bespoke UI state containers.
  • principle-test-behavior-not-implementation: Validated layer creation, charred color tokens, visibility changes, and year filter expressions against mock map abstractions across 309 passing tests.
  • principle-prove-it-works: Verified clean vp check, 45/45 passing test suites (309 tests), and successful Next.js production build.

Executed playbook: skill://poteto-mode/playbooks/feature.md

Impact

  • For the consumer: Analysts can inspect multi-decadal burn scars directly on the map, visualize chronic burn footprint overlap, and filter by major fire years (2015, 2019, 2023).
  • For the maintainer: Pure functional layer export contracts with automated testing coverage and strict type safety across MapLibre and React components.

Verification proof

  • pnpm exec vp check: Pass (0 errors, 0 warnings across 147 files).
  • pnpm test: All 45 test suites and 309 unit tests passed.
  • pnpm build: Next.js production build compiled in 3.5s.
  • node scripts/verify-pr.mjs: Verified against PR quality and architectural gate.
### Summary Renders historical burn scar perimeters across Indonesian peatlands as a MapLibre vector tile layer (`burn_scars_historical.pmtiles`) using deep charred burgundy styling (`#3f1d24` fill at 0.5 opacity, `#7f1d1d` outline at 1.5 width) and adds dynamic year filtering (2015, 2019, 2023, ALL) with toggle controls in `LayerToggles`. Closes #71 ### Principles applied - `principle-model-the-domain`: Typed year filter options against canonical `HistoricalBurnYear` contract (`@/types/burn-scars`) without duplicate enums. - `principle-boundary-discipline`: Validated vector filter specifications and coerced numeric years through MapLibre expressions to prevent tile filtering runtime errors. - `principle-subtract-before-you-add`: Reused `resolveTileUrl("burn_scars_historical")` PMTiles resolver and unified layer toggle primitives without bespoke UI state containers. - `principle-test-behavior-not-implementation`: Validated layer creation, charred color tokens, visibility changes, and year filter expressions against mock map abstractions across 309 passing tests. - `principle-prove-it-works`: Verified clean `vp check`, 45/45 passing test suites (309 tests), and successful Next.js production build. Executed playbook: `skill://poteto-mode/playbooks/feature.md` ### Impact - **For the consumer**: Analysts can inspect multi-decadal burn scars directly on the map, visualize chronic burn footprint overlap, and filter by major fire years (2015, 2019, 2023). - **For the maintainer**: Pure functional layer export contracts with automated testing coverage and strict type safety across MapLibre and React components. ### Verification proof - `pnpm exec vp check`: Pass (0 errors, 0 warnings across 147 files). - `pnpm test`: All 45 test suites and 309 unit tests passed. - `pnpm build`: Next.js production build compiled in 3.5s. - `node scripts/verify-pr.mjs`: Verified against PR quality and architectural gate.
feat(map): render historical burn scars vector layer with year filtering
All checks were successful
CI / Verify Quality & Build (pull_request) Successful in 2m17s
f10d8ff962
yuris-bot approved these changes 2026-10-16 01:39:57 +00:00
yuris-bot left a comment

Code Review & Ponytail Audit Summary: Historical Burn Scars Charred Polygon Vector Layer

1. Mechanical Verification Gate (scripts/verify-pr.mjs)

  • Passed all checks: title conventional format, description conventions, issue linking via Closes #71.

2. Subsystem Boundary & Discipline

  • Scope strictly frontend components and layer domain: src/components/controls/layer-toggles.tsx, src/components/dashboard/dashboard-client.tsx, src/components/map/layers/burn-scars-layer.tsx, src/components/map/map-view.tsx, and corresponding unit tests.
  • Zero backend pipeline or data mutations.

3. Ponytail Audit & Implementation Quality

  • Dead weight removed: Clean MapLibre vector tile integration directly consuming burn_scars_historical.pmtiles via resolveTileUrl.
  • Model the domain: Typed year filter options against canonical HistoricalBurnYear contract (@/types/burn-scars) without duplicate enums.
  • Styling adherence: Exact charred polygon visual tokens (#3f1d24 fill at 0.5 opacity, #7f1d1d outline at 1.5 width) with responsive year filtering (2015, 2019, 2023, ALL).

4. Verification Gates

  • vp check: All 316 files correctly formatted, 0 warnings or lint errors.
  • pnpm test: All 309 tests passed across 45 test files.
  • next build: Turbopack production build succeeded cleanly.
  • Forgejo CI: Workflow runs passed with success.

5. Acceptance Criteria

  • Verified and checked off all acceptance criteria checkboxes on linked Issue #71.

Decision: APPROVED for squash merge into main.

### Code Review & Ponytail Audit Summary: Historical Burn Scars Charred Polygon Vector Layer #### 1. Mechanical Verification Gate (`scripts/verify-pr.mjs`) - Passed all checks: title conventional format, description conventions, issue linking via `Closes #71`. #### 2. Subsystem Boundary & Discipline - Scope strictly frontend components and layer domain: `src/components/controls/layer-toggles.tsx`, `src/components/dashboard/dashboard-client.tsx`, `src/components/map/layers/burn-scars-layer.tsx`, `src/components/map/map-view.tsx`, and corresponding unit tests. - Zero backend pipeline or data mutations. #### 3. Ponytail Audit & Implementation Quality - **Dead weight removed**: Clean MapLibre vector tile integration directly consuming `burn_scars_historical.pmtiles` via `resolveTileUrl`. - **Model the domain**: Typed year filter options against canonical `HistoricalBurnYear` contract (`@/types/burn-scars`) without duplicate enums. - **Styling adherence**: Exact charred polygon visual tokens (#3f1d24 fill at 0.5 opacity, #7f1d1d outline at 1.5 width) with responsive year filtering (2015, 2019, 2023, ALL). #### 4. Verification Gates - `vp check`: All 316 files correctly formatted, 0 warnings or lint errors. - `pnpm test`: All 309 tests passed across 45 test files. - `next build`: Turbopack production build succeeded cleanly. - Forgejo CI: Workflow runs passed with success. #### 5. Acceptance Criteria - Verified and checked off all acceptance criteria checkboxes on linked Issue #71. **Decision**: APPROVED for squash merge into `main`.
yuris merged commit d876fb5d82 into main 2026-10-16 01:40:24 +00:00
yuris deleted branch feat/burn-scars-layer 2026-10-16 01:40:24 +00:00
Sign in to join this conversation.
No reviewers
No labels
backend
frontend
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
yuris/titik-gambut-next!128
No description provided.