Commit Graph

91 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
0167063497 feat(analytics): expand DataDog RUM integration and align with iOS parity (#4970) 2026-04-01 20:27:28 +00:00
James Rich
e249461e3c feat(tak): introduce built-in Local TAK Server and mesh integration (#4951)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-04-01 20:21:25 +00:00
James Rich
c75c9b34d6 feat: implement XModem file transfers and enhance BLE connection robustness (#4959) 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
6516287c62 refactor: BLE transport and UI for Kotlin Multiplatform unification (#4911)
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)
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
a0b4c56505 feat: optimistically persist local configs and channels (#4898)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-23 19:57:45 +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
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
cb95cace25 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4832) 2026-03-17 16:51:09 -05:00
James Rich
807db83f53 feat: service extraction (#4828) 2026-03-17 14:06:01 -05:00
James Rich
8c964a15ca feat: Integrate notification management and preferences across platforms (#4819)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-17 01:17:34 +00:00
James Rich
427c0f3bbb fix: fix animation stalls and update dependencies for stability (#4784)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-13 23:01:17 +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
0ce322a0f5 feat: Migrate project to Kotlin Multiplatform (KMP) architecture (#4738)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-07 02:43:45 +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
b9b68d2779 refactor: migrate preferences to DataStore and decouple core:domain for KMP (#4731) 2026-03-05 20:37:35 -06:00
James Rich
87fdaa26ff refactor: enhance handshake stall guard and extend coverage to Stage 2 (#4730) 2026-03-05 16:06:21 -06:00
James Rich
b0258d0cf1 feat: Add "Mark all as read" and unread message count indicators (#4720) 2026-03-05 18:18:34 +00:00
James Rich
6a858acb4a refactor: migrate :core:database to Room Kotlin Multiplatform (#4702) 2026-03-03 20:44:34 -06: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
8c6bd8ab7a feat: settings rework part 2, domain and usecase abstraction, tests (#4680)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-02 18:15:33 +00:00
James Rich
fdd07f893f feat: settings rework (#4678)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-02 14:51:05 +00:00
James Rich
0a6fcc830a feat(maps): Google maps improvements for network and offline tilesources (#4664)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-27 14:36:56 +00:00
James Rich
9970d31520 feat(widget): Add Local Stats glance widget (#4642)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-25 19:39:00 +00:00
James Rich
2676a51647 refactor(ui): compose resources, domain layer (#4628)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-23 03:39: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
c690ddc7ea feat: Accurately display outgoing diagnostic packets (#4569)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-16 22:09:21 +00:00
James Rich
5ca2ab4695 refactor(time): Centralize time handling with kotlinx-datetime (#4545)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-14 02:01:07 +00:00
James Rich
fce8e7cd08 feat(db): Add sender-based message filtering (#4477)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-06 15:13:59 +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
Mac DeCourcy
c0f8ed3503 feat: word-based message filtering with quarantine approach (stored but hidden) (#4241) 2026-01-24 16:41:17 +00:00
James Rich
b73a304452 refactor(firmware): Simplify ESP32 firmware check (#4272)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-01-21 02:42:16 +00:00
James Rich
45227fb142 feat(test): Add comprehensive unit and instrumentation tests (#4260)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-01-20 01:52:03 +00:00
James Rich
3b0dda4491 fix(node): Correct owner ID and local user detection (#4256)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-01-19 03:20:40 +00:00
James Rich
75a3f89f51 feat(firmware): Use pio_env to select correct firmware variant (#4244)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-01-16 16:51:55 +00:00