Ship new Meshpoint UI shell, terminal wiring, and MQTT topic path #35
Ship new Meshpoint UI shell, terminal wiring, and MQTT topic path #35iceice400 wants to merge 1 commit into
Conversation
|
Please pardon my ignorance as to how this all works, but this seemed like a good idea to me. When it says: |
I'm sorry as I'm still new to GitHub I'm trying to update the file's I edited meeting the DESIGN-SYSTEM.md and accidentally deleted |
Replace local dashboard with meshradar shell, add terminal tab and MQTT prefix support, hybrid top bar. Single commit on upstream main for PR 35. AI-assisted with Cursor.
3902bd6 to
2b96df2
Compare
|
I cherry-picked those bits onto
Commit: 7820f9f on Closing this PR in favor of that cherry-pick. Credit goes in the v0.7.4 CHANGELOG. Hope to see more contributions. |
Cherry-pick of the MQTT-only slice of PR #35. src/relay/mqtt_formatter.py Both MeshtasticMqttFormatter and MeshCoreMqttFormatter store a precomputed _topic_prefix instead of separate root + region strings. Topics built off the prefix collapse duplicate region suffixes ("msh/US" + "US" -> "msh/US") and accept hierarchical regions ("msh" + "US/FL" -> "msh/US/FL") without double slashes. src/relay/mqtt_publisher.py Logs the resolved topic prefix on connect ("MQTT topic prefix resolved: <prefix>") so operators can see at a glance which paths the publisher is going to use. Connect log split: INFO "MQTT publisher started as <gateway>" + DEBUG broker detail. tests/test_mqtt_topic_paths.py Five cases covering default, hierarchical region, root-with- region segments, duplicate-suffix collapse, slash stripping. tests/test_mqtt_publisher.py Gateway-id determinism + on_connect "publisher started" log. Backward compatible: existing installs with topic_root="msh" and region="US" continue producing "msh/US/2/e/<channel>/<gateway>". Co-Authored-By: iceice400 <AdamAndrew2468@gmail.com>
The IA refactor turned the old top-tab Radio page into a read-only
status surface and gave Configuration its own sidebar entry. This
commit lands the panel controllers and styling for that section.
Identity / Radio / Channels live alongside Transmit / MQTT / GPS,
each in its own card with a Save button that writes the relevant
slice of local.yaml.
frontend/js/configuration/configuration_panel.js
Top-level orchestrator. Boots each card with the existing
/api/config payload, owns the dirty-state badge, and keeps the
Save button disabled until something actually changes. Card
instances are interchangeable -- each one implements bind /
refresh / serialize / commit, so adding a future card (gpsd,
serial bridge) is additive.
frontend/js/configuration/transmit_card.js
TX power slider, max-duty percent input, relay enable, relay
rate-limit fields. Range-clamped client-side; server still
validates.
frontend/js/configuration/mqtt_card.js
Enable toggle, broker host/port, topic root, region segment
with hierarchical-path preview that mirrors the formatter
cherry-picked from PR #35, encrypted toggle, gateway id
readback.
frontend/js/configuration/gps_card.js
UART vs static toggle, baud, timeout. The gpsd integration
placeholder is rendered but disabled with an explanatory
note that points at v0.7.5.
frontend/css/configuration.css
Card grid, dirty-pill, save-button states, card-internal form
layout, prefers-reduced-motion fallback.
The radar tab in the legacy top-tab UI was already stripped of its
Save buttons and locked to observational rendering in an earlier
commit on this branch (see 6e75c8f). Wire-up of the new
configuration section into the dashboard shell follows in the
v0.7.4 wire-up commit.
…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
New UI shell, terminal integration, and hierarchical MQTT topic paths
What changed
Replaced the legacy dashboard shell with the new Meshpoint UI layout in frontend/index.html, then wired it to a modular frontend stack under frontend/js/meshsense/ (config, api, ws, topology, packets, signal, traceroute, main).
Added phase-2 view integration for existing Messages, Radio, and Terminal modules inside the new shell, including activation hooks and style harmonization for consistent look/spacing.
Added terminal assets (frontend/css/terminal.css, frontend/js/terminal.js) and wired backend /ws handling in src/api/server.py for shell_command -> streamed shell_output with timeout + blocked-command guardrails.
Updated MQTT topic path composition in src/relay/mqtt_formatter.py to support hierarchical region/topic usage (e.g. msh/US/FL) with backward compatibility.
Added MQTT startup visibility in src/relay/mqtt_publisher.py to log resolved prefix (MQTT topic prefix resolved: ...).
Updated docs in docs/CONFIGURATION.md and docs/MQTT-AND-MESHRADAR.md with explicit topic_root/region composition examples.
Added tests for MQTT topic path behavior in tests/test_mqtt_topic_paths.py and verified existing MQTT tests continue to pass.
Why it changed
The UI replacement improves operator workflow and makes topology/packet/signal/traceroute views easier to use.
Integrated terminal support removes SSH friction for routine diagnostics and service operations.
MQTT topic path flexibility was needed for Meshtastic-style hierarchical conventions and regional sub-segmentation without breaking existing configs.
How I tested it
Ran Python syntax check for backend websocket execution changes:
python -m py_compile src/api/server.py
Ran MQTT-related unit tests:
python -m unittest tests/test_mqtt_topic_paths.py
python -m unittest tests/test_mqtt_publisher.py tests/test_mqtt_topic_paths.py
Validated no linter errors on touched frontend/backend/docs files.
Manually validated UI view-switching behavior and phase-2 panel activation (Messages/Radio/Terminal) within the new shell.
AI-assisted contribution; code reviewed before submission.
Hardware used
UI/formatter changes: N/A
No RF hardware-dependent behavior was modified in this PR.
Region / frequency plan
MQTT path composition validated for US and hierarchical US/FL path formatting use case.
No radio PHY/frequency plan logic changed.
Any risks
Frontend shell replacement is broad and may have UX regressions in less-used flows.
WebSocket shell execution is guarded but still sensitive; additional backend allowlisting/RBAC can further harden.
MQTT path changes are backward-compatible and tested, but external consumers should confirm expected topic subscriptions if they rely on strict old paths.