docs(01-02): complete navigation shell and screens plan

- SUMMARY.md with 3 task commits, 1 deviation, self-check passed
- STATE.md updated: Phase 1 complete, 2/2 plans done
- ROADMAP.md Phase 1 marked complete (2/2)
- REQUIREMENTS.md FOUND-04 marked complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-15 20:10:52 +01:00
parent 014722a850
commit bb3f39bf8a
4 changed files with 172 additions and 19 deletions

View File

@@ -59,7 +59,7 @@ Requirements for initial release. Each maps to roadmap phases.
- [x] **FOUND-01**: App uses Drift for local SQLite storage with proper schema migration workflow
- [x] **FOUND-02**: App uses Riverpod 3 for state management with code generation
- [x] **FOUND-03**: App uses localization infrastructure (ARB files + AppLocalizations) with German locale, even though only one language ships in v1
- [ ] **FOUND-04**: Bottom navigation with tabs: Home (Daily Plan), Rooms, Settings
- [x] **FOUND-04**: Bottom navigation with tabs: Home (Daily Plan), Rooms, Settings
## v2 Requirements
@@ -122,7 +122,7 @@ Which phases cover which requirements. Updated during roadmap creation.
| FOUND-01 | Phase 1: Foundation | Complete |
| FOUND-02 | Phase 1: Foundation | Complete |
| FOUND-03 | Phase 1: Foundation | Complete |
| FOUND-04 | Phase 1: Foundation | Pending |
| FOUND-04 | Phase 1: Foundation | Complete |
| THEME-01 | Phase 1: Foundation | Complete |
| THEME-02 | Phase 1: Foundation | Complete |
| ROOM-01 | Phase 2: Rooms and Tasks | Pending |

View File

@@ -12,7 +12,7 @@ Four phases build the app bottom-up along its natural dependency chain. Phase 1
Decimal phases appear between their surrounding integers in numeric order.
- [ ] **Phase 1: Foundation** - Project scaffold, database, state management, theme, and localization infrastructure
- [x] **Phase 1: Foundation** - Project scaffold, database, state management, theme, and localization infrastructure (completed 2026-03-15)
- [ ] **Phase 2: Rooms and Tasks** - Complete room CRUD, task CRUD with auto-scheduling, and bundled templates
- [ ] **Phase 3: Daily Plan and Cleanliness** - Primary daily plan screen with overdue/today/upcoming, cleanliness indicators per room
- [ ] **Phase 4: Notifications** - Daily summary notification with configurable time and Android permission handling
@@ -31,8 +31,8 @@ Decimal phases appear between their surrounding integers in numeric order.
5. riverpod_lint is active and flags ref.watch usage outside build() as an analysis error
**Plans**: 2 plans
Plans:
- [ ] 01-01-PLAN.md — Scaffold Flutter project and build core infrastructure (database, providers, theme, localization)
- [ ] 01-02-PLAN.md — Navigation shell, placeholder screens, Settings, and full app wiring
- [x] 01-01-PLAN.md — Scaffold Flutter project and build core infrastructure (database, providers, theme, localization)
- [x] 01-02-PLAN.md — Navigation shell, placeholder screens, Settings, and full app wiring
### Phase 2: Rooms and Tasks
**Goal**: Users can create and manage rooms and tasks, mark tasks done, and trust the app to schedule the next occurrence automatically
@@ -80,7 +80,7 @@ Note: Phase 4 depends on Phase 2 (needs scheduling data) but can be developed in
| Phase | Plans Complete | Status | Completed |
|-------|----------------|--------|-----------|
| 1. Foundation | 0/2 | Planning complete | - |
| 1. Foundation | 2/2 | Complete | 2026-03-15 |
| 2. Rooms and Tasks | 0/TBD | Not started | - |
| 3. Daily Plan and Cleanliness | 0/TBD | Not started | - |
| 4. Notifications | 0/TBD | Not started | - |

View File

