Commit Graph

848 Commits

Author SHA1 Message Date
James Rich
d3ae49781b refactor(lockdown): extract interfaces and move coordinator to commonMain
Phase 2 foundational refactor:
- T006: Extract LockdownPassphraseStore interface to core/repository
- T007: Make concrete Android impl implement the interface (renamed to Impl)
- T008: Add JVM/Desktop no-op passphrase store stub
- T010: Move coordinator state machine from core/service/androidMain to
  core/data/commonMain as LockdownCoordinatorImpl (pure KMP, no Android deps)
- Remove old LockdownHandlerImpl (superseded)
- Convert KoinComponent lazy inject to constructor injection
2026-05-13 09:09:15 -05:00
James Rich
d25136f83e fix: resolve compile errors from PR merge
- Replace java.text.DateFormat/java.util.Date usage in SecurityConfigScreen
  (constitution violation: no java.* in commonMain) with simplified Lock Now button
- Replace material.icons imports with MeshtasticIcons in LockdownUnlockDialog
- Proper token info display to be re-implemented in Phase 5 (T025-T026)
2026-05-13 09:03:11 -05:00
James Rich
c9c416ee1c Merge branch 'features/lockdown-v2' of https://github.com/meshtastic/Meshtastic-Android into feat/lockdown-mode
# Conflicts:
#	app/src/main/kotlin/org/meshtastic/app/ui/Main.kt
#	core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/CommandSenderImpl.kt
#	core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/FromRadioPacketHandlerImpl.kt
#	core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/MeshActionHandlerImpl.kt
#	core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/MeshConnectionManagerImpl.kt
#	core/repository/src/commonMain/kotlin/org/meshtastic/core/repository/MeshConnectionManager.kt
#	feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/ConnectionsScreen.kt
#	feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/RadioConfigViewModel.kt
2026-05-13 08:54:22 -05:00
niccellular
0c8e5302e4 feat(lockdown): wire AIDL, RadioController, and ViewModels
- IMeshService: sendLockdownUnlock(passphrase, bootTtl, hourTtl) and
  sendLockNow() AIDL methods.
- MeshService: AIDL stubs forwarding to MeshActionHandler.
- AndroidRadioControllerImpl: forward to meshService over AIDL.
- DirectRadioControllerImpl: forward directly to actionHandler (in-process
  non-Android targets).
- FakeIMeshService: test stubs.
- UIViewModel: lockdownState/lockdownTokenInfo flows, sendLockdownUnlock,
  sendLockNow, clearLockdownState. Routed through radioController so the
  commonMain code does not depend on the AIDL service directly.
- ConnectionsViewModel: expose lockdownState.
- RadioConfigViewModel: lockdownTokenInfo + sendLockNow for the Lock Now
  button in security settings.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 09:01:03 -04:00
niccellular
f6e97d7ff7 feat(lockdown): implement coordinator and typed status dispatch
- CommandSenderImpl: build AdminMessage.lockdown_auth = LockdownAuth(...)
  for provision/unlock and lock_now=true for the lock command.
- FromRadioPacketHandlerImpl: route the new FromRadio.lockdown_status
  variant to the coordinator; also notify the coordinator on
  config_complete_id.
- MeshActionHandlerImpl: forward handleSendLockdownUnlock/handleSendLockNow
  to the coordinator.
- MeshConnectionManagerImpl: call coordinator.onConnect/onDisconnect; add
  clearRadioConfig to purge cached config after a lock-now ACK.
- ServiceRepositoryImpl: back the lockdownState/lockdownTokenInfo/
  sessionAuthorized flows.
- LockdownHandlerImpl: orchestration. Switches on LockdownStatus.State
  (NEEDS_PROVISION / LOCKED / UNLOCKED / UNLOCK_FAILED), auto-replays
  stored passphrase on LOCKED, clears stored passphrase on a fresh
  UNLOCK_FAILED, surfaces backoff_seconds on rate-limit. Tracks a
  wasLockNow flag locally so the next LOCKED status after a lock-now
  command is translated to LockdownState.LockNowAcknowledged for an
  immediate UI disconnect (the new schema has no explicit ACK type).
- LockdownPassphraseStore: per-device EncryptedSharedPreferences store
  for auto-unlock. Not biometric-gated by design.
- Add androidx.security:security-crypto dependency.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 09:00:53 -04:00
niccellular
913c3c2ad1 feat(lockdown): add LockdownState model and coordinator interfaces
Introduce the TAK passphrase lockdown abstractions:

- LockdownState sealed class + LockdownTokenInfo for UI to observe.
- LockdownCoordinator interface for the authentication lifecycle
  (onConnect/onDisconnect/onConfigComplete/handleLockdownStatus,
  plus submitPassphrase/lockNow).
- Add sendLockdownPassphrase/sendLockNow to CommandSender, RadioController.
- Add handleSendLockdownUnlock/handleSendLockNow to MeshActionHandler.
- Add clearRadioConfig to MeshConnectionManager (used during lock-now).
- Add lockdownState/lockdownTokenInfo/sessionAuthorized flows to
  ServiceRepository.

