Commit graph

50 commits

Author SHA1 Message Date
James Rich
a74d5d470a feat(core): implement batched node info handling for mesh handshake
This commit optimizes the mesh handshake protocol by introducing explicit support for `NodeInfoBatch` messages. It updates the configuration flow to handle both primary batched node delivery and legacy single-node delivery for backwards compatibility with older firmware.

Key changes include:

- **Batch Processing Optimization:**
    - Added `handleNodeInfoBatch` to the `MeshConfigFlowManager` interface to allow bulk processing of node information, reducing per-item overhead during the initial handshake.
    - Updated `MeshConfigFlowManagerImpl` to accumulate batched nodes efficiently using `addAll`.
    - Refactored `FromRadioPacketHandlerImpl` to delegate batch processing directly to the manager instead of iterating through individual items.

- **Handshake Protocol Updates:**
    - Updated `HandshakeConstants` to distinguish between `BATCH_NODE_INFO_NONCE` (primary Stage 2) and `NODE_INFO_NONCE` (legacy Stage 2).
    - Modified `handleConfigComplete` logic to trigger Stage 2 completion for both batched and legacy nonces.
    - Ensured `MeshConnectionManager` prioritizes the batch nonce when requesting node information.

- **Testing & Simulation:**
    - Created `MeshConfigFlowManagerImplTest` to validate node accumulation, batch handling, and handshake nonce routing.
    - Improved `MockInterface` to better simulate real-world packet ordering by delaying live traffic until after the handshake completion coroutine has processed the node database.
    - Added verification tests to ensure the connection manager uses the correct batching nonces.

Specific changes:
- Added `handleNodeInfoBatch` implementation to `MeshConfigFlowManagerImpl`.
- Updated documentation in `HandshakeConstants` regarding two-stage mesh handshake protocol.
- Refactored `MockInterface.sendStage2NodeInfoResponse` to handle packet encoding and simulation delays.
- Added unit tests covering edge cases for empty and mixed node info batches.
2026-04-03 10:51:17 -05:00
James Rich
b708b2ff76 feat: implement batched NodeInfo delivery in handshake protocol
This commit introduces support for `NodeInfoBatch` messages, allowing the application to receive and process multiple node records efficiently during the second stage of the device handshake. This replaces the legacy approach of sending node information individually, improving synchronization performance.

Key changes include:

- **Handshake Protocol:**
    - Added `BATCH_NODE_INFO_NONCE` to `HandshakeConstants`.
    - Updated `MeshConnectionManagerImpl` to request batched node information by default during the handshake process.
    - Updated `MeshConfigFlowManagerImpl` to handle the batch-specific completion nonce, ensuring Stage 2 of the handshake finalizes correctly.

- **Packet Handling:**
    - Enhanced `FromRadioPacketHandlerImpl` to detect `node_info_batch` packets.
    - Implemented logic to iterate through batched items and process each `NodeInfo` record via the `MeshConfigFlowManager`.
    - Updated connection progress reporting to reflect the count of nodes received within a batch.

- **Testing and Simulation:**
    - Updated `MockInterface` to simulate batched node delivery, refactoring the mock response logic into distinct Stage 1 (config) and Stage 2 (node info) phases.
    - Added a unit test in `FromRadioPacketHandlerImplTest` to verify that batched items are correctly routed and that the UI connection status is updated.

