Base Station: Add mobile-data coverage overlays#2811
Conversation
1625b79 to
20c3441
Compare
|
/review |
Automated PR Review (Claude)0. SummaryVerdict: MINOR SUGGESTIONS Critical items to address: 1.1 This PR adds mobile-data coverage overlays to the Cockpit base-station feature, integrating OpenCellID and OSM Overpass data sources. It includes a config panel, context popup, per-bbox caching, a drag-to-fetch target tool, rate-limited request queueing, two display modes (heatmap and coverage rings), and an Electron IPC bridge to bypass browser CORS for OpenCellID. Approximately 4,200 lines added across 14 files, with new composables ( 1. Correctness & Implementation Bugs1.1 ( 1.2 ( 1.3 ( 1.4 ( 2. AGENTS.md Adherence2.1 ( 2.2 ( 3. Security3.1 ( 3.2 ( 4. Performance4.1 ( 4.2 ( 5. UI / UX5.1 ( 6. Code Quality & Style6.1 ( 6.2 ( 6.3 ( 7. Commit Hygiene7.1 ( 8. Tests — ✅9. Documentation9.1 ( 10. Nitpicks / Optional10.1 ( 10.2 ( 10.3 ( Generated by Claude. This is advisory; a human reviewer must still approve. |
822bfd8 to
f9d2395
Compare
|
/review |
Automated PR Re-review 2 (Claude)Comparing
Previous findings status
Summary of status changes:
New findings0. SummaryVerdict: MINOR SUGGESTIONS This PR adds mobile-data coverage overlays (OpenCellID and OSM Overpass) to the base-station feature. The major finding from the first review (1.1) has been addressed — the README now accurately describes the API-key requirement. Remaining items are code quality and style nits that do not block merging. 1. Correctness & Implementation Bugs1.5 ( 1.6 ( 2. AGENTS.md Adherence — ✅3. Security — ✅4. Performance — ✅5. UI / UX — ✅6. Code Quality & Style6.4 ( 7. Commit Hygiene — ✅8. Tests — ✅9. Documentation — ✅10. Nitpicks / Optional — ✅Generated by Claude. This is advisory; a human reviewer must still approve. |
Cockpit had no way to anchor the operator's physical base station on the map, so any downstream feature that needed a station position — range arcs, offscreen indicators, signal hints — had nothing to hang off of. Add the foundation pieces: - a persistent `useBaseStationStore` holding position and enabled state plus reset/remove actions, - a draggable Leaflet marker rendered through a new `useBaseStationOverlay` composable, - a right-click `BaseStationContextPopup` for status and quick actions, - "Set / Move base station here" entries in the mission-planning and Map widget context menus.
A bare position pin can't drive a meaningful coverage visualization — operators using a tether or a radio link have to express the link's characteristics (antenna type, gain, beamwidth, range, height, mast multiplier) before any range overlay can be drawn. - Add `BaseStationConfigPanel.vue` with tether-length and radio-link controls. - Extend `useBaseStationOverlay` with omni/sector coverage polygons, gradient steps, and a draggable bearing handle plus aiming arc. - Persist the new fields through `useBaseStationStore` and the `BaseStationConfig` type.
Tether and radio aren't the only links operators use — vehicles often fall back to a mobile-data uplink, and Cockpit had no way to show where cellular coverage existed around the station. Introduce a `MobileData` comms type with OpenCellID, OSM Overpass and custom-tile providers plus an operator filter, and add the initial overlay that fetches cellular sites around the configured base-station position. Store, type and panel sections are extended to match.
The OpenCellID ajax endpoint is keyless but blocked by browser CORS, so the renderer can't fetch coverage data directly even on the standalone build — operators would otherwise be forced to obtain and paste in an API key just to see anything. - Add an Electron network service that proxies the OpenCellID call from the main process, with a per-bbox cache (keyed by both the bbox and a fingerprint of the API key), request queue and rate-limit detection. - Expose it through the preload bridge so the renderer treats it like any other Electron API via `cosmos.ts`. - Hoist the OpenCellID DTOs into `src/types/baseStation.ts` so main and renderer share the same shape.
The first mobile-data overlay drew each site as a flat dot, which hides both the cell's range and the local site density, and every panel switch refetched the same bbox from the rate-limited OpenCellID and Overpass endpoints. - Render two new display modes: `Heatmap` (heat layer keyed on cell density) and `CoverageRings` (stacked ring polygons sized by the per-tower range estimate). - Cache OpenCellID and Overpass responses per bbox in the store, with LRU trimming to `MOBILE_COVERAGE_CACHE_MAX_ENTRIES`. - Add a drag-to-fetch target tool for areas outside the default auto-fetch radius, plus ring rim labels and a heatmap intensity slider in the config panel. - Default-merge the persisted `mobileCoverageCache` on load so a schema bump doesn't crash callers that read its fields. - Surface an info snackbar on Lite when no API key is set instead of failing silently.
f9d2395 to
2e8a83a
Compare
Diff excluding the borrowed$\color{green}\pmb{+2{,}380}$ $\color{red}\pmb{-41}$
[drop]commits:Second of three sequential PRs splitting #2739 — stacked on #2810; merging it collapses the borrowed
[drop]commits at the bottom of this branch: