Meshtastic-Android/feature
James Rich 092238cb55 refactor: use injected ioDispatcher and ApplicationCoroutineScope
Replaces two coroutine anti-patterns flagged by the architecture audit:

* FirmwareUpdateViewModel.onCleared() was using GlobalScope.launch to
  run cleanup work that must outlive the ViewModel scope. Introduce a
  new ApplicationCoroutineScope marker interface + Koin @Single binding
  in core/common, backed by SupervisorJob() + ioDispatcher, and inject
  it into the VM. NonCancellable is preserved so shutdown work still
  cannot be interrupted. Verified end-to-end by the KoinVerificationTest
  full-graph check.
* Six sites in feature/settings (android+jvm LogExporter/PrefExporter)
  and core/ui (android+jvm PlatformUtils) were hardcoding Dispatchers.IO.
  Switch to the project's injectable ioDispatcher property so tests
  can substitute a test dispatcher without reflection.

Dispatchers.Main sites in LogExporter are intentionally left alone —
they are fully test-swappable via Dispatchers.setMain() and there is
no existing mainDispatcher property to inject.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-17 10:53:08 -05:00
..
connections chore: review-cleanup fleet (audit + fix + hardening) (#5158) 2026-04-17 00:02:59 +00:00
firmware refactor: use injected ioDispatcher and ApplicationCoroutineScope 2026-04-17 10:53:08 -05:00
intro test: migrate Compose UI tests from androidTest to commonTest (#5091) 2026-04-12 20:20:00 +00:00
map feat(core/ui): add safeLaunch, UiState, KMP permissions, and CMP lifecycle modernization (#5118) 2026-04-14 00:45:34 +00:00
messaging chore: KMP audit — commonize code, centralize utilities, eliminate dead abstractions (#5133) 2026-04-15 02:17:50 +00:00
node fix(node): don't recreate Vico CartesianChartModelProducer on channel switch (#5160) 2026-04-17 02:40:17 +00:00
settings refactor: use injected ioDispatcher and ApplicationCoroutineScope 2026-04-17 10:53:08 -05:00
widget chore: review-cleanup fleet (audit + fix + hardening) (#5158) 2026-04-17 00:02:59 +00:00
wifi-provision chore: review-cleanup fleet (audit + fix + hardening) (#5158) 2026-04-17 00:02:59 +00:00