Skip to content

manager: Migrate to navigation3 + navigationevent#3164

Merged
YuKongA merged 3 commits into
mainfrom
nav3+navEvent
Jan 19, 2026
Merged

manager: Migrate to navigation3 + navigationevent#3164
YuKongA merged 3 commits into
mainfrom
nav3+navEvent

Conversation

@YuKongA

@YuKongA YuKongA commented Jan 19, 2026

Copy link
Copy Markdown
Collaborator

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. It also updates dependencies, removes now-unnecessary KSP (Kotlin Symbol Processing) configuration, and makes minor manifest and UI improvements.

Navigation system migration and refactor:

  • Replaced all usage of compose-destinations with androidx.navigation3 and navigationevent libraries in MainActivity.kt, introducing new navigation classes (Navigator, Route, etc.), updating navigation logic, and removing all compose-destinations imports and usages. (manager/app/src/main/java/me/weishu/kernelsu/ui/MainActivity.kt) [1] [2]
  • Updated the main screen and pager back handling to use NavigationBackHandler and 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:

  • Removed KSP plugin and configuration, including generated source set and KSP arguments, from build.gradle.kts as compose-destinations is no longer used. Added kotlin.serialization plugin and updated navigation dependencies to use androidx.navigation3 and related libraries. (manager/app/build.gradle.kts) [1] [2] [3] [4] [5]

Manifest and UI improvements:

  • Removed android:enableOnBackInvokedCallback="false" and android:launchMode="singleTask" from AndroidManifest.xml, simplifying manifest configuration. (manager/app/src/main/AndroidManifest.xml) [1] [2]
  • Updated ZipFileIntentHandler and ShortcutIntentHandler to use the new navigation system and intent state tracking with MutableStateFlow. (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.

Copilot AI review requested due to automatic review settings January 19, 2026 05:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-destinations with androidx.navigation3 and navigationevent for type-safe navigation
  • Removed KSP plugin and related build configuration, adding kotlin.serialization instead
  • 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>
@YuKongA YuKongA merged commit dff0629 into main Jan 19, 2026
16 checks passed
@YuKongA YuKongA deleted the nav3+navEvent branch January 19, 2026 06:09
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants