Node settings support (WIP) #10

Open
opened 2026-02-11 02:29:49 +03:00 by skobkin · 1 comment
Owner
  • Node settings editing
- Node settings editing
skobkin self-assigned this 2026-02-11 02:29:49 +03:00
Author
Owner

Node Settings Editing Plan

Goals

  • Introduce desktop node settings editing with a structure close to Meshtastic Android UX.
  • Keep implementation safe: per-page save, no cross-page concurrent saves, and no sending settings while disconnected.
  • Start with local-node editing, but keep interfaces reusable for remote-node editing later.

Current Status

  • Added Node tab hierarchy:
    • Radio configuration (LoRa, Channels, Security)
    • Device configuration (User, Device, Position, Power, Display, Bluetooth)
    • Module configuration (MQTT, Serial, External notification, Store & Forward, Range test, Telemetry, Neighbor Info, Status Message)
    • Import/Export (disabled)
    • Maintenance (disabled)
  • Disabled all unimplemented nested Node Settings tabs to match disabled-section UX:
    • Radio configuration: Channels
    • Module configuration: Serial, External notification, Store & Forward, Telemetry, Neighbor Info, Status Message
  • Added per-page Save/Cancel scaffolding and a global save lock to prevent concurrent settings saves.
  • Added connection gating: save is blocked while disconnected.
  • Added admin message plumbing in radio stack (ADMIN_APP) and bus topic admin.message.
  • Added app-level NodeSettingsService with a first working editable page flow:
    • Load User settings
    • Save User settings via begin/set/commit
  • Added shared bottom node-settings control block (Save/Cancel/Reload + progress/status) and reused it for editable/scaffolded pages.
  • Added Security page flow:
    • Load Security config (get_config / SECURITY_CONFIG)
    • Save Security config via begin/set_config/commit
  • Added Device page flow:
    • Load Device config (get_config / DEVICE_CONFIG)
    • Save Device config via begin/set_config/commit
  • Added Position page flow:
    • Load Position config (get_config / POSITION_CONFIG)
    • Save Position config via begin/set_config/commit
  • Added Power page flow:
    • Load Power config (get_config / POWER_CONFIG)
    • Save Power config via begin/set_config/commit
  • Added Display page flow:
    • Load Display config (get_config / DISPLAY_CONFIG)
    • Save Display config via begin/set_config/commit
  • Added Bluetooth page flow:
    • Load Bluetooth config (get_config / BLUETOOTH_CONFIG)
    • Save Bluetooth config via begin/set_config/commit
  • Added LoRa page flow:
    • Load LoRa config (get_config / LORA_CONFIG)
    • Save LoRa config via begin/set_config/commit
  • Added MQTT page flow:
    • Load MQTT module config (get_module_config / MQTT_CONFIG)
    • Save MQTT module config via begin/set_module_config/commit
  • Added Range test page flow:
    • Load Range test module config (get_module_config / RANGETEST_CONFIG)
    • Save Range test module config via begin/set_module_config/commit
  • Refined MQTT map reporting controls for Android parity:
    • Put Map reporting and Consent to share location toggles on one line
    • Switched map position precision to a metric-labeled dropdown
    • Switched map publish interval to Android-aligned fixed interval dropdown options
  • Aligned LoRa tab behavior with Android for preset/manual and frequency previews:
    • Hide manual modulation fields when Use modem preset is enabled (and hide preset selector when disabled)
    • Show effective frequency slot when raw channel_num is 0, using Android-compatible hash/channel-count rules
    • Show effective frequency when raw override_frequency is 0, using Android-compatible region/bandwidth math
    • Preserve raw 0 semantics on save for auto slot/frequency values
    • Show PA fan disabled only on supported hardware models (Android hasPaFan parity)
  • Added Position fixed-coordinate editing flow:
    • Manual latitude/longitude/altitude fields on desktop Position tab
    • Save fixed coordinates via admin set_fixed_position / remove_fixed_position
    • Persist node altitude from position packets (domain store + SQLite) and reuse it to prefill fixed altitude on reload
    • Group Position flags into a dedicated Position flags block with compact two-row layout and simpler option labels
  • Aligned Device/Position timing controls with Android fixed interval presets using shared select-style UX:
    • Device: Node info broadcast interval
    • Position: Position broadcast interval, Smart minimum interval, GPS update interval
    • Extracted preset second values into named constants with inline comments for maintainability
  • Unified node-settings interval/select helpers across Device/Position/MQTT:
    • Single shared seconds-to-human-label formatter for interval dropdown labels
    • Shared uint32 select option/parse/set helpers to avoid tab-specific duplication
  • Switched all node settings tabs auto-load to lazy tab-open trigger to avoid eager startup reload timeouts
    • All following tabs should be implemented in the same way.
  • Deferred first LoRa lazy-load until Node Settings sidebar tab is shown (OnShow) instead of app startup; kept one-time init guard so revisiting sidebar does not trigger redundant loads.
  • Split node settings implementation into focused files (node_settings_*.go) for UI tabs/shared controls and app service operations.
  • Kept node_tab.go as top-level orchestrator and moved User/Security page implementations and shared controls/helpers into dedicated files for easier navigation.
  • Extracted reusable key text/clone helpers for node settings and clarified app admin send/wait helper roles with method-level comments.