handleLockdownStatus consumes the typed firmware LockdownStatus message
from FromRadio (protobufs#911) instead of parsing string-prefixed
ClientNotification messages.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 09:00:41 -04:00
James Rich
dcb147163c fix: clarify position precision as ± radius (#5428) 2026-05-12 10:24:29 -05:00
renovate[bot]
05b1ea918e chore(deps): update core/proto/src/main/proto digest to 1c62540 (#5421)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-12 08:25:55 -05:00
James Rich
0f2b1c064a fix: clamp future lastHeard timestamps to current time on ingestion (#5418)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-12 07:35:11 -05:00
James Rich
09a0d123be chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#5416)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2026-05-12 06:21:59 -05:00
renovate[bot]
56077db6d9 chore(deps): update core/proto/src/main/proto digest to 1c62540 (#5413)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-12 06:20:48 -05:00
James Rich
85c840de32 feat: add Compose Preview Screenshot Testing infrastructure (#5410)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-12 02:18:23 +00:00
James Rich
10c5b5db2e feat(api): add hasAnyEntries method to local data sources and improve… (#5406) 2026-05-11 19:34:41 -05:00
James Rich
82135df865 Update notification intents and deep link URI format (#5408)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-11 19:34:24 -05:00
renovate[bot]
d847818487 chore(deps): update core/proto/src/main/proto digest to 1c62540 (#5404)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-11 17:31:01 -05:00
James Rich
313dc1c2f7 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#5400) 2026-05-11 17:28:06 -05:00
James Rich
95c3bc0bce Brownfield gap remediation: 28 tasks + intro commonMain migration (#5401)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-11 20:10:23 +00:00
renovate[bot]
f89fdaf99d chore(deps): update core/proto/src/main/proto digest to b302d92 (#5398)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-11 10:48:40 -05:00
Austin
484518195e Gradle: Add flatpakGradleGenerator task (#5369) 2026-05-11 14:44:29 +00:00
renovate[bot]
2d5bcc1e50 chore(deps): update core/proto/src/main/proto digest to 03eb534 (#5397)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-11 12:50:08 +00:00
James Rich
443de4a34d chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#5383)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2026-05-10 05:57:23 -05:00
James Rich
924f8a507b chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#5378)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2026-05-07 07:34:30 -05:00
James Rich
213c380514 refactor(firmware): replace PlatformBackHandler with NavigationBackHandler (#5376)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-06 20:01:40 +00:00
James Rich
3c75510f01 fix(mqtt): harden TLS enforcement, add user CA trust, and improve error diagnostics (#5365)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-06 12:09:49 -05:00
James Rich
3e55579250 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#5357)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2026-05-06 12:02:01 -05:00
James Rich
2de57a9e81 feat: align theme with Design Standards v1.3, remove contrast setting (#5355)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-04 16:10:06 -05:00
James Rich
82926fd734 feat: event firmware easter egg with ambient branding (#5354)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-04 19:37:47 +00:00
James Rich
78ff3f599c chore(ble): don't surface ui message when canceling scope (#5352) 2026-05-04 17:23:57 +00:00
James Rich
fa3437b147 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#5349)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2026-05-04 11:45:11 -05:00
James Rich
26c50258da chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#5347)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2026-05-04 11:30:59 -05:00
James Rich
f1423e4ee2 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#5339)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2026-05-03 14:51:57 -05:00
James Rich
1c984d54f4 chore: Integrate MQTT logging with Kermit and enhance PII sanitization (#5338) 2026-05-02 18:53:19 +00:00
James Rich
9e396cdecc chore: optimize AI agent context and implement CI cost controls (#5335)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-05-02 13:19:11 -05:00
James Rich
c0b0b9edd4 fix(network): resolve empty MQTT address and enforce TLS on default server (#5333)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-02 14:59:44 +00:00
James Rich
5a95201b4e fix(connections): improve BLE scan reliability and UI lifecycle (#5329) 2026-05-02 14:25:40 +00:00
Andrew Smith
2914bc6ff6 Change default ContrastLevel from STANDARD to MEDIUM (#5325)
Co-authored-by: James Rich <james.a.rich@gmail.com>
2026-05-02 06:29:47 -05:00
James Rich
400e0404f6 fix(data): default new-node notifications off for event firmware (#5323) 2026-05-02 02:02:30 +00:00
James Rich
68a1c578a7 fix: add explicit DI binds and ensure scans start after DataStore load (#5319) 2026-05-01 15:39:40 +00:00
renovate[bot]
70a26f0def chore(deps): update core/proto/src/main/proto digest to 1d6f1a7 (#5309)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-01 11:37:29 +00:00
James Rich
e198f52de5 refactor(coroutines): migrate to kotlinx-coroutines 1.11.0-rc02 (#5312)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-01 03:11:22 +00:00
James Rich
2822290908 refactor(build): build-logic cleanup, CC safety, and detekt 2.0 upgrade (#5311) 2026-05-01 02:48:37 +00:00
James Rich
9d64dd697e chore: Scheduled updates (Firmware, Hardware, Translations, Graphs, Licenses) (#5298) 2026-04-29 14:02:03 -05:00
James Rich
7f578906fa revert: replace extra newline on traceroute route strings
fix translations?
2026-04-29 13:48:26 -05:00
James Rich
1966889c2d feat(connections): connection sorting & conversation empty channel ranking (#5295) 2026-04-29 17:18:57 +00:00
James Rich
3d2b21843e refactor: update user lookups and localize traceroute responses (#5294) 2026-04-29 16:42:02 +00:00
James Rich
9e0ad369dd fix: update notification icon (#5293) 2026-04-29 16:02:41 +00:00
James Rich
f01e98e8d3 fix: update emoji catalog metadata and improve picker synchronization (#5292) 2026-04-29 15:27:36 +00:00
Pavel
575b7e5d27 fix(ui): align Cancel and Send enabled state (#5284) 2026-04-29 15:22:40 +00:00
James Rich
cbd26b06dd fix: ensure snackbar respects safe drawing padding over host modifiers (#5290) 2026-04-29 14:59:18 +00:00
James Rich
5e415120d0 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs, Licenses) (#5273) 2026-04-29 06:49:14 -05:00