Commit Graph

43 Commits

Author SHA1 Message Date
niccellular
d0857ef278 feat(lockdown): runtime enable/disable toggle and DISABLED state
Make lockdown a runtime, user-toggleable setting rather than a one-way lock:

- Thread a `disable` flag through the lockdown send path (CommandSender,
  LockdownCoordinator, MeshActionHandler, RadioController, AIDL, UIViewModel)
  so the app can send LockdownAuth{passphrase, disable=true} to decrypt
  storage and leave lockdown.
- Add LockdownState.Disabled and map LockdownStatus.State.DISABLED; clear the
  stored passphrase and session authorization when a device reports DISABLED
  (or when the user disables it), so we never auto-unlock a disabled device.
- Add a "Lockdown mode" switch to the security settings screen
  (LockdownModeSetting): enable from DISABLED via a set-passphrase dialog with
  a one-time irreversible-SWD warning + explicit confirm; disable from UNLOCKED
  via a passphrase prompt; "Lock now" and session info while unlocked. The
  setting is hidden when the device never reports lockdown_status (non-capable).
- Tests for the disable round-trip and DISABLED mapping; refresh fakes/strings.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 16:30:37 -04:00
niccellular
2f6c8288c4 Merge remote-tracking branch 'origin/main' into features/lockdown-v2
# Conflicts:
#	.specify/feature.json
#	AGENTS.md
#	core/proto/src/main/proto
#	feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/SecurityConfigScreen.kt
2026-05-28 15:13:33 -04:00
James Rich
5ec6d80f61 docs: comprehensive documentation audit and refresh (#5572)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-21 20:50:01 -05:00
James Rich
5d9e71da39 feat: node list density switching with compact layout and field toggles (#5444)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-21 17:44:48 -05:00
niccellular
3b02df3e67 Merge remote-tracking branch 'origin/main' into features/lockdown-v2
# Conflicts:
#	.specify/feature.json
#	AGENTS.md
#	core/proto/src/main/proto
2026-05-21 14:01:47 -04:00
James Rich
877909fa94 fix: prevent node details hang when device hardware API is unreachable (#5514)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-19 20:37:42 -05:00
James Rich
f5128798a8 feat: adopt Material 3 Expressive design system (M3-native APIs only) (#5479)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-19 01:10:47 +00:00
niccellular
6ce565f16c feat(lockdown): thread max_session_seconds through coordinator and UI
End-to-end plumbing for LockdownAuth.max_session_seconds (per-boot
uptime cap on the unlocked session; 0 = unlimited).

Wire:
- CommandSenderImpl populates LockdownAuth.max_session_seconds in the
  outbound admin packet (clamped non-negative).

Coordinator + persistence:
- LockdownCoordinator.submitPassphrase gains optional maxSessionSeconds
  (default 0); persisted alongside boots/hours and replayed by
  auto-unlock so cached sessions keep the operator's cap on reconnect.
- StoredPassphrase gains a new field with a default of 0 so existing
  call sites stay source-compatible.
- LockdownPassphraseStore (Android EncryptedSharedPreferences impl):
  reads/writes the new field with a `_maxSessionSeconds` key suffix;
  legacy entries decode to 0.
- LockdownPassphraseStore (JVM file-backed impl): bumps the per-entry
  on-disk serialization from 3-line to 4-line; legacy 3-line entries
  still decode (treated as maxSessionSeconds=0).

IPC + radio plumbing:
- IMeshService.sendLockdownUnlock AIDL gains a 4th int parameter.
- MeshService stub, MeshActionHandler, RadioController interface, and
  both impls (AndroidRadioControllerImpl, DirectRadioControllerImpl)
  thread the field through.
- FakeIMeshService, FakeRadioController, FakeLockdownCoordinator
  updated to match.

UI:
- LockdownDialog adds a single optional "Session cap (minutes)" field
  below the boots/hours row. Operators enter minutes for ergonomics;
  the dialog multiplies by 60 before passing to the coordinator. Blank
  or 0 = unlimited (firmware default).
- UIViewModel.sendLockdownUnlock gains the new param with default 0.
- New string resources: lockdown_session_minutes,
  lockdown_session_minutes_help. Strings re-sorted via
  scripts/sort-strings.py.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 16:57:49 -04:00
James Rich
f4b6b02ace refactor(build): rename entry modules and remove DESKTOP_ONLY mode (#5476)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-18 12:44:12 +00:00
James Rich
2a1734d932 fix: finish lockdown review follow-ups
Address remaining review items, add integration and JVM store tests,
and sync the lockdown spec docs with the implemented API and UI.
2026-05-13 11:59:56 -05:00
James Rich
7beb639761 feat: implement lockdown mode authentication
- Add LockdownCoordinator state machine with auto-replay, lock-now,
  and error-resilient passphrase store calls
- Add EncryptedSharedPreferences-backed Android passphrase store
  with nullable fallback on crypto init failure
- Add LockdownDialog (provision/unlock/backoff) with byte-length
  passphrase validation and string resources
- Add LockdownSessionStatus composable for token info display
- Gate region-unset banner on sessionAuthorized in ConnectionsScreen
- Wire Lock Now button in SecurityConfigScreen
- Add LockdownCoordinatorImplTest covering all state transitions,
  auto-replay, lock-now, error paths, and uint32 overflow
- Add FakeLockdownCoordinator and update test fakes
- Delete unused LockdownUnlockDialog.kt
2026-05-13 10:49:50 -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
5a95201b4e fix(connections): improve BLE scan reliability and UI lifecycle (#5329) 2026-05-02 14:25:40 +00: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
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
1966889c2d feat(connections): connection sorting & conversation empty channel ranking (#5295) 2026-04-29 17:18:57 +00:00
James Rich
0b873be228 fix(ble): unblock reconnect + kable audit (logging, priority, backoff, StateFlow) (#5222)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-22 18:35:22 -05:00
James Rich
228d872f9d feat(connections): unified device list, ACCESS_LOCAL_NETWORK, transport filter chips (#5219)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-22 19:34:22 +00:00
James Rich
58eeef1152 feat(service): send polite ToRadio(disconnect=true) before transport close (#5210)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-22 11:04:29 -05:00
James Rich
f22e5a70d9 feat(firmware): nRF52 BLE Legacy DFU support (#5209)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-22 10:12:15 -05:00
James Rich
9f3fe865e3 test: migrate MigrationTest to runTest and add missing repository fakes (#5171)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-17 16:35:41 +00:00
James Rich
17e69c6d4c chore: review-cleanup fleet (audit + fix + hardening) (#5158) 2026-04-17 00:02:59 +00:00
James Rich
fa63a4ac50 feat: add high-contrast theme with accessible message bubbles (#5135)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-15 01:14:20 +00:00
James Rich
5c47256b3f test(prefs): migrate DataStore tests from androidHostTest to commonTest (#5092) 2026-04-12 20:45:19 +00:00
James Rich
e85300531e refactor(transport): complete transport architecture overhaul — extract callback, wire BleReconnectPolicy, fix safety issues (#5080) 2026-04-12 04:22:18 +00:00
James Rich
9468bc6ebe refactor(service): unify dual connectionState flows into single source of truth (#5077) 2026-04-12 00:50:52 +00:00
James Rich
62264b10c6 refactor(model): remove ConnectionState helper methods and fix updateStatusNotification return type (#5074) 2026-04-11 23:41:34 +00:00
James Rich
a3c0a4832d fix(transport): Kable BLE audit + thread-safety, MQTT, and logging fixes across transport layers (#5071) 2026-04-11 22:56:29 +00:00
James Rich
1649e46dd5 chore(deps): remove 7 unused dependencies across modules (#5017) 2026-04-09 12:35:28 -05:00
James Rich
6af3ad6f0c refactor(service): harden KMP service layer — database init, connection reliability, handler decomposition (#4992) 2026-04-04 18:07:44 +00:00
James Rich
0167063497 feat(analytics): expand DataDog RUM integration and align with iOS parity (#4970) 2026-04-01 20:27:28 +00:00
James Rich
e249461e3c feat(tak): introduce built-in Local TAK Server and mesh integration (#4951)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-04-01 20:21:25 +00:00
James Rich
89547afe6b Refactor and unify firmware update logic across platforms (#4966) 2026-04-01 12:14:26 +00:00
James Rich
c75c9b34d6 feat: implement XModem file transfers and enhance BLE connection robustness (#4959) 2026-03-31 03:49:31 +00:00
James Rich
a005231d94 Refactor map layer management and navigation infrastructure (#4921)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-26 00:29:24 +00:00
James Rich
6516287c62 refactor: BLE transport and UI for Kotlin Multiplatform unification (#4911)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-25 02:15:51 +00:00
James Rich
96060a0a4d refactor: coroutine dispatchers and modernize testing infrastructure (#4901)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-24 01:31:48 +00:00
James Rich
d136b162a4 feat: Implement iOS support and unify Compose Multiplatform infrastructure (#4876) 2026-03-21 23:19:13 +00:00
James Rich
6e50db0b91 docs: Unify notification channel management and migrate unit tests (#4867) 2026-03-20 22:58:47 +00:00
James Rich
dcbbc0823b feat: Integrate Mokkery and Turbine into KMP testing framework (#4845) 2026-03-18 18:33:37 -05:00
James Rich
6e81ceec91 feat: Complete ViewModel extraction and update documentation (#4817) 2026-03-16 20:05:50 +00:00
James Rich
ac6bb5479b feat: introduce Desktop target and expand Kotlin Multiplatform (KMP) architecture (#4761)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-12 21:14:49 +00:00