@@ -1,3 +1,19 @@
---
gsd_state_version: 1.0
milestone: v1.0
milestone_name: milestone
status: planning
stopped_at: Completed 01-02-PLAN.md -- Phase 1 complete, ready for Phase 2 planning
last_updated: "2026-03-15T19:09:57.073Z"
last_activity: 2026-03-15 — Completed 01-02-PLAN.md (navigation shell, screens, settings, full app wiring)
progress:
total_phases: 4
completed_phases: 1
total_plans: 2
completed_plans: 2
percent: 100
---
# Project State
## Project Reference
@@ -9,29 +25,29 @@ See: .planning/PROJECT.md (updated 2026-03-15)
## Current Position
Phase: 1 of 4 (Foundation)
Plan: 1 of 2 in current phase
Status: Executing
Last activity: 2026-03-15 — Completed 01-01-PLAN.md (project scaffold, core infrastructure, tests)
Phase: 1 of 4 (Foundation) -- COMPLETE
Plan: 2 of 2 in current phase
Status: Phase complete -- ready for Phase 2 planning
Last activity: 2026-03-15 — Completed 01-02-PLAN.md (navigation shell, screens, settings, full app wiring)
Progress: [█░░░░░░░░░] 10%
Progress: [██████████] 100%
## Performance Metrics
**Velocity:**
- Total plans completed: 1
- Average duration: 7 min
- Total execution time: 0.1 hours
- Total plans completed: 2
- Average duration: 7.5 min
- Total execution time: 0.25 hours
**By Phase:**
| Phase | Plans | Total | Avg/Plan |
|-------|-------|-------|----------|
| 1 - Foundation | 1 | 7 min | 7 min |
| 1 - Foundation | 2 | 15 min | 7.5 min |
**Recent Trend:**
- Last 5 plans: 01-01 (7 min)
- Trend: baseline
- Last 5 plans: 01-01 (7 min), 01-02 (8 min)
- Trend: stable
*Updated after each plan completion*
@@ -49,6 +65,7 @@ Recent decisions affecting current work:
- [Pre-phase]: drift_dev make-migrations workflow must be established in Phase 1 — recovery cost is data loss
- [01-01]: Pinned drift/drift_dev to 2.31.0 for analyzer ^9.0.0 compatibility with riverpod_generator 4.0.3
- [01-01]: Generated Riverpod 3 provider named themeProvider (not themeNotifierProvider) per new naming convention
- [Phase 01-02]: Used themeProvider (Riverpod 3 naming) instead of themeNotifierProvider referenced in plan
### Pending Todos
@@ -62,6 +79,6 @@ None yet.
## Session Continuity
Last session: 2026-03-15
Stopped at: Completed 01-01-PLAN.md -- ready for 01-02-PLAN.md
Last session: 2026-03-15T19:09:57.071Z
Stopped at: Completed 01-02-PLAN.md -- Phase 1 complete, ready for Phase 2 planning
Resume file: None

View File

