feat(map): chokepoint preset buttons (Leaflet) #28

Merged
sirius merged 1 commit from feat/chokepoint-preset-buttons into master 2026-08-29 17:03:15 -04:00
Owner

Phase A frontend. Stacked on #27 (GET /api/map/chokepoints + ?src=).

Summary

  • Fetch /api/map/chokepoints once; toolbar buttons (phone: compact <select>) for Hormuz, Bab el-Mandeb, Suez, Malacca, Taiwan.
  • On select: map.setView(center, zoom), check Vessels · AIS, loadVessels() with ?src=vesselapi when the catalog says so (Hormuz only).
  • Enable Sentinel-1 SAR on Hormuz (user can untick).
  • Do not POST /api/vessels/subscribe unless the viewport intersects CONUS.
  • Phone chrome: presets live in the flow toolbar so they do not cover LAYERS / zoom / dock (PR #22).

Test plan

  • pytest tests/test_frontend_reliability.py tests/test_chokepoints.py — 16 passed
  • Playwright vs live 8443 vessel store (catalog mocked until #27 deploys): Hormuz → 26.4N 56.5E z9, vessel count 50, SAR on, 0 subscribe POSTs; Malacca moves the map; 390×844 select does not overlap LAYERS/zoom/dock
  • After merge: Hormuz on live 8443 uses real /api/map/chokepoints
Phase A frontend. Stacked on #27 (`GET /api/map/chokepoints` + `?src=`). ## Summary - Fetch `/api/map/chokepoints` once; toolbar buttons (phone: compact `<select>`) for Hormuz, Bab el-Mandeb, Suez, Malacca, Taiwan. - On select: `map.setView(center, zoom)`, check **Vessels · AIS**, `loadVessels()` with `?src=vesselapi` when the catalog says so (Hormuz only). - Enable Sentinel-1 SAR on Hormuz (user can untick). - Do **not** `POST /api/vessels/subscribe` unless the viewport intersects CONUS. - Phone chrome: presets live in the flow toolbar so they do not cover LAYERS / zoom / dock (PR #22). ## Test plan - [x] `pytest tests/test_frontend_reliability.py tests/test_chokepoints.py` — 16 passed - [x] Playwright vs live 8443 vessel store (catalog mocked until #27 deploys): Hormuz → 26.4N 56.5E z9, vessel count 50, SAR on, **0** subscribe POSTs; Malacca moves the map; 390×844 select does not overlap LAYERS/zoom/dock - [ ] After merge: Hormuz on live 8443 uses real `/api/map/chokepoints`
sirius added 2 commits 2026-08-29 14:10:19 -04:00
- GET /api/map/chokepoints: static five-strait fly-to catalog (Hormuz, Bab
  el-Mandeb, Suez, Malacca, Taiwan) with bbox/center/zoom/vesselapi. No
  VesselAPI calls; only Hormuz flags vesselapi=true.
- GET /api/vessels?src=aisstream|vesselapi|all (default all) filters the
  union store by provider so a Hormuz view skips ~5k CONUS AISStream rows.
- Tests: span validation of all five boxes, catalog 200 shape, src filter.
Fetch GET /api/map/chokepoints once. Desktop buttons / phone <select>
fly to Hormuz, Bab el-Mandeb, Suez, Malacca, Taiwan. Turns Vessels on,
uses ?src=vesselapi on Hormuz, enables Sentinel-1 there, and never
POSTs /api/vessels/subscribe outside CONUS.
sirius merged commit 0becc8a716 into master 2026-08-29 17:03:15 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
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: sirius/osint-dashboard#28
No description provided.