Commit Graph

25 Commits

Author SHA1 Message Date
Daniel Pupius d95a74c1d7 refactor(web): replace Google Maps with MapLibre, clean up map components
- Migrate all three map components (Map, GoogleMap, NetworkMap) to MapLibre GL JS
- Extract shared CARTO_DARK_STYLE constants into lib/mapStyle.ts
- Move buildCircleCoords to lib/mapUtils.ts (was duplicated across components)
- Rename exports: Map → LocationMap, GoogleMap → NodeLocationMap
- Remove dead props (width, height, nightMode) from LocationMap interface
- Lazy-mount GL contexts via IntersectionObserver to prevent WebGL exhaustion
- Fix Math.spread RangeError in NetworkMap bounds calculation
- Remove showLinks conditional render in favour of visibility layout property
- Remove cursor state; set canvas cursor style directly on map interactions
- Remove Google Maps API key env vars from .env.example and .env.local
- Move Vite dev server to port 5747 (avoids cached redirect on 3000)
- Fix CORS/404: set VITE_API_BASE_URL="" so browser uses Vite proxy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 20:22:12 +00:00
Daniel Pupius e8e1a112ab feat(topology): track mesh node connections and render as map polylines
Add passive topology tracking from four sources with confidence ranking:
- Zero-hop MQTT observations (continuous, per-gateway, highest frequency)
- Traceroute replies (RouteDiscovery, full path + SNR data)
- NeighborInfo packets (self-reported neighbor SNR)
- relay_node inferred links (1-hop packets with known relay)

Backend: add rx_snr (field 62) and rx_rssi (field 63) to meshstream Data
proto; extract from MeshPacket in decoder.go; regenerate Go bindings.

Frontend:
- topologySlice: LinkObservation model, per-direction confidence merge,
  24h TTL pruning, 2000-edge cap, Redux-pure (timestamp from payload)
- aggregatorSlice: add hopsFromGateway to NodeData
- __root.tsx: dispatch processTopologyPacket after each SSE message
- NetworkMap: render polylines colored by SNR (green/yellow/red/gray),
  dimmed at 0.4 opacity for viaMqtt edges; Links toggle button in legend
- NodeDetail: Connections section showing per-edge SNR, source badge,
  viaMqtt badge, and last-seen time

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-15 16:43:48 +00:00
Daniel Pupius 69a31ca406 Split routers and extend mesh traffic retention (#1)
* Split routers on dashboard and extend retention periods

- Add Router node type with 12-hour stale timeout (vs 30 min for regular nodes)
- Create RouterList component to display router nodes separately
- Update NodeList to filter out routers (similar to gateways)
- Add yellow color scheme for router nodes to distinguish from gateways (green) and nodes (blue)
- Extend mesh traffic retention across the board:
  - Client-side packet age filter: 12h → 24h
  - Broker cache size: 50 → 200 packets
  - Messages per channel: 100 → 500

* Update regular node activity threshold to 60 minutes

* Fix TypeScript errors in router filtering logic

* Fix docker-build to use buildx explicitly with --load flag

* Add default empty value for MESHSTREAM_GOOGLE_MAPS_API_KEY in docker-build

* Restructure docker buildx command to fix path argument parsing

* Remove trailing backslash before build context path in docker-build

* Quote build args and separate path argument in docker-build
2026-01-06 12:25:34 -08:00
Daniel Pupius dc36070355 Better error cards for private messages, neighbor info rendering 2025-06-23 09:47:14 -07:00
Daniel Pupius 26ebc2a6f5 Ignore old packets 2025-05-07 11:32:44 -07:00
Daniel Pupius e9fa0104e3 Docker set up and fixes for build 2025-05-01 15:34:16 -07:00
Daniel Pupius 68fc353673 Info page 2025-04-30 15:08:03 -07:00
Daniel Pupius b7359339d3 Yet more map tweaks 2025-04-30 13:10:40 -07:00
Daniel Pupius c029ca1f7a Fix errors relating to lazy loading of map 2025-04-30 12:14:23 -07:00
Daniel Pupius f83e6a9c31 Consistent colors and activity status 2025-04-30 09:16:44 -07:00
Daniel Pupius 6c891a1b88 Break up NodeDetail into sub components 2025-04-25 17:56:25 -07:00
Daniel Pupius 4817d31d39 More cleanup to the node details page 2025-04-25 14:42:30 -07:00
Daniel Pupius acaeeaf495 Fix map view on node details 2025-04-25 10:27:44 -07:00
Daniel Pupius 4a41b0062d Cleanup error handling 2025-04-25 09:34:51 -07:00
Daniel Pupius 0184cba1ef Updates to node details 2025-04-24 20:10:56 -07:00
Daniel Pupius 28cb7072f7 Fix double loading of data 2025-04-24 10:51:50 -07:00
Daniel Pupius 07299d892c More stream tweaks 2025-04-23 15:19:32 -07:00
Daniel Pupius 489f995433 Track rx time 2025-04-23 13:59:54 -07:00
Daniel Pupius 249cecfda2 Card rendering and maps 2025-04-23 10:38:58 -07:00
Daniel Pupius f4504c4cd5 Fix types and render packets in a custom style 2025-04-22 19:48:24 -07:00
Daniel Pupius 648a5c601e Further work on web design 2025-04-22 17:17:25 -07:00
Daniel Pupius 095ff560b0 Working on UI 2025-04-22 16:42:22 -07:00
Daniel Pupius 60c8878436 Typescript types for payloads 2025-04-22 14:56:41 -07:00
Daniel Pupius 71e914b05d Fixing wireformat for SSE 2025-04-22 13:37:07 -07:00
Daniel Pupius 6844d575c4 Initial skeleton for web application 2025-04-22 13:26:35 -07:00