Skip to content

Commit 51fff3c

Browse files
jamesarichCopilot
andcommitted
refactor: merge MeshActionHandler into DirectRadioControllerImpl (SDK-aligned)
Eliminate the AIDL-era intermediate handler layer by absorbing all MeshActionHandler business logic directly into DirectRadioControllerImpl, following the meshtastic-sdk's AdminApiImpl pattern. Changes: - Delete MeshActionHandler interface and MeshActionHandlerImpl - DirectRadioControllerImpl now builds AdminMessage protos directly with no ByteArray encode/decode boundaries (typed protos all the way) - Remove actionHandler from MeshRouter interface and impl - Update EnsureRemoteAdminSessionUseCase to use RadioController directly - Update DI modules (Android annotations + Desktop Koin DSL) - Rewrite DirectRadioControllerImplTest for the merged architecture - Update MeshRouterImplTest and MeshServiceOrchestratorTest Architecture: Before: ViewModel → RadioController → Handler → CommandSender After: ViewModel → RadioController → CommandSender Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 45b6ddd commit 51fff3c

13 files changed

Lines changed: 367 additions & 1274 deletions

File tree

core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/MeshActionHandlerImpl.kt

Lines changed: 0 additions & 376 deletions
This file was deleted.

core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/MeshRouterImpl.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package org.meshtastic.core.data.manager
1818

1919
import org.koin.core.annotation.Single
20-
import org.meshtastic.core.repository.MeshActionHandler
2120
import org.meshtastic.core.repository.MeshConfigFlowManager
2221
import org.meshtastic.core.repository.MeshConfigHandler
2322
import org.meshtastic.core.repository.MeshDataHandler
@@ -37,7 +36,6 @@ class MeshRouterImpl(
3736
private val neighborInfoHandlerLazy: Lazy<NeighborInfoHandler>,
3837
private val configFlowManagerLazy: Lazy<MeshConfigFlowManager>,
3938
private val mqttManagerLazy: Lazy<MqttManager>,
40-
private val actionHandlerLazy: Lazy<MeshActionHandler>,
4139
private val xmodemManagerLazy: Lazy<XModemManager>,
4240
) : MeshRouter {
4341
override val dataHandler: MeshDataHandler
@@ -58,9 +56,6 @@ class MeshRouterImpl(
5856
override val mqttManager: MqttManager
5957
get() = mqttManagerLazy.value
6058

61-
override val actionHandler: MeshActionHandler
62-
get() = actionHandlerLazy.value
63-
6459
override val xmodemManager: XModemManager
6560
get() = xmodemManagerLazy.value
6661
}

0 commit comments

Comments
 (0)