Fix MeshCore nodes missing from dashboard map#51
Closed
KMX415 wants to merge 1 commit into
Closed
Conversation
MeshCore advertises position on the advertisement packet itself (adv_lat/adv_lon), which the event adapter classifies as NODEINFO. extract_node_update only pulled lat/lon from POSITION packets, so coordinates silently dropped before the node-repository write and /api/nodes/map returned zero MeshCore nodes. Pull position from both NODEINFO and POSITION packets via a shared _apply_position helper. Existing MeshCore nodes populate on the map on their next advertisement; no DB migration needed. Adds 3 regression tests in TestMeshcoreDecoderNodeExtraction covering advertisement-with-position, advertisement-without-position, and the standalone POSITION-packet path.
KMX415
added a commit
that referenced
this pull request
May 15, 2026
Per-feature click-by-click checklists for v0.7.4 release. Files live alongside features as they land; boxes get ticked during walkthroughs on .141 and .15. README.md index, cross-cutting checks, sign-off matrix foundation.md sidebar, IA refactor, map zero-scrollbar, audit log auth.md password change, viewer role, sign out, lockout terminal.md PTY, command guide, irreversibles, role gate updates.md apply, branch picker, watchdog rollback configuration.md Identity / Radio / Channels / Transmit / MQTT / GPS dangerous.md restart, clear DB, wipe phantoms, force NodeInfo cherry-picks.md MQTT paths, MeshCore Channel Config, PR #51 map fix polish.md real blips, smart upgrade indicator Templates structured: status / hardware / pre-conditions / walkthrough / negative paths / hardware-specific / failure modes / acceptance.
KMX415
added a commit
that referenced
this pull request
May 15, 2026
…shell
Lights up the modules introduced over the past six commits. Each
of those commits left its feature self-contained and importable;
this commit is what makes the dashboard actually render and serve
them. Splitting the wire-up out keeps the per-feature reviews
focused and means a future bisect against any of the new modules
isn't poisoned by churn in server.py / app.js / index.html.
Backend wiring (src/api/server.py):
Initialised inside the FastAPI lifespan and shut down cleanly:
- AuditLogWriter shared sink for every admin action
across auth / terminal / update /
dangerous routers.
- SessionManager PTY session registry; shutdown hook
flushes orphaned PTYs on systemctl
stop.
- CommandCatalog seeded from DEFAULT_CATALOG.
- ReleaseChannelRegistry seeded from DEFAULT_CHANNELS.
- UpdateApplier bound to the host shell runner.
- DangerousActionRegistry built from the handler factories,
closing over the live PipelineCoord
so async actions can dispatch through
the running event loop.
app.include_router added for:
- auth_config_routes PUT /api/config/auth_lockout
- terminal_routes /api/terminal/* + /ws
- update_routes /api/update/*
- dangerous_routes /api/dangerous/*
- public_radar_routes /api/public/recent_rx
pipeline.on_packet now also fires public_radar_routes
.public_radar_packet_callback so the auth-page radar gets fed
the live (scrubbed) RX stream.
Frontend wiring (frontend/js/app.js):
_bootAuthPanel, _bootTerminalPanel, _bootUpdatePanel,
_bootConfigurationPanel, _bootDangerousPanel attach controllers
to their sections on first activation and re-bind on hash-route
re-entry. All five hook into the existing sidebar router and
do nothing if their host element isn't in the DOM (so legacy
test pages aren't disturbed).
Frontend shell (frontend/index.html):
- Settings -> Auth section: card grid for password change, sign
out everywhere, viewer role, lockout config.
- Settings -> Updates section: channel picker, version readback,
apply / rollback buttons, structured log host.
- Settings -> Dangerous section: action list host with the
typed-confirmation modal mounted at body level.
- Terminal section: xterm host, status header, action bar,
command drawer, dangerous modal.
- Configuration section: Identity / Radio / Channels / Transmit /
MQTT / GPS subpanel hosts under the new sidebar IA.
- <link>s for settings.css, terminal.css, configuration.css.
- xterm.js + xterm-addon-fit pulled from jsdelivr (vendoring
follows in a separate commit; the CDN drop is a fallback for
online-first development boxes).
After this commit, every module shipped in commits 1-6 is reachable
from the dashboard and audited consistently. v0.7.4 is now feature-
complete on the working tree pending the smart upgrade indicator,
xterm vendoring, ottoxgam's MeshCore Channel Config rebase, and
PR #51 (MeshCore map fix).
Owner
Author
|
Cherry-picked onto eat/v0.7.4 as 8cbd730 alongside the rest of the v0.7.4 train. The CHANGELOG bullet has been moved from the v0.7.3.x section to Unreleased so it folds into the v0.7.4 release header at version-bump time. Full edge suite green locally (535 passed). Closing this PR -- the fix will reach main when feat/v0.7.4 merges. Hardware validation on RAK V2 with a live MeshCore node is on the v0.7.4 hardware-validation checklist. |
KMX415
added a commit
that referenced
this pull request
May 15, 2026
…ne green Sweep through foundation / terminal / updates / cherry-picks checklists, ticking the [x] boxes for unit + route tests that have landed and are part of the live 556-test suite. Hardware-walkthrough boxes stay [ ]; those are filled when the user runs the click-by-click steps on .141 and .15. Also updates cherry-picks.md to reflect: * PR #35 cherry-pick at 7820f9f with verified Co-Authored-By trailer * PR #51 cherry-pick at 8cbd730 with CHANGELOG bullet relocated
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
MeshCore advertisements carry position data on the advertisement packet itself (
adv_lat/adv_lon), which the event adapter classifies asPacketType.NODEINFO.MeshcoreDecoder.extract_node_updateonly consumed lat/lon fromPacketType.POSITIONpackets, so MeshCore node positions silently dropped before the node-repository write and/api/nodes/mapreturned zero MC nodes.Fix
extract_node_updatenow lifts position from bothNODEINFOandPOSITIONpackets through a shared_apply_positionhelper. Empty or zero coordinates are ignored.Tests
New
TestMeshcoreDecoderNodeExtraction(3 tests) intests/test_meshcore_usb.py:Full suite: 300 passed locally. Bandit clean on
src/decode/. Ruff clean.Migration
None. Existing MeshCore nodes populate on the map after their next advertisement is heard.
Test plan
python -m pytest tests/test_meshcore_usb.py