Implement main app navigation

This commit is contained in:
2026-05-08 14:03:26 +02:00
parent f7e866a08d
commit 794e27c554
90 changed files with 11725 additions and 187 deletions

View File

@@ -0,0 +1,132 @@
---
phase: 02.1-app-shell-navigation-search-foundation
plan: 01
subsystem: ui
tags: [kotlin, kmp, compose-multiplatform, gradle, navigation, liquid, haze, compose-unstyled, testing]
requires:
- phase: 02-authentication-foundation
provides: composeApp module, Kotlin Multiplatform test setup, and existing auth test conventions
provides:
- pinned app-shell UI dependencies in the version catalog
- commonMain dependency wiring for navigation, glass, unstyled controls, and Material icons
- ignored commonTest validation anchors for V-01 through V-07
affects: [phase-02.1, navigation, app-shell, glass, search, theme]
tech-stack:
added: [navigation-compose 2.9.2, compose-unstyled 1.49.9, liquid 1.1.1, haze 1.6.10, material-icons-extended 1.7.3]
patterns: [ignored validation-anchor tests, explicit version-catalog aliases for shell dependencies]
key-files:
created:
- composeApp/src/commonTest/kotlin/dev/ulfrx/recipe/navigation/NavigationTest.kt
- composeApp/src/commonTest/kotlin/dev/ulfrx/recipe/ui/components/glass/GlassBackendTest.kt
- composeApp/src/commonTest/kotlin/dev/ulfrx/recipe/ui/components/glass/GlassBackendOverrideTest.kt
- composeApp/src/commonTest/kotlin/dev/ulfrx/recipe/ui/screens/shell/AppShellGateTest.kt
- composeApp/src/commonTest/kotlin/dev/ulfrx/recipe/ui/screens/recipes/RecipesSearchViewModelTest.kt
- composeApp/src/commonTest/kotlin/dev/ulfrx/recipe/ui/screens/pantry/PantrySearchViewModelTest.kt
modified:
- gradle/libs.versions.toml
- composeApp/build.gradle.kts
key-decisions:
- "Material Icons Outlined are provided through material-icons-extended 1.7.3 so later navigation plans can reference the planned icons directly."
- "Validation anchors are ignored commonTest tests until the production types land in later Phase 2.1 waves."
patterns-established:
- "Dependency de-risking first: add and link K/N-facing libraries before UI code depends on them."
- "V-anchor tests are committed early as @Ignore Kotlin tests, then later plans replace them with real assertions."
requirements-completed: [UI-03, UI-04, UI-09, UI-10]
duration: 37min
completed: 2026-05-08
---
# Phase 02.1: App Shell Navigation Search Foundation - Plan 01 Summary
**Navigation, glass, unstyled-control, and icon dependencies now resolve for composeApp, with ignored commonTest anchors ready for V-01 through V-07.**
## Performance
- **Duration:** 37 min
- **Started:** 2026-05-08T12:06:53Z
- **Completed:** 2026-05-08T12:39:33Z
- **Tasks:** 2
- **Files modified:** 8
## Accomplishments
- Added exact pinned versions for `navigation-compose` 2.9.2, `compose-unstyled` 1.49.9, `liquid` 1.1.1, `haze` 1.6.10, and `material-icons-extended` 1.7.3.
- Wired all five dependencies into `composeApp` commonMain, including Material Icons Extended for planned Outlined icon usage.
- Created six ignored Kotlin test anchors covering V-01 through V-07 so later waves can convert stubs into real assertions.
## Task Commits
Each task was committed atomically:
1. **Task 1: Add app shell dependencies** - `82aa01f` (feat)
2. **Repair: Remove unrelated auth/user files accidentally captured from the pre-existing index** - `1066e9b` (fix)
3. **Task 2: Add app shell validation stubs** - `f3a76c6` (test)
**Plan metadata:** pending in current summary commit
## Files Created/Modified
- `gradle/libs.versions.toml` - Declares the Phase 2.1 UI dependency versions and library aliases.
- `composeApp/build.gradle.kts` - Adds the new UI/navigation/glass/icon dependencies to commonMain.
- `composeApp/src/commonTest/kotlin/dev/ulfrx/recipe/navigation/NavigationTest.kt` - V-01 ignored navigation test anchor.
- `composeApp/src/commonTest/kotlin/dev/ulfrx/recipe/ui/components/glass/GlassBackendTest.kt` - V-02 ignored backend default anchor.
- `composeApp/src/commonTest/kotlin/dev/ulfrx/recipe/ui/components/glass/GlassBackendOverrideTest.kt` - V-03 ignored debug override anchors.
- `composeApp/src/commonTest/kotlin/dev/ulfrx/recipe/ui/screens/shell/AppShellGateTest.kt` - V-04 ignored authenticated shell routing anchor.
- `composeApp/src/commonTest/kotlin/dev/ulfrx/recipe/ui/screens/recipes/RecipesSearchViewModelTest.kt` - V-05/V-06 ignored recipes search anchors.
- `composeApp/src/commonTest/kotlin/dev/ulfrx/recipe/ui/screens/pantry/PantrySearchViewModelTest.kt` - V-07 ignored pantry search anchors.
## Decisions Made
Followed the plan's pinned coordinates. Added `material-icons-extended` proactively because the phase's Outlined tab/search icons are not guaranteed by the baseline icon set.
## Deviations from Plan
### Auto-fixed Issues
**1. Pre-existing staged auth/user files were accidentally included in Task 1**
- **Found during:** Wave 1 executor status check
- **Issue:** The dependency commit picked up unrelated auth/user files that were already staged before this plan ran.
- **Fix:** Added a follow-up repair commit removing only those unrelated files from the plan's net changes while preserving the intended dependency edits.
- **Files modified:** `composeApp/src/androidMain/kotlin/dev/ulfrx/recipe/auth/AuthFlowLauncher.android.kt`, `composeApp/src/commonMain/kotlin/dev/ulfrx/recipe/auth/AuthFlowLauncher.kt`, `composeApp/src/commonMain/kotlin/dev/ulfrx/recipe/user/HttpUserGateway.kt`, `composeApp/src/commonMain/kotlin/dev/ulfrx/recipe/user/UserGateway.kt`, `composeApp/src/iosMain/kotlin/dev/ulfrx/recipe/auth/AuthFlowLauncher.ios.kt`
- **Verification:** `git status --short` no longer reports auth/user deletions after the repair.
- **Committed in:** `1066e9b`
---
**Total deviations:** 1 auto-fixed
**Impact on plan:** Dependency and test-anchor scope remains intact; unrelated pre-existing index state was isolated by a repair commit.
## Issues Encountered
- `:composeApp:commonTest` is not a registered Gradle task in this project. Used `:composeApp:compileTestKotlinIosSimulatorArm64` and `:composeApp:iosSimulatorArm64Test` as the executable validation path.
## Verification
- `./gradlew :composeApp:help -q` passed.
- `./gradlew :composeApp:dependencies --configuration commonMainImplementation` resolved the new artifacts.
- `./gradlew :composeApp:dependencies --configuration iosSimulatorArm64MainResolvableDependenciesMetadata` resolved the new artifacts.
- `./gradlew :composeApp:linkDebugFrameworkIosSimulatorArm64 -q` passed.
- `./gradlew :composeApp:compileTestKotlinIosSimulatorArm64 -q` passed.
- `./gradlew :composeApp:iosSimulatorArm64Test -q` passed.
- `./gradlew :composeApp:commonTest -q` failed because the task does not exist.
## User Setup Required
None - no external service configuration required.
## Next Phase Readiness
Wave 2 can now build real glass backend resolution and navigation behavior against existing dependency aliases and V-anchor test files.
## Self-Check: PASSED
---
*Phase: 02.1-app-shell-navigation-search-foundation*
*Completed: 2026-05-08*