diff --git a/.skills/compose-ui/strings-index.txt b/.skills/compose-ui/strings-index.txt index 3f65eb3ed9..caf4dd661e 100644 --- a/.skills/compose-ui/strings-index.txt +++ b/.skills/compose-ui/strings-index.txt @@ -442,7 +442,6 @@ discovery_lora_presets_description discovery_map discovery_not_connected discovery_not_connected_description -discovery_paused discovery_preparing discovery_preset_home_label discovery_reconnecting diff --git a/core/resources/src/commonMain/composeResources/values/strings.xml b/core/resources/src/commonMain/composeResources/values/strings.xml index 93dec9c996..89ce130e06 100644 --- a/core/resources/src/commonMain/composeResources/values/strings.xml +++ b/core/resources/src/commonMain/composeResources/values/strings.xml @@ -472,7 +472,6 @@ Discovery Map Not Connected Connect to a Meshtastic device to start scanning. - Paused: %1$s Preparing scan %1$s (Home) Reconnecting on %1$s diff --git a/feature/discovery/README.md b/feature/discovery/README.md index f227852626..e41c55f0d4 100644 --- a/feature/discovery/README.md +++ b/feature/discovery/README.md @@ -9,7 +9,7 @@ The `:feature:discovery` module implements **Local Mesh Discovery**: the app cyc ## Scan Workflow - `DiscoveryScanEngine` — core scan engine. Cycles through a queue of `ScanTarget`s, dwells on each while collecting packets, and persists aggregated results via `DiscoveryDao`. -- `DiscoveryScanState` — state machine for the scan lifecycle: `Idle → Preparing → Shifting → [Reconnecting] → Dwell → … → Analysis → Complete`, with `Cancelling`/`Restoring`/`Failed`/`Paused` side paths. +- `DiscoveryScanState` — state machine for the scan lifecycle: `Idle → Preparing → Shifting → [Reconnecting] → Dwell → … → Analysis → Complete`, with `Cancelling`/`Restoring`/`Failed` side paths. - `ScanTarget` — one queue entry. `channel == null` is a public-preset target; a non-null channel is a beacon-advertised custom channel: the engine tunes the radio's primary channel to that name+PSK (and region) for the dwell, then restores it. - `DiscoveryRankingEngine` (`scan/`) — ranks preset results by unique node count, neighbor diversity, non-duplicate packet count, and SNR. - `Check24GhzCapability` (`scan/`) — layered heuristic that determines whether the connected radio supports 2.4 GHz LoRa (SX1280), returning `Supported` / `Unsupported` / `Unknown`. diff --git a/feature/discovery/src/commonMain/kotlin/org/meshtastic/feature/discovery/DiscoveryScanState.kt b/feature/discovery/src/commonMain/kotlin/org/meshtastic/feature/discovery/DiscoveryScanState.kt index 2faca4da16..e6b62aea82 100644 --- a/feature/discovery/src/commonMain/kotlin/org/meshtastic/feature/discovery/DiscoveryScanState.kt +++ b/feature/discovery/src/commonMain/kotlin/org/meshtastic/feature/discovery/DiscoveryScanState.kt @@ -20,10 +20,10 @@ package org.meshtastic.feature.discovery * State machine for a discovery scan lifecycle. * * ``` - * Idle → Preparing → Shifting → [Reconnecting] → Dwell → Shifting (loop) → Analysis → Complete(Success) - * Any scanning → Cancelling → Restoring → Complete(Cancelled) - * Any scanning → Failed(reason) → Restoring → Complete(Failed) - * Reconnecting timeout → Paused + * Idle → Preparing → Shifting → Reconnecting → Dwell → Shifting (loop) → Analysis → Complete(Success) + * Refused at start → Failed(reason) + * Shift error, reconnect timeout, or aborted dwell → Analysis → Complete(Failed) + * Any scanning → Cancelling → Complete(Cancelled) * ``` */ sealed interface DiscoveryScanState { @@ -48,9 +48,6 @@ sealed interface DiscoveryScanState { /** Scan finished and results are persisted. */ data class Complete(val outcome: CompletionOutcome = CompletionOutcome.Success) : DiscoveryScanState - /** Scan paused due to an unrecoverable transient condition (e.g. reconnect timeout). */ - data class Paused(val reason: String) : DiscoveryScanState - /** User-initiated cancellation in progress; persisting partial results before restoring home preset. */ data object Cancelling : DiscoveryScanState diff --git a/feature/discovery/src/commonMain/kotlin/org/meshtastic/feature/discovery/ui/DiscoveryScanScreen.kt b/feature/discovery/src/commonMain/kotlin/org/meshtastic/feature/discovery/ui/DiscoveryScanScreen.kt index 02f3dbffa0..6e415f7607 100644 --- a/feature/discovery/src/commonMain/kotlin/org/meshtastic/feature/discovery/ui/DiscoveryScanScreen.kt +++ b/feature/discovery/src/commonMain/kotlin/org/meshtastic/feature/discovery/ui/DiscoveryScanScreen.kt @@ -75,7 +75,6 @@ import org.meshtastic.core.resources.discovery_keep_screen_awake_description import org.meshtastic.core.resources.discovery_local_mesh import org.meshtastic.core.resources.discovery_not_connected import org.meshtastic.core.resources.discovery_not_connected_description -import org.meshtastic.core.resources.discovery_paused import org.meshtastic.core.resources.discovery_preparing import org.meshtastic.core.resources.discovery_reconnecting import org.meshtastic.core.resources.discovery_restoring_preset @@ -496,14 +495,6 @@ private fun ScanProgressSection(scanState: DiscoveryScanState, modifier: Modifie ) } - is DiscoveryScanState.Paused -> { - Text( - text = stringResource(Res.string.discovery_paused, scanState.reason), - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.error, - ) - } - is DiscoveryScanState.Failed -> { Text( text = stringResource(Res.string.discovery_scan_failed, scanState.reason), diff --git a/specs/20260507-161658-local-mesh-discovery/spec.md b/specs/20260507-161658-local-mesh-discovery/spec.md index cf8006ecf9..e1168b9fc6 100644 --- a/specs/20260507-161658-local-mesh-discovery/spec.md +++ b/specs/20260507-161658-local-mesh-discovery/spec.md @@ -423,7 +423,6 @@ These features were added during implementation for safety, reliability, and cro | Feature | Description | File(s) | |---|---|---| | Interrupted session recovery | `markInterruptedSessions()` DAO query on ViewModel init marks any lingering `in_progress` sessions as `interrupted`. Handles app process death mid-scan. | `DiscoveryDao.kt`, `DiscoveryViewModel.kt` | -| Paused scan state | `DiscoveryScanState.Paused` provides a recoverable grace period during BLE reconnect before transitioning to `Failed`. Original spec only had direct `WaitingForReconnect → Failed`. | `DiscoveryScanState.kt` | | Infrastructure node classification | Nodes with `ROUTER`, `ROUTER_LATE`, or `CLIENT_BASE` roles flagged via `isInfrastructure` on entity. `infrastructureNodeCount` aggregated per preset result. Aligns with Apple's relay/infrastructure tracking. | `DiscoveryScanEngine.kt`, `DiscoveredNodeEntity.kt`, `DiscoveryPresetResultEntity.kt` | | Active NeighborInfo request | Engine actively requests `NeighborInfo` at dwell start and mid-dwell via `radioController.requestNeighborInfo()`. Original spec mentioned only passive collection. | `DiscoveryScanEngine.kt` | | Deprecated preset filtering | `VERY_LONG_SLOW` and `LONG_SLOW` presets hidden from picker per meshtastic/design standards deprecation. | `PresetPickerCard.kt` |