feat(nodes): per-node "Hide from Map" toggle (#3549)#3565
Conversation
Adds a `hideFromMap` per-node flag that suppresses a node's marker on every map view while leaving the node fully visible in node lists, packet monitor, DMs, and everywhere else. Distinct from the ignore flag (hides nearly everywhere) and position override (relocates the marker) — for nodes with spoofed/unreliable GPS received RF-only from a distant mesh. Backend: - `nodes.hideFromMap` column for SQLite/Postgres/MySQL + idempotent migration 092 - DatabaseService.setNodeHideFromMap (+ async wrapper); persisted via repository upsert (insert + preserve-across-packet-update paths) so packets can't reset it - mapped through dbNodeMapper and both DeviceInfo/DbNode types - POST /api/nodes/:nodeId/hide-from-map (nodes:write, per-source) Map filtering (source + unified surfaces): - NodesTab (source-scoped map), DashboardMap (unified dashboard), MapAnalysis NodeMarkersLayer (unified analysis map) - Embed maps filtered at the embedPublicRoutes data source Frontend UX: - App.tsx toggleHideFromMap with optimistic update + per-source pending reconciliation (mirrors ignore flag, no device sync — display only) - MessagesTab node actions menu: Hide from Map / Show on Map - en.json labels + toast strings Tests: migration count bumped to 92; new nodes repo tests for hideFromMap round-trip and per-source isolation. Full suite green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Peq865k9vuH4PvKTFhQuNq
|
Claude finished @Yeraze's task —— View job PR Review: feat(nodes): per-node "Hide from Map" toggle (#3549)Status: Review complete ✅
Overall this is a well-structured, carefully implemented feature. The implementation closely mirrors the existing ignore-flag and position-override patterns, which keeps it consistent and reviewable. A few items worth noting: Migration & Schema✅ Solid across all three backends. The migration is idempotent (duplicate-column catch for SQLite, Minor: MySQL column sizing — Backend Route (
|
Address PR review feedback (#3565): - Add server route tests for POST /api/nodes/:nodeId/hide-from-map covering success (set/clear) and 400s for non-boolean hideFromMap, missing sourceId, and malformed nodeId — mirrors the favorite/favorite-lock route test contract. - Remove unused messages.hide_from_map_title / unhide_from_map_title locale keys (the actions are text menu items with no title attribute). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Peq865k9vuH4PvKTFhQuNq
|
Claude finished @Yeraze's task —— View job PR Review: feat(nodes): per-node "Hide from Map" toggle (#3549)Status: Review complete ✅
Overall this is a well-structured, well-tested implementation that closely mirrors the existing ignore-flag and position-override patterns. Here's my analysis: Migration & Schema (092)✅ All three backends are correctly handled. SQLite uses Minor cosmetic inconsistency: The Drizzle SQLite schema ( Backend Route (
|
|
Thanks for the thorough review! Addressed in db98f18. Triage of each item: 1. 2. Route-level tests — ✅ Added in db98f18. 3. Unused i18n title strings — ✅ Removed Noted as accepted-by-design (consistent with existing patterns, not changed):
Also verified live on the dev container: toggling persists, round-trips through |
Finalize the 4.11.0 release (from 4.11.0-rc2) and bring documentation up to date with everything new since 4.10. Version bump across all five files: package.json, package-lock.json, helm/meshmonitor/Chart.yaml, desktop/src-tauri/tauri.conf.json, desktop/package.json. Documentation: - CHANGELOG: finalize the Unreleased section as [4.11.0], adding the previously-missing entries — headline MeshCore virtual node (#3540), MeshCore path-by-repeater-name (#3550), MeshCore map icons + filtering (#3563), per-node Hide from Map (#3565), telemetry time-range selector (#3530), newer AirQualityMetrics fields (#3517), UI/map unification (#3561), plus the bug-fix and documentation changes since 4.10.4. - virtual-node.md: document the new MeshCore Virtual Node alongside the Meshtastic one (default port 5000, per-source enablement, admin-command safety, MeshCore app setup, troubleshooting) + a two-variants intro note. - configuration/index.md, docs/index.md, README.md: mention the MeshCore Virtual Node in the Virtual Node feature blurbs. - CLAUDE.md: refresh stale version header (4.10.0 -> 4.11.0) and migration count (84 -> 92, latest 092_add_hide_from_map_to_nodes). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Implements issue #3549 — a per-node "Hide from Map" toggle. It suppresses a node's marker on every map view while leaving the node fully visible in node lists, packet monitor, DMs, and everywhere else.
This is deliberately distinct from the existing options the issue calls out:
Use case: nodes broadcasting spoofed/wildly inaccurate GPS, or RF-only nodes received from a distant mesh, that clutter the map — without losing the ability to message or monitor them.
How it works
A
hideFromMapboolean column on thenodestable (mirrorspositionOverrideEnabled). The flag rides on the node object through all the normal serialization paths; only the map-marker rendering paths filter it out.Map filtering — both source and unified surfaces
NodesTabmap (source-scoped) ✅DashboardMap(unified dashboard) ✅MapAnalysis→NodeMarkersLayer(unified analysis map) ✅embedPublicRoutesdata source (also drops the node from the embed's neighbor/traceroute layers) ✅Backend
nodes.hideFromMapfor SQLite/Postgres/MySQL + idempotent migration 092DatabaseService.setNodeHideFromMap(+ async wrapper); persisted via the repository upsert (insert + preserve-across-packet-update paths) so an incoming packet can't reset the user's toggledbNodeMapperand bothDeviceInfo/DbNodetype defsPOST /api/nodes/:nodeId/hide-from-map(nodes:write, per-source)Frontend UX
App.tsxtoggleHideFromMap— optimistic update + per-source pending-request reconciliation (mirrors the ignore-flag pattern; no device sync since this is display-only)MessagesTabnode actions menu → 🙈 Hide from Map / 🗺️ Show on Map in the "Map & Position" sectionTesting
tsccleanhideFromMapround-trip + preservation across packet updates, and per-source isolation; migration registry count bumped to 92🤖 Generated with Claude Code