Map overhaul: terrain-aware RF tools (Coverage / LOS / Scan), WASM ITM, donut clusters, 3D terrain#438
Merged
SimmerV merged 74 commits intoMeshAddicts:developfrom Apr 22, 2026
Merged
Conversation
…nd collapsible sections
… sync, role badge in details panel; remove pulse animation for performance
…, keyboard navigation, improved hover tooltips with signal meter
…s), role and channel filter pills, max range in details panel
…eroute rows in details panel
… analysis between two nodes
…path analysis, settings panel collapsible sections, export map as PNG
…slider, and pitch controls
…l with interactive elevation profile chart
…s sub-terrain altitudes to terrain + antenna
…ting panel, Traceroute in details panel
…ction tool with hardware/antenna link budget, painted reachability sectors, and virtual node placement
… presets with custom sensitivity, RSSI-gradient coverage painting
…eplacing polar wedges with Mapbox image source
…ith slideInLeft animation
…k refresh to skip no-op redraws
…earer labels, diagnostic hints
…nating map-viewport dependency
…bly, typed TS wrapper, physics-validated
…M resolution to 384²
… chart hover → map marker
…iderfy for co-located nodes
…, spiderfy leg shadow
…ver to right of panel
…ration, add Tilezen source
…ht); LOS terrain attribution
…nput, clickable asymmetry pill
…erences correct TX/RX antenna fields
…iew, per-class map toggles
Contributor
There was a problem hiding this comment.
Pull request overview
Large Map page overhaul that adds terrain-aware RF analysis (Coverage / LOS / Scan) backed by NTIA Longley‑Rice ITM compiled to WebAssembly, plus new map UI systems (tools drawer, search, quick filters), cluster rendering, and 3D-terrain plumbing.
Changes:
- Added an ITM v1.4 WASM build pipeline (vendor fetch, emcc build, Docker builder) and a typed TS wrapper + vitest correctness suite.
- Implemented new terrain/DEM sampling + RF analysis modules (LOS, viewshed, coverage raster/contours/rays, scan ranking) and supporting workers/pool.
- Introduced multiple new map UI components (tools drawer, panels, search, quick controls, telemetry sparklines) and cluster donut rendering layers.
Reviewed changes
Copilot reviewed 53 out of 57 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/wasm/itm/shim.h | Emscripten export shim for upstream ITM symbols |
| frontend/wasm/itm/fetch-vendor.sh | Script to clone pinned NTIA/itm and normalize sources for emcc |
| frontend/wasm/itm/build.sh | emcc build script producing single-file JS + .d.ts |
| frontend/wasm/itm/README.md | Documentation for the WASM build, rationale, and validation plan |
| frontend/wasm/itm/Dockerfile | Self-contained Docker image to build/copy WASM artifacts |
| frontend/wasm/itm/.gitignore | Ignore vendored sources and intermediate outputs |
| frontend/src/slices/apiSlice.ts | Adds per-node telemetry RTK Query endpoint/hook |
| frontend/src/pages/map/viewshed.ts | Per-pixel viewshed computation + knife-edge loss helper |
| frontend/src/pages/map/utils.ts | Adds role colors + filtered GeoJSON builder + cluster layer toggles |
| frontend/src/pages/map/types.ts | Expands shared map types and details payload shape |
| frontend/src/pages/map/terrainDEM.ts | DEM sampling/bounds/downsample helpers for worker compute |
| frontend/src/pages/map/storage.ts | Persists new 3D terrain settings keys; style URL helper tweak |
| frontend/src/pages/map/scanAnalysis.ts | Main-thread “best neighbors” scan analysis + GeoJSON export |
| frontend/src/pages/map/pathAnalysis.ts | Traceroute path extraction between two nodes |
| frontend/src/pages/map/losTubeLayer.ts | Mapbox custom layer for 3D LOS tube + obstruction pylons |
| frontend/src/pages/map/losAnalysis.ts | Geometric LOS + Fresnel + knife-edge loss analysis |
| frontend/src/pages/map/linkFeatures.ts | Link feature generation (neighbors/traceroutes) + ID normalization helper |
| frontend/src/pages/map/itm.ts | Lazy-loaded WASM wrapper + context pooling for hot loops |
| frontend/src/pages/map/itm.test.ts | Vitest correctness suite for WASM ITM (skips when not built) |
| frontend/src/pages/map/detailsHtml.ts | Removed legacy HTML-string details renderer |
| frontend/src/pages/map/detailsDom.ts | Removed legacy DOM manipulation details panel helpers |
| frontend/src/pages/map/coverageWorkerPool.ts | Worker pool to parallelize coverage slicing |
| frontend/src/pages/map/coverageSliceWorker.ts | Worker entry: per-slice raster compute using ITM context |
| frontend/src/pages/map/coverageRays.ts | Visibility ray extraction constrained by viewshed + margin |
| frontend/src/pages/map/coverageRaster.ts | ITM-backed per-pixel raster renderer (alloc-minimized hot loop) |
| frontend/src/pages/map/coverageContours.ts | Marching-squares contour extraction over margin grid |
| frontend/src/pages/map/coverageAnalysis.ts | Shared coverage presets/constants + link budget helpers |
| frontend/src/pages/map/clusterMarkers.ts | HTML donut markers for clusters (visual overlay) |
| frontend/src/pages/map/clusterIcons.ts | Pre-rendered donut sprite images + Mapbox expressions |
| frontend/src/pages/map/clusterDonutLayer.ts | WebGL custom layer for terrain-aware donut clusters |
| frontend/src/pages/map/TelemetrySection.tsx | Node telemetry sparklines section using per-node telemetry query |
| frontend/src/pages/map/Sparkline.tsx | Inline SVG sparkline component |
| frontend/src/pages/map/PathHopList.tsx | Hop list rendering for traceroute paths |
| frontend/src/pages/map/MapTraceroutePanel.tsx | UI panel for traceroute paths between nodes |
| frontend/src/pages/map/MapToolsDrawer.tsx | Tools drawer UI + tool gating/coming-soon behaviors |
| frontend/src/pages/map/MapSearchBar.tsx | Search/autocomplete UI with keyboard navigation |
| frontend/src/pages/map/MapQuickControls.tsx | Bottom pill filters (days/links/clustering/role/channel) |
| frontend/src/pages/map/MapLosPanel.tsx | LOS analysis panel UI with endpoint configs + profile |
| frontend/src/pages/map/MapLegend.tsx | Legend restyle + new cluster ring entry |
| frontend/src/pages/map/MapHealthWidget.tsx | Mesh “health” widget (counts/avg SNR/diameter) |
| frontend/src/pages/map/FilterDropup.tsx | Portal-based pill dropup component |
| frontend/src/pages/map/ElevationProfile.tsx | SVG elevation profile with hover tooltip + Fresnel visualization |
| frontend/src/index.css | Tailwind v4 theming + new utility CSS/animations + map control tweaks |
| frontend/src/generated/itm/itm.d.ts | Placeholder TS types for generated WASM module import |
| frontend/src/generated/itm/.gitignore | Ignore generated outputs while keeping placeholders checked-in |
| frontend/src/components/Menu.tsx | Overlay-mode nav behavior for map full-bleed layout |
| frontend/src/components/Layout.tsx | Uses Menu overlay mode on map; adjusts left padding logic |
| frontend/package.json | Adds build:wasm script to build/copy ITM artifacts |
| frontend/index.html | Adds viewport-fit=cover + safe-area padding |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Large, multi-phase upgrade to the Map page. Adds a full terrain-aware RF toolbox powered by NTIA's Longley-Rice ITM compiled to WebAssembly, introduces WebGL donut clusters, ships 3D terrain with a real Tilezen DEM under the hood, and polishes dozens of smaller map UX issues.
Highlights
raster-demintegration with exaggeration slider and sky layer.New infrastructure
frontend/wasm/itm/,itm.ts,itm.test.ts— physics-validated against published reference cases).terrainDEM.ts,terrainRgb.ts,viewshed.ts) with R2 viewshed and 4/3-earth refraction.coverageRaster.ts) with marching-squares contour extraction (coverageContours.ts) and margin-gated visibility rays (coverageRays.ts).losTubeLayer.ts) with clearance-colored segments and obstruction pylons.MapToolsDrawer.tsx) — global tool discovery; greyed tools auto-open the 3D terrain setup.UX polish
Accuracy fixes landed along the way
queryTerrainElevation({ exaggerated: false })across every call site — terrain readings are now real MSL metres regardless of exaggeration slider or zoom level.scannedPixelsfield added toCoverageResultso the "no terrain data" diagnostic works at all Detail tiers (was hard-coded to 256²).Performance
BlobURL instead of data URL (skips ~100–200 ms base64 encoding at 2048²).