Skip to content

refactor: migrate core UI and features to KMP, adopt Navigation 3#4750

Merged
jamesarich merged 1 commit intomainfrom
feat/kmp-ui
Mar 10, 2026
Merged

refactor: migrate core UI and features to KMP, adopt Navigation 3#4750
jamesarich merged 1 commit intomainfrom
feat/kmp-ui

Conversation

@jamesarich
Copy link
Copy Markdown
Collaborator

  • Migrate core:ui, feature:node, and feature:settings UI components, screens, and view models from androidMain to commonMain.
  • Migrate app routing to AndroidX Navigation 3, replacing NavHostController and composable with NavBackStack, NavKey, and EntryProviderScope across all navigation graphs (NodesNavigation, SettingsNavigation, ContactsNavigation, etc.).
  • Introduce expect/actual KMP abstractions for platform-specific utilities, including ClipboardUtils, Base64Factory, UrlUtils, NumberFormatter, DateFormatter, QrUtils, and PlatformUtils.
  • Refactor AutoLinkText to use pure Kotlin Regex and buildAnnotatedString instead of Android's Linkify.
  • Abstract Android-specific implementations such as intents (Maps, NFC settings, browser, toasts) and QR code rendering into platform-specific implementations.
  • Remove Android-only @Preview annotations from shared UI components.
  • Update module build scripts to include androidx.navigation3.runtime and androidx.navigation3.ui, removing legacy Jetpack Navigation Compose dependencies.
  • Add comprehensive documentation, including a 2026 KMP progress review, evidence appendix, migration plans for Koin and BLE, and AI agent playbooks for codebase conventions.

- Migrate `core:ui`, `feature:node`, and `feature:settings` UI components, screens, and view models from `androidMain` to `commonMain`.
- Migrate app routing to AndroidX Navigation 3, replacing `NavHostController` and `composable` with `NavBackStack`, `NavKey`, and `EntryProviderScope` across all navigation graphs (`NodesNavigation`, `SettingsNavigation`, `ContactsNavigation`, etc.).
- Introduce `expect`/`actual` KMP abstractions for platform-specific utilities, including `ClipboardUtils`, `Base64Factory`, `UrlUtils`, `NumberFormatter`, `DateFormatter`, `QrUtils`, and `PlatformUtils`.
- Refactor `AutoLinkText` to use pure Kotlin Regex and `buildAnnotatedString` instead of Android's `Linkify`.
- Abstract Android-specific implementations such as intents (Maps, NFC settings, browser, toasts) and QR code rendering into platform-specific implementations.
- Remove Android-only `@Preview` annotations from shared UI components.
- Update module build scripts to include `androidx.navigation3.runtime` and `androidx.navigation3.ui`, removing legacy Jetpack Navigation Compose dependencies.
- Add comprehensive documentation, including a 2026 KMP progress review, evidence appendix, migration plans for Koin and BLE, and AI agent playbooks for codebase conventions.

Signed-off-by: James Rich <[email protected]>
@github-actions github-actions bot added the enhancement New feature or request label Mar 10, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 0% with 141 lines in your changes missing coverage. Please review.
✅ Project coverage is 10.77%. Comparing base (e3e010e) to head (83bcf8a).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...n/org/meshtastic/app/navigation/NodesNavigation.kt 0.00% 39 Missing ⚠️
...rg/meshtastic/app/navigation/SettingsNavigation.kt 0.00% 26 Missing ⚠️
...n/org/meshtastic/core/ui/component/AutoLinkText.kt 0.00% 23 Missing ⚠️
...rg/meshtastic/app/navigation/ContactsNavigation.kt 0.00% 13 Missing ⚠️
...stic/feature/node/component/NodeFilterTextField.kt 0.00% 12 Missing ⚠️
...meshtastic/app/navigation/ConnectionsNavigation.kt 0.00% 6 Missing ⚠️
...rg/meshtastic/app/navigation/ChannelsNavigation.kt 0.00% 4 Missing ⚠️
...shtastic/core/common/util/DateFormatter.android.kt 0.00% 4 Missing ⚠️
...tastic/core/common/util/NumberFormatter.android.kt 0.00% 2 Missing ⚠️
...ture/node/component/FirmwareReleaseSheetContent.kt 0.00% 2 Missing ⚠️
... and 10 more
Additional details and impacted files
@@            Coverage Diff             @@
##            main    #4750       +/-   ##
==========================================
+ Coverage   0.00%   10.77%   +10.77%     
==========================================
  Files          3      517      +514     
  Lines        231    16067    +15836     
  Branches      34     2586     +2552     
==========================================
+ Hits           0     1732     +1732     
- Misses       231    14040    +13809     
- Partials       0      295      +295     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamesarich jamesarich added this pull request to the merge queue Mar 10, 2026
@jamesarich jamesarich removed this pull request from the merge queue due to a manual request Mar 10, 2026
@jamesarich jamesarich added this pull request to the merge queue Mar 10, 2026
Merged via the queue into main with commit d076361 Mar 10, 2026
7 checks passed
@jamesarich jamesarich deleted the feat/kmp-ui branch March 10, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant