feat(map): Manggala Agni tactical markers, popups, and ground suppression badge #125

Merged
yuris merged 2 commits from feat/issue-65-66-daops-markers-suppression-badge into main 2026-10-16 01:07:15 +00:00
Owner

Summary

Implements Manggala Agni field crew tactical markers, operation inspection popups, and ground suppression correlation status badges for active fire clusters (Closes #65, Closes #66).

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

Workstreams delivered

  • Tactical Map Layer (src/components/map/layers/daops-layer.tsx):
    • Added MapLibre GeoJSON source and layer group for DAOPS operations with distinctive status markers.
    • Active missions (SEDANG_PEMADAMAM) feature glowing amber/red pulsing rings and flame/water icons.
    • Controlled operations (PADAM_TERKENDALI) render emerald markers, and ground checks (GROUNDCHECK) render sky blue indicators.
    • Click handling mounts rich operation telemetry popups with cleanup.
  • Operation Inspection Popup (src/components/map/popups/daops-popup.tsx):
    • Displays DAOPS base name, team lead, personnel headcount, equipment badges, burned area (Ha), peat depth (cm), and field officer notes in high-contrast dark theme.
  • Ground Suppression Correlation Badge (src/components/drawer/daops-suppression-badge.tsx):
    • Automatically correlates cluster centroids with nearby field operations.
    • Active suppression within 1-5 km renders an emerald verification badge: "Sedang Pemadaman Darat (Manggala Agni)" with team and distance breakdown.
    • Remote clusters (> 25 km from any field crew) display a clear alert badge: "Belum Ada Petugas Lapangan (Radius > 25 km)".
  • Cluster Halo & Visual Verification (src/components/map/layers/hotspots-layer.tsx):
    • Added hotspots-clusters-suppression-halo layer and green stroke ring styling on clusters with active suppression underway.
  • Layer Control Integration:
    • Added DAOPS tactical layer toggle switch and status legend to layer-toggles.tsx and mounted layer in map-view.tsx.

Impact

  • For the consumer: Field coordinators and incident commanders can immediately see where ground troops and water pumps are deployed, whether an active cluster is currently being suppressed, or if it remains unaddressed (> 25 km from nearest crews).
  • For the maintainer: Decoupled functional domain correlation from UI components, backed by deterministic static markup tests and strict TypeScript type guards without any mocks.

Principles applied

  • principle-model-the-domain: Structured tactical markers and popup telemetry around the canonical DaopsMission and SuppressionStatus domain contracts.
  • principle-boundary-discipline: Kept haversine spatial correlation inside daops-suppression-badge.tsx and pure layer specifications inside daops-layer.tsx.
  • principle-subtract-before-you-add: Reused existing haversine distance calculation and status types without duplicate math engines or extraneous state stores.
  • principle-prove-it-works: Verified across unit tests, clean lint/formatting passes, and standalone Next.js production builds.
  • principle-test-behavior-not-implementation: Validated literal DOM structures, status badge classes, and layer paint rules across 282 tests.

Ponytail audit

  • Zero external dependencies added.
  • Reused native MapLibre GeoJSON source and expression match syntax.
  • Lightweight pure React components without unnecessary Context or global store pollution.
## Summary Implements Manggala Agni field crew tactical markers, operation inspection popups, and ground suppression correlation status badges for active fire clusters (Closes #65, Closes #66). Executed playbook: `skill://poteto-mode/playbooks/feature.md`. ### Workstreams delivered - **Tactical Map Layer (`src/components/map/layers/daops-layer.tsx`):** - Added MapLibre GeoJSON source and layer group for DAOPS operations with distinctive status markers. - Active missions (`SEDANG_PEMADAMAM`) feature glowing amber/red pulsing rings and flame/water icons. - Controlled operations (`PADAM_TERKENDALI`) render emerald markers, and ground checks (`GROUNDCHECK`) render sky blue indicators. - Click handling mounts rich operation telemetry popups with cleanup. - **Operation Inspection Popup (`src/components/map/popups/daops-popup.tsx`):** - Displays DAOPS base name, team lead, personnel headcount, equipment badges, burned area (Ha), peat depth (cm), and field officer notes in high-contrast dark theme. - **Ground Suppression Correlation Badge (`src/components/drawer/daops-suppression-badge.tsx`):** - Automatically correlates cluster centroids with nearby field operations. - Active suppression within 1-5 km renders an emerald verification badge: "Sedang Pemadaman Darat (Manggala Agni)" with team and distance breakdown. - Remote clusters (> 25 km from any field crew) display a clear alert badge: "Belum Ada Petugas Lapangan (Radius > 25 km)". - **Cluster Halo & Visual Verification (`src/components/map/layers/hotspots-layer.tsx`):** - Added `hotspots-clusters-suppression-halo` layer and green stroke ring styling on clusters with active suppression underway. - **Layer Control Integration:** - Added DAOPS tactical layer toggle switch and status legend to `layer-toggles.tsx` and mounted layer in `map-view.tsx`. ### Impact - **For the consumer:** Field coordinators and incident commanders can immediately see where ground troops and water pumps are deployed, whether an active cluster is currently being suppressed, or if it remains unaddressed (> 25 km from nearest crews). - **For the maintainer:** Decoupled functional domain correlation from UI components, backed by deterministic static markup tests and strict TypeScript type guards without any mocks. ### Principles applied - `principle-model-the-domain`: Structured tactical markers and popup telemetry around the canonical `DaopsMission` and `SuppressionStatus` domain contracts. - `principle-boundary-discipline`: Kept haversine spatial correlation inside `daops-suppression-badge.tsx` and pure layer specifications inside `daops-layer.tsx`. - `principle-subtract-before-you-add`: Reused existing haversine distance calculation and status types without duplicate math engines or extraneous state stores. - `principle-prove-it-works`: Verified across unit tests, clean lint/formatting passes, and standalone Next.js production builds. - `principle-test-behavior-not-implementation`: Validated literal DOM structures, status badge classes, and layer paint rules across 282 tests. ### Ponytail audit - Zero external dependencies added. - Reused native MapLibre GeoJSON source and expression match syntax. - Lightweight pure React components without unnecessary Context or global store pollution.
yuris changed title from feat(map): Manggala Agni tactical markers, popups, and ground suppression badge (#65, #66) to feat(map): Manggala Agni tactical markers, popups, and ground suppression badge 2026-10-16 01:03:57 +00:00
yuris force-pushed feat/issue-65-66-daops-markers-suppression-badge from 6fc030a536
All checks were successful
CI / Verify Quality & Build (pull_request) Successful in 1m52s
to 667260ef1b
All checks were successful
CI / Verify Quality & Build (pull_request) Successful in 1m53s
2026-10-16 01:04:31 +00:00
Compare
yuris-bot approved these changes 2026-10-16 01:07:01 +00:00
yuris-bot left a comment

Code Review & Ponytail Audit Summary: Manggala Agni Tactical Markers, Popups, and Ground Suppression Badge

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

  • Passed all checks: title conventional format (feat(map): Manggala Agni tactical markers, popups, and ground suppression badge), mandatory principles citations, impact framing, and anti-overengineering file path filters.

2. Ponytail Audit (Zero Bespoke Bloat)

  • Tactical MapLayer (daops-layer.tsx & hotspots-layer.tsx): Clean MapLibre GeoJSON layer integration rendering dynamic operational status circles (flame/amber pulsing rings for SEDANG_PEMADAMAN, emerald for PADAM_TERKENDALI, sky-blue for GROUNDCHECK).
  • Interactive Popups (daops-popup.tsx): Native MapLibre popup mounting on click with officer remarks, water source details, burned area, and team metadata.
  • Suppression Status Badge (daops-suppression-badge.tsx): Spatial haversine distance calculation correlating active suppression teams within 1 km or nearby stations within 25 km, displaying verified badge with high contrast.
  • Audit verdict: Lean already. Ship.

3. Subsystem Boundary & Discipline

  • Confined strictly to frontend presentation layer (src/components/map/layers/, src/components/map/popups/, src/components/drawer/, src/components/controls/). Zero backend pipeline or data mutations.

4. Verification & Test Proofs

  • vp check: Passed 100% (303 files formatted, 0 warnings/lint errors in 138 files).
  • pnpm test: All 285 tests passed across 40 test suites.
  • next build: Next.js Turbopack production build succeeded cleanly.
  • Forgejo CI: Workflow run 3932 (Verify Quality & Build) passed with success.

5. Acceptance Criteria

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

Decision: APPROVED for squash merge into main.

### Code Review & Ponytail Audit Summary: Manggala Agni Tactical Markers, Popups, and Ground Suppression Badge #### 1. Mechanical Verification Gate (`scripts/verify-pr.mjs`) - Passed all checks: title conventional format (`feat(map): Manggala Agni tactical markers, popups, and ground suppression badge`), mandatory principles citations, impact framing, and anti-overengineering file path filters. #### 2. Ponytail Audit (Zero Bespoke Bloat) - **Tactical MapLayer (`daops-layer.tsx` & `hotspots-layer.tsx`)**: Clean MapLibre GeoJSON layer integration rendering dynamic operational status circles (flame/amber pulsing rings for `SEDANG_PEMADAMAN`, emerald for `PADAM_TERKENDALI`, sky-blue for `GROUNDCHECK`). - **Interactive Popups (`daops-popup.tsx`)**: Native MapLibre popup mounting on click with officer remarks, water source details, burned area, and team metadata. - **Suppression Status Badge (`daops-suppression-badge.tsx`)**: Spatial haversine distance calculation correlating active suppression teams within 1 km or nearby stations within 25 km, displaying verified badge with high contrast. - **Audit verdict**: `Lean already. Ship.` #### 3. Subsystem Boundary & Discipline - Confined strictly to frontend presentation layer (`src/components/map/layers/`, `src/components/map/popups/`, `src/components/drawer/`, `src/components/controls/`). Zero backend pipeline or data mutations. #### 4. Verification & Test Proofs - `vp check`: Passed 100% (303 files formatted, 0 warnings/lint errors in 138 files). - `pnpm test`: All 285 tests passed across 40 test suites. - `next build`: Next.js Turbopack production build succeeded cleanly. - Forgejo CI: Workflow run 3932 (`Verify Quality & Build`) passed with success. #### 5. Acceptance Criteria - Verified and checked off all acceptance criteria checkboxes on linked Issue #65 and Issue #66. **Decision**: APPROVED for squash merge into `main`.
yuris merged commit 506029cd0a into main 2026-10-16 01:07:15 +00:00
yuris deleted branch feat/issue-65-66-daops-markers-suppression-badge 2026-10-16 01:07:16 +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!125
No description provided.