Commit Graph

6946 Commits

Author SHA1 Message Date
James Rich
2c06a8019e feat(connections): detect & inform about disabled Bluetooth / Wi-Fi
Mirror the GPS-disabled-vs-permission-denied distinction for the BLE and
network transports:

- core/ui: add isBluetoothDisabled() (adapter off) + isWifiUnavailable()
  (no Wi-Fi/Ethernet), plus rememberOpenBluetoothSettings()/rememberOpenWifiSettings()
  — alongside the existing isGpsDisabled()/rememberOpenLocationSettings()
- extract a reusable RecoveryCard from PermissionRecoveryCard (errorContainer
  message box + one recovery action); PermissionRecoveryCard now delegates to it
- ConnectionsScreen: when a transport's permission is granted but its adapter is
  off, show an inline recovery banner. The BLE scan toggle routes to Bluetooth
  settings when the radio is off (scanning can't work); the network banner is
  informational (manual TCP can still work off-Wi-Fi)
- detection refreshes on ON_RESUME, so the banner clears after the user returns
  from the adapter settings screen

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 13:41:43 -05:00
James Rich
a3b5e7d245 fix: resolve merge with main #5849 + satisfy new lint rules
- AndroidScannerViewModel: keep main's armTransport bonding-retry structure;
  apply the SecurityException + USB string-resource conversions on top; drop the
  now-moot bonding_failed string (main no longer errors on flaky bonding)
- NodeDetailScreens: wrap onRequestPosition/node in rememberUpdatedState for the
  grant LaunchedEffect (LambdaParameterInRestartableEffect)
- spotless: blank lines between multiline when-conditions (TakPermissionUtil,
  ConnectionsScreen)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 13:25:53 -05:00
James Rich
37f8bf207e Merge remote-tracking branch 'origin/main' into claude/gallant-thompson-d1b2ea
# Conflicts:
#	feature/connections/src/androidMain/kotlin/org/meshtastic/feature/connections/AndroidScannerViewModel.kt
2026-06-18 13:19:58 -05:00
James Rich
3cdb72ec6e docs(workpad): record PR #5851
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 13:14:16 -05:00
James Rich
01b9df6d9b docs: fix stale permission API reference in manifest comment
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 13:07:57 -05:00
James Rich
81b5e03f27 fix: address review triage (F-1,2,5,7,13,14,16)
- migrate all remaining permission call sites (PrivacySection, NodeDetailScreens,
  TakPermissionUtil, ConnectionsScreen) to rememberXxxPermissionState(); delete the
  old rememberRequestXxx/isXxx wrappers — single source of truth, resolves the
  FINE-vs-FINE|COARSE location-grant conflict (F-5)
- add in-context Bluetooth + local-network requests with permanent-denial→settings
  recovery on the Connections scan toggles (F-1)
- pre-Android-12 Bluetooth state reports granted instead of delegating to location,
  fixing the intro Bluetooth-screen regression (F-2)
- null Activity no longer collapses to PERMANENTLY_DENIED (F-13)
- extract + test isPermissionGroupGranted (requireAll coarse-location logic) (F-7)
- make granular PermissionRecoveryCard overload internal (F-14)
- order PermissionStatus by lifecycle (F-16)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 13:04:42 -05:00
James Rich
e1872598a5 fix: apply review auto-fixes (F-3,4,6,8-12,15,17)
- PermissionUiState: drop misleading data class, mark @Stable (F-4)
- share grantedPermissionUiState() across platform stubs (F-12)
- remove refreshTrigger indirection; update state in result callback (F-11)
- guard rememberOpenLocationSettings against ActivityNotFoundException (F-6)
- barcode: reopen scanner after grant from recovery card; add dialog heading (F-3, F-8)
- strings: bonding message gains recovery action; camera rationale active voice;
  internationalize generic bonding-failure message (F-9, F-10, F-17)
- parallel KDoc bullets in PermissionRecoveryCard (F-15)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 12:39:32 -05:00
James Rich
287a045c0c docs(workpad): record implement phase completion
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 12:20:16 -05:00
James Rich
2aa33c8d56 style: apply spotless formatting to permission changes
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 12:19:12 -05:00
James Rich
6c3b4b7868 feat(permissions): migrate all call sites off Accompanist + add denial recovery
Migrate intro, both map flavors, and the barcode scanner to the native
rememberXxxPermissionState() helpers; remove accompanist-permissions from
the version catalog, feature convention plugin, and module build files.

Add user-facing denial recovery where it was previously silent: barcode
camera shows a PermissionRecoveryCard, USB permission denial surfaces an
error message, and the map location button routes permanent denial to app
settings. Convert the Bluetooth bonding error to a string resource.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 11:57:49 -05:00
James Rich
27dea7c938 feat(core/ui): permission status state machine + recovery card
Add PermissionStatus enum, pure computePermissionStatus classifier,
PermissionUiState holder, reactive rememberXxxPermissionState()
composables (location/bluetooth/notification/local-network/camera),
rememberOpenAppSettings(), and a shared PermissionRecoveryCard.

The has-been-requested flag is persisted synchronously (SharedPreferences,
written from the launcher result callback) and combined with
shouldShowRequestPermissionRationale to distinguish first-request from
permanent denial. Pre-Android-12 Bluetooth state delegates to location.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 11:51:50 -05:00
James Rich
975adce303 fix(ble): retrigger connection when bonding is interrupted (#5849)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 16:47:28 +00:00
renovate[bot]
eb2c422763 chore(deps): update actions/checkout action to v7 (#5848) 2026-06-18 11:06:19 -05:00
James Rich
1125172c46 feat(network): on-device capture-replay transport + ingestion fuzzing/hardening (#5846)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 14:04:23 +00:00
github-actions[bot]
3c2988c824 docs: update CHANGELOG.md (#5839) 2026-06-18 08:02:47 -05:00
James Rich
cad7ef98d0 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs, Baseline) (#5845) 2026-06-18 07:56:08 -05:00
renovate[bot]
da9a9154da chore(deps): update takpacket.sdk to v0.7.0 (#5844) 2026-06-18 07:55:42 -05:00
renovate[bot]
4a87cd035b chore(deps): update datadog.gradle to v1.28.0 (#5843) 2026-06-18 07:09:55 -05:00
renovate[bot]
02274216af chore(deps): update detekt to v2.0.0-alpha.5 (#5792) 2026-06-18 06:44:09 -05:00
James Rich
ca9aba3235 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs, Baseline) (#5840) 2026-06-18 06:43:56 -05:00
Jeremiah K
e94f2eec38 fix(database): defer FTS backfill on cold start and enforce single-connection pool (#5841) 2026-06-18 11:30:34 +00:00
renovate[bot]
c1269b0d8e chore(deps): update room to v3.0.0-rc01 (#5835)
Co-authored-by: James Rich <james.a.rich@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 18:31:43 -05:00
github-actions[bot]
bcff2ad9ab docs: update CHANGELOG.md (#5837) 2026-06-17 16:37:52 -05:00
renovate[bot]
76a7fdf7aa chore(deps): update compose-multiplatform to v1.11.3 (#5832) 2026-06-17 16:37:21 -05:00
renovate[bot]
2439a1552f chore(deps): update lifecycle to v2.11.0 (#5836) 2026-06-17 16:37:07 -05:00
James Rich
021f467b61 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs, Baseline) (#5833) 2026-06-17 15:40:37 -05:00
renovate[bot]
b590f438ea chore(deps): update androidx.core:core-location-altitude to v1.0.0 (#5831) 2026-06-17 15:40:22 -05:00
github-actions[bot]
26fdfed2d9 docs: update CHANGELOG.md (#5830) 2026-06-17 13:04:28 -05:00
Jeremiah K
acf9ff9349 fix(service): resolve selected-device startup race (#5828) 2026-06-17 17:54:00 +00:00
James Rich
5b19a5f31f fix(appfunctions): keep AppSearch document-factory constructors under R8 full mode (#5829)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 14:19:25 +00:00
github-actions[bot]
b9693468d8 docs: update CHANGELOG.md (#5826) v2.8.0-internal.1 2026-06-17 06:28:48 -05:00
James Rich
5e3df30edd chore: Scheduled updates (Firmware, Hardware, Translations, Graphs, Baseline) (#5827) 2026-06-17 06:15:19 -05:00
James Rich
27e9990e3c fix(ci): stop scheduled-updates choking on failed baseline profile (#5825)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 05:55:18 -05:00
github-actions[bot]
a997adc926 docs: update CHANGELOG.md (#5819) 2026-06-16 21:34:58 -05:00
Lester Cheng
ae3e3d298c fix(notifications): open node detail when tapping 'New Node Seen' notification (#5752)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-06-17 02:12:52 +00:00
James Rich
212eea9d30 feat(node): show our node shortname chip on the Nodes tab (#5820)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 02:08:05 +00:00
James Rich
cef12c39dd feat(settings): add remote "Set time" admin action (#5821)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 02:07:14 +00:00
James Rich
c347903c6e feat(mqtt): add phone-local MQTT proxy cutoff control (#5823)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 02:05:43 +00:00
James Rich
d9fe1691ac feat(export): add hop start and relay node columns to CSV export (#5822)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 02:04:06 +00:00
James Rich
f2769a3b29 fix(build): isolate ML Kit GenAI to the Google flavor (fix F-Droid rb-check) (#5824)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 20:58:46 -05:00
James Rich
c3488d4f5d chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#5817)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2026-06-16 18:25:16 -05:00
github-actions[bot]
b3b114ea03 docs: update CHANGELOG.md (#5816) 2026-06-16 18:11:28 -05:00
Benjamin Faershtein
5ac26be18f feat(node): add local stats noise floor metrics (#5782)
Co-authored-by: James Rich <james.a.rich@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 17:55:42 -05:00
James Rich
1d0dc8b7b5 fix(build): supply AboutLibraries license texts for offline builds (#5818)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 17:28:49 -05:00
Jeremiah K
35fba4d56d fix(ble): Harden BLE connection lifecycle (#5795)
Co-authored-by: James Rich <james.a.rich@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: James Rich <james.a.rich@gmail.com>
2026-06-16 17:26:00 -05:00
James Rich
1230c36cdb feat(settings): implement set_ham_mode HamParameters admin message (#5780)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-16 16:22:29 -05:00
James Rich
8874352ba4 fix: resolve release/2.8.0 branch-review findings (car hosts, AI node IDs, discovery abort, AQ zeros) (#5813)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 15:51:54 -05:00
James Rich
bfe3440a11 fix(node): chart local-node air-quality telemetry (orphaning + zero-suppression) (#5793)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 15:51:54 -05:00
James Rich
613dee91bf fix(database): use a single connection for in-memory test databases
configureCommon() applied setMultipleConnectionPool(maxNumOfReaders = 4)
to every database, including the in-memory ones used by tests. A read on
a pooled reader connection can observe a snapshot older than the latest
write on the writer connection, so a read immediately after a write may
return stale rows.

DeviceLinkRepositoryImplTest.reconcilePrunesShortCodesNoLongerInCatalog
read [a, b] (the pre-prune state) instead of [a] after a deleteNotIn —
passing locally but flaking on CI depending on connection-assignment
timing (failed shard-core on #5738; the identical code passed on #5780).

In-memory builders now pass multiConnection = false so reads serialize
behind writes on one connection. Production/file databases keep the
multi-reader pool.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-16 15:51:54 -05:00
James Rich
b5dd6ff9e9 fix(di): start AppFunctionStateSync from the Application, not createdAtStart
The google-flavor AppFunctionsModule registered AppFunctionStateSync
with createdAtStart = true. Eager creation needs the androidContext
binding and immediately spawns the prefs-observing sync coroutine —
so any Koin graph built outside a running app failed with
NoDefinitionFoundException for android.content.Context. That broke
KoinVerificationTest.verifyTypedBootstrapLoadsModuleGraph (the typed
koinApplication<AndroidKoinApp>() bootstrap instantiates eager
singletons), failing the shard-app CI job on this branch.

The definition is now a plain @Single (the graph stays lazily
constructible) and GoogleMeshUtilApplication.onCreate resolves it once
after startKoin has bound androidContext — same production behavior,
explicit instead of implicit. It was the repo's only createdAtStart.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: James Rich <james.a.rich@gmail.com>
2026-06-16 15:51:54 -05:00