manager: Migrate to navigation3 + navigationevent#3164
Merged
Conversation
This reverts commit 4d396fd.
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request modernizes the app's navigation architecture by migrating from the third-party compose-destinations library to the official androidx.navigation3 and navigationevent libraries. This reduces external dependencies, simplifies the build process by removing KSP requirements, and standardizes navigation patterns throughout the codebase.
Changes:
- Replaced
compose-destinationswithandroidx.navigation3andnavigationeventfor type-safe navigation - Removed KSP plugin and related build configuration, adding
kotlin.serializationinstead - Updated all screen composables to use the new Navigator interface and removed BackHandler usage in favor of NavigationBackHandler
Reviewed changes
Copilot reviewed 42 out of 42 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| manager/gradle/libs.versions.toml | Updated dependencies: removed compose-destinations and KSP, added navigation3 and navigationevent libraries |
| manager/app/build.gradle.kts | Removed KSP plugin configuration, added kotlin.serialization plugin and new navigation dependencies |
| manager/app/src/main/AndroidManifest.xml | Removed android:enableOnBackInvokedCallback and android:launchMode attributes for cleaner manifest |
| manager/app/src/main/java/me/weishu/kernelsu/ui/navigation3/Routes.kt | New file defining type-safe navigation routes as serializable sealed interface |
| manager/app/src/main/java/me/weishu/kernelsu/ui/navigation3/Navigator.kt | New navigation helper class managing back stack and result-based navigation |
| manager/app/src/main/java/me/weishu/kernelsu/ui/navigation3/DeepLinkResolver.kt | New deep link resolver for intent handling |
| manager/app/src/main/java/me/weishu/kernelsu/ui/MainActivity.kt | Complete navigation rewrite using NavDisplay and new Navigator, updated intent handling with MutableStateFlow |
| manager/app/src/main/java/me/weishu/kernelsu/ui/screen/*.kt | All screen composables updated to accept Navigator parameter instead of MiuixDestinationsNavigator |
| manager/app/src/main/java/me/weishu/kernelsu/ui/component/navigation/*.kt | Removed all compose-destinations wrapper files |
| manager/app/src/main/java/me/weishu/kernelsu/ui/component/sharedTransition/*.kt | Removed shared transition components no longer needed |
| manager/app/src/main/java/me/weishu/kernelsu/ui/component/SuperSearchBar.kt | Refactored to use NavigationBackHandler and simplified state management |
| manager/app/src/main/java/me/weishu/kernelsu/ui/screen/ModuleRepo.kt | Moved ModuleRepoDetailScreen into same file, removing separate detail screen file |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…utes.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
KOWX712
pushed a commit
to KOWX712/KernelSU
that referenced
this pull request
Jan 25, 2026
This pull request migrates the app's navigation system from the `compose-destinations` library to the new `androidx.navigation3` and `navigationevent` libraries, modernizing navigation and simplifying related code. Removes now-unnecessary KSP (Kotlin Symbol Processing) configuration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request migrates the app's navigation system from the
compose-destinationslibrary to the newandroidx.navigation3andnavigationeventlibraries, modernizing navigation and simplifying related code. It also updates dependencies, removes now-unnecessary KSP (Kotlin Symbol Processing) configuration, and makes minor manifest and UI improvements.Navigation system migration and refactor:
compose-destinationswithandroidx.navigation3andnavigationeventlibraries inMainActivity.kt, introducing new navigation classes (Navigator,Route, etc.), updating navigation logic, and removing allcompose-destinationsimports and usages. (manager/app/src/main/java/me/weishu/kernelsu/ui/MainActivity.kt) [1] [2]NavigationBackHandlerand the new navigation stack, removing the old pager state handling logic. (manager/app/src/main/java/me/weishu/kernelsu/ui/MainActivity.kt) [1] [2]Build configuration and dependency updates:
build.gradle.ktsascompose-destinationsis no longer used. Addedkotlin.serializationplugin and updated navigation dependencies to useandroidx.navigation3and related libraries. (manager/app/build.gradle.kts) [1] [2] [3] [4] [5]Manifest and UI improvements:
android:enableOnBackInvokedCallback="false"andandroid:launchMode="singleTask"fromAndroidManifest.xml, simplifying manifest configuration. (manager/app/src/main/AndroidManifest.xml) [1] [2]ZipFileIntentHandlerandShortcutIntentHandlerto use the new navigation system and intent state tracking withMutableStateFlow. (manager/app/src/main/java/me/weishu/kernelsu/ui/MainActivity.kt) [1] [2] [3]These changes modernize the navigation architecture, reduce build complexity, and streamline intent and back handling throughout the app.