mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-05-12 00:28:20 -04:00
docs(specs): mark 22 brownfield gap tasks complete
Update tasks.md across specs 004-017 to reflect completed gap remediation work: test coverage additions, constitution violation fixes, and documentation improvements. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -227,7 +227,7 @@
|
||||
|
||||
## Gap Tasks (Identified During Migration)
|
||||
|
||||
### MSG-T029: Fix hardcoded English strings in SelectionToolbar [ ]
|
||||
### MSG-T029: Fix hardcoded English strings in SelectionToolbar [x]
|
||||
|
||||
- **File**: `feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/ui/contact/Contacts.kt` (lines 468–470)
|
||||
- **Issue**: `contentDescription` for mute/unmute icons uses hardcoded `"Mute selected"` / `"Unmute selected"` instead of `stringResource()`.
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
- [ ] DC-T036 `[GAP]` [US1] Write `AndroidScannerViewModelTest` in `feature/connections/src/androidTest/` — test `requestBonding()` success/failure paths, `requestPermission()` USB flow, `SecurityException` handling, "bond state 11" special case. *Rationale: Android-specific bonding and permission logic has no test coverage.*
|
||||
- [ ] DC-T037 `[GAP]` [US1/US5] Write Compose UI tests for `ConnectionsScreen` in `feature/connections/src/commonTest/` — test `AnimatedContent` state transitions (NO_DEVICE → CONNECTING → CONNECTED), transport chip toggles, device card selection. *Rationale: All existing tests are ViewModel/use-case level; no UI-layer test coverage.*
|
||||
- [ ] DC-T038 `[GAP]` Add KDoc to `ConnectionActionButtonStyle.kt` — document each enum value (`Filled`, `Tonal`, `Outlined`, `Text`) with usage context. *Rationale: Only enum in the module without documentation.*
|
||||
- [x] DC-T038 `[GAP]` Add KDoc to `ConnectionActionButtonStyle.kt` — document each enum value (`Filled`, `Tonal`, `Outlined`, `Text`) with usage context. *Rationale: Only enum in the module without documentation.*
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
|
||||
## Identified Gaps
|
||||
|
||||
- [ ] **FW-T059**: Add `WifiOtaTransport` unit tests
|
||||
- [x] **FW-T059**: Add `WifiOtaTransport` unit tests
|
||||
The WiFi/TCP OTA transport has no dedicated test coverage. Should test connection, command sending, response reading, firmware streaming, and error handling using a fake Ktor socket.
|
||||
|
||||
- [ ] **FW-T060**: Add `FirmwareUpdateScreen` composable/screenshot tests
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
## Identified Gaps
|
||||
|
||||
### NDM-T100: Missing — MetricsViewModel CSV export tests for device/environment/signal/power
|
||||
- [ ] Add unit tests for `saveDeviceMetricsCSV`, `saveEnvironmentMetricsCSV`, `saveSignalMetricsCSV`, `savePowerMetricsCSV` verifying correct column headers and data formatting
|
||||
- [x] Add unit tests for `saveDeviceMetricsCSV`, `saveEnvironmentMetricsCSV`, `saveSignalMetricsCSV`, `savePowerMetricsCSV` verifying correct column headers and data formatting
|
||||
- **Rationale**: Only `savePositionCSV` has a test; the other four export methods are untested.
|
||||
- **Priority**: Medium
|
||||
|
||||
@@ -302,8 +302,8 @@
|
||||
- **Priority**: Low
|
||||
|
||||
### NDM-T102: Missing — Compass accuracy edge cases
|
||||
- [ ] Add tests for `calculatePositionalAccuracyMeters` with various DOP combinations (PDOP-only, HDOP+VDOP, HDOP-only, precision-bits-only, and none)
|
||||
- [ ] Add test for `calculateAngularError` when distance is zero
|
||||
- [x] Add tests for `calculatePositionalAccuracyMeters` with various DOP combinations (PDOP-only, HDOP+VDOP, HDOP-only, precision-bits-only, and none)
|
||||
- [x] Add test for `calculateAngularError` when distance is zero
|
||||
- **Rationale**: `CompassViewModelTest` exists but accuracy calculation branch coverage is not verified.
|
||||
- **Priority**: Medium
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
- **Priority**: Low
|
||||
|
||||
### NDM-T104: Missing — Remote admin session timeout testing
|
||||
- [ ] Add `NodeDetailViewModelTest` coverage for `openRemoteAdmin` with `Disconnected` and `Timeout` session results
|
||||
- [x] Add `NodeDetailViewModelTest` coverage for `openRemoteAdmin` with `Disconnected` and `Timeout` session results
|
||||
- **Rationale**: Only `Mute` and `TraceRoute` actions are tested; session error paths are untested.
|
||||
- **Priority**: Medium
|
||||
|
||||
@@ -335,6 +335,6 @@
|
||||
| Compass | 2 | 2 | 0 |
|
||||
| Navigation | 1 | 1 | 0 |
|
||||
| Testing | 10 | 10 | 0 |
|
||||
| **Gaps** | 6 | 0 | **6** |
|
||||
| **Total** | **46** | **40** | **6** |
|
||||
| **Gaps** | 6 | 3 | **3** |
|
||||
| **Total** | **46** | **43** | **3** |
|
||||
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
- Target: `commonTest/radio/ProfileRoundTripTest.kt`
|
||||
- Gap: Import and export are tested individually but not end-to-end
|
||||
|
||||
- [ ] **SET-T074**: Add test for MQTT probe timeout and error path (`probeMqttConnection` exception handling, `clearMqttProbeStatus`)
|
||||
- [x] **SET-T074**: Add test for MQTT probe timeout and error path (`probeMqttConnection` exception handling, `clearMqttProbeStatus`)
|
||||
- Target: `commonTest/radio/RadioConfigViewModelTest.kt` (extend)
|
||||
- Gap: MQTT probe not tested
|
||||
|
||||
@@ -340,7 +340,7 @@
|
||||
- Target: `commonTest/AdministrationAccessibilityTest.kt`
|
||||
- Gap: No accessibility testing exists
|
||||
|
||||
- [ ] **SET-T076**: Add test for `SettingsViewModel.saveDataCsv()` verifying CSV export through `FileService` and `ExportDataUseCase`
|
||||
- [x] **SET-T076**: Add test for `SettingsViewModel.saveDataCsv()` verifying CSV export through `FileService` and `ExportDataUseCase`
|
||||
- Target: `commonTest/SettingsViewModelTest.kt` (extend)
|
||||
- Gap: CSV export function exists but is not tested
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
**Purpose**: Address identified coverage gaps in the existing implementation.
|
||||
|
||||
- [ ] MAP-T022 [US3] **[GAP]** Add unit tests for waypoint expiration filtering logic in `BaseMapViewModel` — test that waypoints with `expire > nowSeconds` are included, `expire <= nowSeconds` are excluded, and `expire == 0` (never expires) are always included. File: `feature/map/src/commonTest/.../BaseMapViewModelTest.kt`. (SC-003)
|
||||
- [x] MAP-T022 [US3] **[GAP]** Add unit tests for waypoint expiration filtering logic in `BaseMapViewModel` — test that waypoints with `expire > nowSeconds` are included, `expire <= nowSeconds` are excluded, and `expire == 0` (never expires) are always included. File: `feature/map/src/commonTest/.../BaseMapViewModelTest.kt`. (SC-003)
|
||||
- [ ] MAP-T023 [US1,US5] **[GAP]** Add Compose UI tests for `MapControlsOverlay` and `MapButton` composables — verify compass rotation, filter button click, location tracking toggle icon switch, refresh spinner visibility. File: `feature/map/src/commonTest/.../component/MapControlsOverlayTest.kt`. (NFR-001)
|
||||
|
||||
**Dependencies**: Phase 4 testing infrastructure.
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
- Verify reconnect on network recovery.
|
||||
- **Priority**: Medium
|
||||
|
||||
### DAT-T028: Add MeshRouterImpl unit tests [ ]
|
||||
### DAT-T028: Add MeshRouterImpl unit tests [x]
|
||||
|
||||
- **File to create**: `commonTest/.../manager/MeshRouterImplTest.kt`
|
||||
- Cover service action routing: send message, request position, traceroute, admin commands.
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
- Verify state transitions, profile access, disconnect handling.
|
||||
- **Priority**: Medium
|
||||
|
||||
### BLE-T020: Add KableBleScanner unit tests [ ]
|
||||
### BLE-T020: Add KableBleScanner unit tests [x]
|
||||
|
||||
- **File to create**: `commonTest/.../KableBleConnectionTest.kt`
|
||||
- Test scan flow emissions, timeout behavior, service UUID filtering.
|
||||
|
||||
@@ -179,13 +179,13 @@
|
||||
- Test USB attach/detach event handling; serial parameter configuration.
|
||||
- **Priority**: Medium
|
||||
|
||||
### NET-T024: Expand MQTT test coverage [ ]
|
||||
### NET-T024: Expand MQTT test coverage [x]
|
||||
|
||||
- **File to extend**: `commonTest/.../MQTTRepositoryImplTest.kt`
|
||||
- Add tests: topic pattern construction, JSON decode, protobuf decode, reconnect, subscription failure.
|
||||
- **Priority**: Medium
|
||||
|
||||
### NET-T025: Add HeartbeatSender unit test [ ]
|
||||
### NET-T025: Add HeartbeatSender unit test [x]
|
||||
|
||||
- **File to create**: `commonTest/.../HeartbeatSenderTest.kt`
|
||||
- Test periodic interval, cancellation, edge cases.
|
||||
|
||||
@@ -131,19 +131,19 @@
|
||||
|
||||
## Gap Tasks (Incomplete)
|
||||
|
||||
### DB-T017: Add Converters round-trip tests [ ]
|
||||
### DB-T017: Add Converters round-trip tests [x]
|
||||
|
||||
- **File to create**: `commonTest/.../ConvertersTest.kt`
|
||||
- Test proto ↔ ByteArray, ByteString ↔ ByteArray round-trips for all converter methods.
|
||||
- **Priority**: Low
|
||||
|
||||
### DB-T018: Add missing DAO tests [ ]
|
||||
### DB-T018: Add missing DAO tests [x]
|
||||
|
||||
- **Files to create**: `commonTest/.../dao/CommonQuickChatActionDaoTest.kt`, `CommonMeshLogDaoTest.kt`, etc.
|
||||
- Cover CRUD + reactive query behavior for untested DAOs.
|
||||
- **Priority**: Medium
|
||||
|
||||
### DB-T019: Add withDb() concurrent retry test [ ]
|
||||
### DB-T019: Add withDb() concurrent retry test [x]
|
||||
|
||||
- **File to create**: `commonTest/.../DatabaseManagerRetryTest.kt`
|
||||
- Simulate DB switch during active `withDb()` query; verify retry succeeds.
|
||||
|
||||
@@ -153,13 +153,13 @@
|
||||
|
||||
## Gap Tasks (Incomplete)
|
||||
|
||||
### SVC-T021: Add ServiceRepositoryImpl unit tests [ ]
|
||||
### SVC-T021: Add ServiceRepositoryImpl unit tests [x]
|
||||
|
||||
- **File to create**: `commonTest/.../ServiceRepositoryImplTest.kt`
|
||||
- Test all state flow emissions: connection, errors, packets, actions, traceroute.
|
||||
- **Priority**: Medium
|
||||
|
||||
### SVC-T022: Add DirectRadioControllerImpl tests [ ]
|
||||
### SVC-T022: Add DirectRadioControllerImpl tests [x]
|
||||
|
||||
- **File to create**: `commonTest/.../DirectRadioControllerImplTest.kt`
|
||||
- Test direct radio control operations (send, request config, disconnect).
|
||||
|
||||
@@ -132,13 +132,13 @@
|
||||
|
||||
## Gap Tasks (Incomplete)
|
||||
|
||||
### MDL-T018: Add Node domain model unit tests [ ]
|
||||
### MDL-T018: Add Node domain model unit tests [x]
|
||||
|
||||
- **File to create**: `commonTest/.../NodeTest.kt`
|
||||
- Test `isOnline` boundary values, `distance()` with known coordinates, `bearing()` cardinal directions, `colors` contrast, `createFallback()`, `getRelayNode()`.
|
||||
- **Priority**: Medium
|
||||
|
||||
### MDL-T019: Add MeshDataMapper tests [ ]
|
||||
### MDL-T019: Add MeshDataMapper tests [x]
|
||||
|
||||
- **File to create**: `commonTest/.../util/MeshDataMapperTest.kt`
|
||||
- Test proto → domain mapping for User, Position, DeviceMetrics, EnvironmentMetrics.
|
||||
@@ -156,7 +156,7 @@
|
||||
- Metric ↔ imperial conversion, distance formatting for known values.
|
||||
- **Priority**: Low
|
||||
|
||||
### MDL-T022: Add DataPacket + Message tests [ ]
|
||||
### MDL-T022: Add DataPacket + Message tests [x]
|
||||
|
||||
- **File to create**: `commonTest/.../DataPacketTest.kt`
|
||||
- Test `nodeNumToDefaultId`, equality, display formatting.
|
||||
|
||||
Reference in New Issue
Block a user