Commit Graph

6585 Commits

Author SHA1 Message Date
James Rich
ed7c8aa22f feat(lockdown): add non-dismissable LockdownDialog and app shell integration
Phase 3 (User Story 1 - Unlock a Locked Node):
- T014: Create LockdownDialog composable in feature/settings/lockdown/
  - Non-dismissable AlertDialog (onDismissRequest = {})
  - Passphrase field with visibility toggle
  - Provision mode with boots/hours TTL fields
  - Error display for UnlockFailed and UnlockBackoff states
  - Disconnect button instead of Cancel
- T017: Integrate dialog in Main.kt app shell
  - Observe lockdownState from UIViewModel
  - Submit triggers sendLockdownUnlock
  - Disconnect triggers setDeviceAddress("n") to drop connection
2026-05-13 09:15:52 -05:00
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
dae4369149 feat(lockdown): add unlock dialog, Lock Now button, region gating
- LockdownUnlockDialog: passphrase entry with boots / hours TTL inputs.
  Shows lock_reason on LOCKED, a backoff countdown on UNLOCK_FAILED with
  backoff_seconds > 0 (Submit disabled while in backoff), and switches
  the title to "Set Passphrase" on NEEDS_PROVISION.
- Main: collect lockdownState/lockdownTokenInfo, show the dialog,
  auto-clear on LockNowAcknowledged so the connection drops without
  a dialog flash.
- ConnectionsScreen: gate the "must set region" banner on
  isLockdownAuthorized so an unauthorized client isn't told to fix a
  region it can't see.
- SecurityConfigItemList: "Lock Now" button under Administration,
  labelled with the active session token's boots remaining and (if set)
  the wall-clock expiry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 09:01:12 -04: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
github-actions[bot]
fc8f3bff3c docs: update CHANGELOG.md (#5437)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
v2.7.14-internal.91
2026-05-12 21:28:57 -05:00
James Rich
1976808a36 refactor: use immutable destNum in RadioConfigViewModel (#5436) 2026-05-13 02:06:52 +00:00
github-actions[bot]
57b0200b61 docs: update CHANGELOG.md (#5431)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-12 20:05:17 -05:00
Austin
ada16f4f5f Flatpak: Add Maven/Gradle mirror URLs (#5433)
Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-05-12 20:04:52 -05:00
James Rich
cf0a7cdabf fix: update screenshots (#5435) 2026-05-12 19:46:00 -05:00
James Rich
73469b415e chore: clean up brownfield specs and migrate to timestamp naming (#5432)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-12 14:22:13 -05:00
James Rich
ff9d6881c0 revert: Update retry settings in gradle-wrapper.properties (#5430)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-05-12 10:43:57 -05:00
github-actions[bot]
1b902ba07c docs: update CHANGELOG.md (#5427)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
v2.7.14-internal.90
2026-05-12 10:36:06 -05:00
renovate[bot]
010ff358d0 chore(deps): update gradle to v9.5.1 (#5429)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-12 10:35:32 -05:00
James Rich
dcb147163c fix: clarify position precision as ± radius (#5428) 2026-05-12 10:24:29 -05:00
James Rich
ab4589c06a fix(desktop): keep Vico package to prevent bytecode verification errors (#5424) 2026-05-12 10:17:05 -05:00
James Rich
fcf0b50746 build: conditionalize JitPack repository for desktop-only builds (#5426) 2026-05-12 10:15:44 -05:00
github-actions[bot]
3bfc66eb29 docs: update CHANGELOG.md (#5422)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
v2.7.14-internal.89
2026-05-12 08:36:52 -05:00
Austin
a2dd4d18aa fix: enhance uniqueness check for Flatpak source files in release workflow. (#5423) 2026-05-12 08:36:16 -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
github-actions[bot]
827535ad45 docs: update CHANGELOG.md (#5420)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
v2.7.14-internal.88
2026-05-12 07:35:39 -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
6f42f07887 fix(ci): resolve flatpak source merge race condition (#5419)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-12 07:11:19 -05:00
github-actions[bot]
b96515e7d0 docs: update CHANGELOG.md (#5417)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-12 06:23:25 -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
renovate[bot]
d4ff10ef3b chore(deps): update actions/checkout action to v6 (#5414)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-12 06:20:16 -05:00
Austin
1c418a57ea Actions: fix Flatpak source file patterns for jq (#5415)
Co-authored-by: Copilot <copilot@github.com>
2026-05-12 05:56:11 -05:00
github-actions[bot]
bce8bba90a docs: update CHANGELOG.md (#5412)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-11 21:39:03 -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
7202994abe fix(ci): prevent literal 'false' task name in desktop release build (#5411)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-11 20:40:50 -05:00
github-actions[bot]
1373bd330b docs: update CHANGELOG.md (#5409)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-11 19:35:45 -05: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
github-actions[bot]
fd0e2c0904 docs: update CHANGELOG.md (#5399)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-11 17:31:49 -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
renovate[bot]
84cc8ad0de chore(deps): update ruby to v4.0.4 (#5407)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-11 17:30:31 -05:00
James Rich
313dc1c2f7 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#5400) 2026-05-11 17:28:06 -05:00
Copilot
b337387287 fix: graceful HTTP error handling in scheduled-updates workflow (#5405)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jamesarich <2199651+jamesarich@users.noreply.github.com>
2026-05-11 17:22:13 -05:00
James Rich
c77e03c5c1 feat(desktop): fix mac notifications, new desktop icons (#5403) 2026-05-11 16:47:16 -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
James Rich
6eacee626b ci: disable Flatpak source generation for PR and merge queue checks (#5402)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-11 15:09:52 -05: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
github-actions[bot]
8c0ced2adc docs: update CHANGELOG.md (#5387)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-11 10:48:19 -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
Austin
234a78a564 Release: Add MacOS ReleaseUberJar target (#5389) 2026-05-11 12:32:34 +00:00