Milestones

Milestone 1: Core editable pages

  • LoRa page: load + save
  • Security page: load + save
  • Channels page: load + save (including safe edit model)
  • Page-specific validation and error messages for all three pages

Milestone 2: Device configuration parity

  • Device page
  • Position page
  • Power page
  • Display page
  • Bluetooth page

Milestone 3: Module configuration parity

  • MQTT
  • Serial
  • External notification
  • Store & Forward
  • Range test
  • Telemetry
  • Neighbor Info
  • Status Message

Milestone 4: Planned sections

  • Import/Export implementation
  • Maintenance implementation

Guardrails (Must Keep)

  • Never send settings when not connected.
  • Never run more than one settings save at once.
  • Keep per-page save model (no multi-page batch save).
  • Preserve disabled-with-reason UX for unsupported features.
# Node Settings Editing Plan ## Goals - Introduce desktop node settings editing with a structure close to Meshtastic Android UX. - Keep implementation safe: per-page save, no cross-page concurrent saves, and no sending settings while disconnected. - Start with local-node editing, but keep interfaces reusable for remote-node editing later. ## Current Status - [x] Added Node tab hierarchy: - `Radio configuration` (LoRa, Channels, Security) - `Device configuration` (User, Device, Position, Power, Display, Bluetooth) - `Module configuration` (MQTT, Serial, External notification, Store & Forward, Range test, Telemetry, Neighbor Info, Status Message) - `Import/Export` (disabled) - `Maintenance` (disabled) - [x] Disabled all unimplemented nested Node Settings tabs to match disabled-section UX: - `Radio configuration`: `Channels` - `Module configuration`: `Serial`, `External notification`, `Store & Forward`, `Telemetry`, `Neighbor Info`, `Status Message` - [x] Added per-page Save/Cancel scaffolding and a global save lock to prevent concurrent settings saves. - [x] Added connection gating: save is blocked while disconnected. - [x] Added admin message plumbing in radio stack (`ADMIN_APP`) and bus topic `admin.message`. - [x] Added app-level `NodeSettingsService` with a first working editable page flow: - Load User settings - Save User settings via begin/set/commit - [x] Added shared bottom node-settings control block (Save/Cancel/Reload + progress/status) and reused it for editable/scaffolded pages. - [x] Added Security page flow: - Load Security config (`get_config` / `SECURITY_CONFIG`) - Save Security config via begin/set_config/commit - [x] Added Device page flow: - Load Device config (`get_config` / `DEVICE_CONFIG`) - Save Device config via begin/set_config/commit - [x] Added Position page flow: - Load Position config (`get_config` / `POSITION_CONFIG`) - Save Position config via begin/set_config/commit - [x] Added Power page flow: - Load Power config (`get_config` / `POWER_CONFIG`) - Save Power config via begin/set_config/commit - [x] Added Display page flow: - Load Display config (`get_config` / `DISPLAY_CONFIG`) - Save Display config via begin/set_config/commit - [x] Added Bluetooth page flow: - Load Bluetooth config (`get_config` / `BLUETOOTH_CONFIG`) - Save Bluetooth config via begin/set_config/commit - [x] Added LoRa page flow: - Load LoRa config (`get_config` / `LORA_CONFIG`) - Save LoRa config via begin/set_config/commit - [x] Added MQTT page flow: - Load MQTT module config (`get_module_config` / `MQTT_CONFIG`) - Save MQTT module config via begin/set_module_config/commit - [x] Added Range test page flow: - Load Range test module config (`get_module_config` / `RANGETEST_CONFIG`) - Save Range test module config via begin/set_module_config/commit - [x] Refined MQTT map reporting controls for Android parity: - Put `Map reporting` and `Consent to share location` toggles on one line - Switched map position precision to a metric-labeled dropdown - Switched map publish interval to Android-aligned fixed interval dropdown options - [x] Aligned LoRa tab behavior with Android for preset/manual and frequency previews: - Hide manual modulation fields when `Use modem preset` is enabled (and hide preset selector when disabled) - Show effective frequency slot when raw `channel_num` is `0`, using Android-compatible hash/channel-count rules - Show effective frequency when raw `override_frequency` is `0`, using Android-compatible region/bandwidth math - Preserve raw `0` semantics on save for auto slot/frequency values - Show `PA fan disabled` only on supported hardware models (Android `hasPaFan` parity) - [x] Added Position fixed-coordinate editing flow: - Manual latitude/longitude/altitude fields on desktop Position tab - Save fixed coordinates via admin `set_fixed_position` / `remove_fixed_position` - Persist node altitude from position packets (domain store + SQLite) and reuse it to prefill fixed altitude on reload - Group Position flags into a dedicated `Position flags` block with compact two-row layout and simpler option labels - [x] Aligned Device/Position timing controls with Android fixed interval presets using shared select-style UX: - Device: `Node info broadcast interval` - Position: `Position broadcast interval`, `Smart minimum interval`, `GPS update interval` - Extracted preset second values into named constants with inline comments for maintainability - [x] Unified node-settings interval/select helpers across Device/Position/MQTT: - Single shared seconds-to-human-label formatter for interval dropdown labels - Shared `uint32` select option/parse/set helpers to avoid tab-specific duplication - [x] Switched all node settings tabs auto-load to lazy tab-open trigger to avoid eager startup reload timeouts - All following tabs should be implemented in the same way. - [x] Deferred first LoRa lazy-load until Node Settings sidebar tab is shown (`OnShow`) instead of app startup; kept one-time init guard so revisiting sidebar does not trigger redundant loads. - [x] Split node settings implementation into focused files (`node_settings_*.go`) for UI tabs/shared controls and app service operations. - [x] Kept `node_tab.go` as top-level orchestrator and moved User/Security page implementations and shared controls/helpers into dedicated files for easier navigation. - [x] Extracted reusable key text/clone helpers for node settings and clarified app admin send/wait helper roles with method-level comments. ## Milestones ### Milestone 1: Core editable pages - [x] LoRa page: load + save - [x] Security page: load + save - [x] Channels page: load + save (including safe edit model) - [ ] Page-specific validation and error messages for all three pages ### Milestone 2: Device configuration parity - [x] Device page - [x] Position page - [x] Power page - [x] Display page - [x] Bluetooth page ### Milestone 3: Module configuration parity - [x] MQTT - [ ] Serial - [ ] External notification - [ ] Store & Forward - [x] Range test - [ ] Telemetry - [ ] Neighbor Info - [ ] Status Message ### Milestone 4: Planned sections - [ ] Import/Export implementation - [ ] Maintenance implementation ## Guardrails (Must Keep) - Never send settings when not connected. - Never run more than one settings save at once. - Keep per-page save model (no multi-page batch save). - Preserve disabled-with-reason UX for unsupported features.
skobkin changed title from Node settings editing to Node settings support (WIP) 2026-02-16 02:32:19 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks Depends on
Reference
skobkin/meshgo#10
No description provided.