Specific changes:
- Modified `HandshakeConstants` to document the transition to batched NodeInfo delivery in Stage 2.
- Updated `MeshConnectionManagerImpl.startNodeInfoOnly()` to use the new batch nonce.
- Added `nodeInfoBatch` processing branch to the `handleFromRadio` logic.
2026-04-03 10:51:17 -05:00
James Rich
51251ab16a
feat(ci): shard test suite and enable JUnit 5 parallel execution (#4977) 2026-04-03 13:08:49 +00:00
James Rich
6a5115b897
Refactor navigation to use NodeDetail route and fix radio settings (#4960) 2026-03-31 14:03:02 +00:00
James Rich
c75c9b34d6
feat: implement XModem file transfers and enhance BLE connection robustness (#4959)
Some checks are pending
Dependency Submission / dependency-submission (push) Waiting to run
Main CI (Verify & Build) / validate-and-build (push) Waiting to run
Main Push Changelog / Generate main push changelog (push) Waiting to run
2026-03-31 03:49:31 +00:00
James Rich
a005231d94
Refactor map layer management and navigation infrastructure (#4921)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-26 00:29:24 +00:00
James Rich
8ce17defb7
refactor: remove demoscenario and enhance BLE connection stability (#4914)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-25 14:24:42 +00:00
James Rich
6516287c62
refactor: BLE transport and UI for Kotlin Multiplatform unification (#4911)
Some checks are pending
Dependency Submission / dependency-submission (push) Waiting to run
Main CI (Verify & Build) / validate-and-build (push) Waiting to run
Main Push Changelog / Generate main push changelog (push) Waiting to run
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-25 02:15:51 +00:00
James Rich
96060a0a4d
refactor: coroutine dispatchers and modernize testing infrastructure (#4901)
Some checks are pending
Dependency Submission / dependency-submission (push) Waiting to run
Main CI (Verify & Build) / validate-and-build (push) Waiting to run
Main Push Changelog / Generate main push changelog (push) Waiting to run
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-24 01:31:48 +00:00
James Rich
664ebf218e
refactor: null safety, update date/time libraries, and migrate tests (#4900)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-23 23:17:50 +00:00
James Rich
b3b38acc0b
feat: Migrate networking to Ktor and enhance multiplatform support (#4890)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-23 16:48:10 +00:00
James Rich
c38bfc64de
Refactor command handling, enhance tests, and improve discovery logic (#4878)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-22 05:42:27 +00:00
James Rich
d136b162a4
feat: Implement iOS support and unify Compose Multiplatform infrastructure (#4876) 2026-03-21 23:19:13 +00:00
James Rich
88d11aafec
fix: Update messaging feature with contact item keys and MQTT limits (#4871) 2026-03-21 14:25:23 +00:00
James Rich
3bd8669cbe
fix: Implement reconnection logic and stabilize BLE connection flow (#4870) 2026-03-21 12:49:03 +00:00
James Rich
c4087c2ab7
feat: Migrate to Room 3.0 and update related documentation and tracks (#4865) 2026-03-20 21:40:08 +00:00
James Rich
b982b145e6
feat: Implement KMP ServiceDiscovery for TCP devices (#4854) 2026-03-19 17:19:58 +00:00
James Rich
06b9f8c77a
feat: Enhance test coverage (#4847)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-19 03:09:19 +00:00
James Rich
dcbbc0823b
feat: Integrate Mokkery and Turbine into KMP testing framework (#4845) 2026-03-18 18:33:37 -05:00
James Rich
d314ee2d8a
feat: mqtt (#4841) 2026-03-18 18:39:20 +00:00
James Rich
59408ef46e
feat: Desktop USB serial transport (#4836)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-18 12:42:24 +00:00
James Rich
cb95cace25
chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4832) 2026-03-17 16:51:09 -05:00
James Rich
7d63f8b824
feat: build logic (#4829)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-17 20:35:39 +00:00
James Rich
807db83f53
feat: service extraction (#4828) 2026-03-17 14:06:01 -05:00
James Rich
0b2e89c46f
refactor: Replace Nordic, use Kable backend for Desktop and Android with BLE support (#4818)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-16 23:06:43 +00:00
James Rich
6e81ceec91
feat: Complete ViewModel extraction and update documentation (#4817) 2026-03-16 20:05:50 +00:00
James Rich
eb3349fa11
chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4773) 2026-03-12 22:15:20 -05:00
James Rich
ac6bb5479b
feat: introduce Desktop target and expand Kotlin Multiplatform (KMP) architecture (#4761)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-12 21:14:49 +00:00
James Rich
875cf1cff2
refactor: migrate from Hilt to Koin and expand KMP common modules (#4746)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-10 01:19:46 +00:00
James Rich
182ad933f4
chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4737) 2026-03-06 16:39:05 -06:00
James Rich
cffbd08806
refactor: migrate core modules to Kotlin Multiplatform and consolidat… (#4735)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-06 22:06:50 +00:00
James Rich
05e2c5d457
chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4692) 2026-03-03 15:19:40 +00:00
James Rich
2c49db8041
feat/decoupling (#4685)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-03 13:15:28 +00:00
James Rich
145cde9393
chore(deps): bump deps to take advantage of new functionality (#4658)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-26 13:26:50 +00:00
James Rich
6bfa5b5f70
refactor(ble): Centralize BLE logic into a core module (#4550)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-20 12:41:52 +00:00
James Rich
3eefa801d6
refactor(build): Introduce AndroidLibraryFlavors convention plugin (#4449) 2026-02-04 16:01:09 -06:00
James Rich
e055d22346
chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4438) 2026-02-04 02:41:48 +00:00
James Rich
25657e8f8f
feat(wire): migrate from protobuf -> wire (#4401)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-04 00:01:12 +00:00
James Rich
f9cc7080f8
chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4363) 2026-01-29 22:36:33 +00:00
James Rich
e470fa86eb
chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4237) 2026-01-16 01:06:42 +00:00
James Rich
731430d7d6
refactor(build): Centralize Dokka configuration into convention plugin (#4173)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-01-09 15:40:00 +00:00
James Rich
7744a42e1c
refactor(deps): inject CoroutineDispatchers (#4170)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-01-08 23:40:26 +00:00
James Rich
9fd92691a9
refactor: Migrate to Android Gradle Plugin 9.0 (#4072)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2025-12-28 13:47:12 +00:00
James Rich
42bc85b6fc
feat(build): add module dependency graph generation (#4042) 2025-12-18 17:30:36 -06:00
Phil Oliver
4b3ae721a0
Remove ktorfit (#4019) 2025-12-16 21:52:29 +00:00
Phil Oliver
da65dfdd15
Remove remaining unused dependencies in :core:* (#3387) 2025-10-08 00:08:48 +00:00
Phil Oliver
59916a4cbe
Remove version catalog bundles (#3370) 2025-10-07 10:23:12 +00:00
James Rich
04991dbc5a
feat(network): add http cache to OkHttpClient (#3290)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2025-10-02 11:03:01 +00:00
Phil Oliver
4eba3e9daf
Modularize more models/utils (#3182) 2025-09-24 15:43:46 +00:00
Phil Oliver
0d2c1f1516
New core modules for :model, :navigation, :network, :prefs (#3147) 2025-09-19 12:16:36 +00:00