Skip to content

Fix compilation errors from Navigation 3 migration#1428

Merged
lihenggui merged 7 commits into
nav3-migrationfrom
fix/nav3-compilation-errors
Feb 8, 2026
Merged

Fix compilation errors from Navigation 3 migration#1428
lihenggui merged 7 commits into
nav3-migrationfrom
fix/nav3-compilation-errors

Conversation

@lihenggui

Copy link
Copy Markdown
Owner

Summary

  • Add default values to AppListNavKey and GeneralRuleNavKey data class parameters so they can be instantiated without arguments
  • Use NavKey instances (AppListNavKey(), GeneralRuleNavKey(), SearchNavKey()) instead of bare class references in TopLevelNavItem, BlockerAppState, and BlockerAppStateTest
  • Remove extra tab/searchKeyword params from SearchViewModel.Factory to match the 2 @Assisted constructor parameters
  • Pass GeneralRulesViewModel via assisted factory in GeneralRuleEntryProvider
  • Fix BlockerAppStateTest nested test structure by extracting inner test functions to top-level class methods

Test plan

  • ./gradlew assembleFossDebug builds successfully
  • ./gradlew testFossDebugUnitTest passes relevant unit tests
  • Verify navigation works correctly on device

lihenggui and others added 7 commits February 7, 2026 15:09
- Add default values to AppListNavKey and GeneralRuleNavKey data classes
  so they can be instantiated without arguments
- Use NavKey instances (with parentheses) instead of bare class references
  in TopLevelNavItem map, BlockerAppState, and BlockerAppStateTest
- Remove extra tab/searchKeyword params from SearchViewModel.Factory to
  match the 2 @assisted constructor parameters
- Pass GeneralRulesViewModel via assisted factory in GeneralRuleEntryProvider
- Fix BlockerAppStateTest nested test structure by extracting inner test
  functions to top-level class methods
- Fix public BlockerApp calling itself recursively instead of the
  internal overload by passing snackbarHostState parameter
- Remove shadowed snackbarHostState variable in internal BlockerApp
- Move test assertions outside setContent in BlockerAppStateTest to
  avoid UncompletedCoroutinesError
- Provide LocalSnackbarHostState in SnackbarScreenshotTests
alpha05 flags testOptions.animationsDisabled as InternalAgpApiUsage,
which fails the build-logic lint check and blocks all subsequent CI
steps including Roborazzi screenshot recording.
This module has no tests. The isIncludeAndroidResources config
combined with test dependencies from the convention plugin caused
Gradle to fail with failOnNoDiscoveredTests.
…ture impl modules

- Add roborazzi plugin and core:screenshotTesting test dependency to all
  feature impl modules that have screenshot tests
- Remove testOptions.unitTests.isIncludeAndroidResources from feature api
  modules that have no tests (fixes failOnNoDiscoveredTests error)
- Add missing @assisted parameters to ViewModel tests
@lihenggui lihenggui merged commit 8329285 into nav3-migration Feb 8, 2026
4 checks passed
@lihenggui lihenggui deleted the fix/nav3-compilation-errors branch February 8, 2026 04:16
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.

1 participant