@@ -0,0 +1,136 @@
---
phase: 01-foundation
plan: 02
subsystem: ui
tags: [flutter, go-router, material3, navigation-bar, riverpod, arb-localization]
# Dependency graph
requires:
- phase: 01-foundation plan 01
provides: Drift database, Riverpod providers, AppTheme, ThemeNotifier, German ARB localization
provides:
- GoRouter with StatefulShellRoute.indexedStack and 3-tab bottom navigation
- App shell (Scaffold + NavigationBar) with localized tab labels and thematic icons
- Home placeholder screen with empty state and cross-tab navigation to Rooms
- Rooms placeholder screen with empty state and action button
- Settings screen with SegmentedButton theme switcher and About section
- Fully wired MaterialApp.router with theme, localization, and Riverpod integration
- App shell widget test verifying navigation destinations
affects: [02-rooms-and-tasks, 03-daily-plan]
# Tech tracking
tech-stack:
added: []
patterns: [StatefulShellRoute.indexedStack for tab navigation, ConsumerWidget for Riverpod-connected screens, SegmentedButton for enum selection]
key-files:
created:
- lib/core/router/router.dart
- lib/shell/app_shell.dart
- lib/features/home/presentation/home_screen.dart
- lib/features/rooms/presentation/rooms_screen.dart
- lib/features/settings/presentation/settings_screen.dart
- lib/app.dart
- test/shell/app_shell_test.dart
modified:
- lib/main.dart
key-decisions:
- "Used themeProvider (not themeNotifierProvider) -- Riverpod 3 generates without Notifier suffix"
patterns-established:
- "StatefulShellRoute.indexedStack with GoRoute branches for tab navigation"
- "ConsumerWidget for screens needing Riverpod state (Settings)"
- "AppLocalizations.of(context) for all user-facing text -- zero hardcoded German in Dart"
- "SegmentedButton<ThemeMode> pattern for enum-based settings"
requirements-completed: [FOUND-03, FOUND-04, THEME-01, THEME-02]
# Metrics
duration: 8min
completed: 2026-03-15
---
# Phase 1 Plan 02: Navigation Shell and Screens Summary
**GoRouter 3-tab navigation shell with localized Home/Rooms/Settings screens, SegmentedButton theme switcher persisting via SharedPreferences, and full MaterialApp.router integration -- 16 tests passing, debug APK building**
## Performance
- **Duration:** 8 min
- **Started:** 2026-03-15T19:01:00Z
- **Completed:** 2026-03-15T19:09:00Z
- **Tasks:** 3
- **Files modified:** 8
## Accomplishments
- GoRouter with StatefulShellRoute.indexedStack providing 3-branch tab navigation (Home, Rooms, Settings)
- App shell with NavigationBar using localized German labels ("Ubersicht", "Raume", "Einstellungen") and thematic Material icons
- Home and Rooms placeholder screens with playful empty states and action buttons (Home cross-navigates to Rooms tab)
- Settings screen with grouped sections: "Darstellung" (SegmentedButton theme switcher for System/Hell/Dunkel) and "Uber" (app name, tagline, version)
- MaterialApp.router wired with GoRouter config, light/dark themes, themeMode from ThemeNotifier, and German localization
- App shell widget test verifying 3 navigation destinations with correct German labels
- Complete Phase 1 app: compiles, launches, passes all 16 tests, builds debug APK
## Task Commits
Each task was committed atomically:
1. **Task 1: Create router, navigation shell, all three screens, and app shell test** - `f2dd737` (feat)
2. **Task 2: Wire app.dart and main.dart -- launchable app with full integration** - `014722a` (feat)
3. **Task 3: Visual and functional verification** - checkpoint auto-approved (no code changes)
## Files Created/Modified
- `lib/core/router/router.dart` - GoRouter with StatefulShellRoute.indexedStack and 3 branches (/, /rooms, /settings)
- `lib/shell/app_shell.dart` - Scaffold with NavigationBar, localized labels, thematic icons
- `lib/features/home/presentation/home_screen.dart` - Empty state placeholder with cross-navigation to Rooms tab
- `lib/features/rooms/presentation/rooms_screen.dart` - Empty state placeholder with action button
- `lib/features/settings/presentation/settings_screen.dart` - SegmentedButton theme switcher + About section
- `lib/app.dart` - MaterialApp.router with theme, localization, and Riverpod integration
- `lib/main.dart` - Entry point wrapping App in ProviderScope
- `test/shell/app_shell_test.dart` - Widget test for navigation shell (FOUND-04)
## Decisions Made
- **Used themeProvider instead of themeNotifierProvider:** Riverpod 3 generates the provider name as `themeProvider` (dropping the Notifier suffix). Plan referenced `themeNotifierProvider` based on older convention. All code uses the correct generated name.
## Deviations from Plan
### Auto-fixed Issues
**1. [Rule 1 - Bug] Used themeProvider instead of themeNotifierProvider**
- **Found during:** Task 1 (settings screen and app shell test)
- **Issue:** Plan referenced `themeNotifierProvider` but Riverpod 3 code generation produces `themeProvider`
- **Fix:** Used correct generated name `themeProvider` throughout all new code
- **Files modified:** lib/features/settings/presentation/settings_screen.dart, lib/app.dart, test/shell/app_shell_test.dart
- **Verification:** dart analyze passes cleanly, all tests pass
- **Committed in:** f2dd737 and 014722a (Task 1 and Task 2 commits)
---
**Total deviations:** 1 auto-fixed (1 bug -- naming convention)
**Impact on plan:** Trivial naming difference. No scope creep.
## Issues Encountered
None
## User Setup Required
None - no external service configuration required.
## Next Phase Readiness
- Phase 1 complete: app launches with full 3-tab navigation, theme switching, and localization
- Drift database ready to receive Room and Task tables in Phase 2
- Rooms screen placeholder ready to be replaced with room list + CRUD in Phase 2
- Home screen placeholder ready to be replaced with daily plan view in Phase 3
- Settings screen pattern established for adding notification settings in Phase 4
- All 16 tests passing (database, theme, color scheme, localization, app shell)
## Self-Check: PASSED
- All 8 key files verified present on disk
- Both task commits verified in git log (f2dd737, 014722a)
- Task 3 was checkpoint (auto-approved, no code changes)
---
*Phase: 01-foundation*
*Completed: 2026-03-15*