fix(01-foundation): revise plans based on checker feedback
This commit is contained in:
@@ -13,6 +13,7 @@ files_modified:
|
||||
- lib/features/home/presentation/home_screen.dart
|
||||
- lib/features/rooms/presentation/rooms_screen.dart
|
||||
- lib/features/settings/presentation/settings_screen.dart
|
||||
- test/shell/app_shell_test.dart
|
||||
autonomous: false
|
||||
requirements:
|
||||
- FOUND-03
|
||||
@@ -56,6 +57,9 @@ must_haves:
|
||||
provides: "Theme switcher (SegmentedButton) + About section with grouped headers"
|
||||
contains: "SegmentedButton"
|
||||
min_lines: 40
|
||||
- path: "test/shell/app_shell_test.dart"
|
||||
provides: "Navigation shell widget test (FOUND-04)"
|
||||
contains: "NavigationBar"
|
||||
key_links:
|
||||
- from: "lib/app.dart"
|
||||
to: "lib/core/router/router.dart"
|
||||
@@ -84,10 +88,10 @@ must_haves:
|
||||
---
|
||||
|
||||
<objective>
|
||||
Build the navigation shell, all three screens (Home placeholder, Rooms placeholder, Settings with theme switcher), and wire everything into a launchable app with full theme and localization integration.
|
||||
Build the navigation shell, all three screens (Home placeholder, Rooms placeholder, Settings with theme switcher), and wire everything into a launchable app with full theme and localization integration. Create the app shell widget test.
|
||||
|
||||
Purpose: Deliver a complete, launchable app that demonstrates the architecture established in Plan 01 -- users see the bottom navigation, can switch tabs, change themes, and all text comes from localization.
|
||||
Output: An Android app that compiles, launches, and satisfies all Phase 1 success criteria.
|
||||
Output: An Android app that compiles, launches, and satisfies all Phase 1 success criteria, with app shell test passing.
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@@ -151,13 +155,14 @@ From lib/l10n/app_de.arb (generated AppLocalizations):
|
||||
<tasks>
|
||||
|
||||
<task type="auto">
|
||||
<name>Task 1: Create router, navigation shell, and all three screens</name>
|
||||
<name>Task 1: Create router, navigation shell, all three screens, and app shell test</name>
|
||||
<files>
|
||||
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/features/settings/presentation/settings_screen.dart,
|
||||
test/shell/app_shell_test.dart
|
||||
</files>
|
||||
<action>
|
||||
1. Create `lib/core/router/router.dart` -- GoRouter with StatefulShellRoute:
|
||||
@@ -207,16 +212,24 @@ From lib/l10n/app_de.arb (generated AppLocalizations):
|
||||
- `ThemeMode.dark`: label `l10n.themeDark`, icon `Icons.dark_mode_outlined`
|
||||
- `selected: {ref.watch(themeNotifierProvider)}`
|
||||
- `onSelectionChanged: (s) => ref.read(themeNotifierProvider.notifier).setThemeMode(s.first)`
|
||||
- **Section 2 -- "Uber" (About):**
|
||||
- **Section 2 -- "Über" (About):**
|
||||
- Section header: same style, text from `l10n.settingsSectionAbout`
|
||||
- ListTile: title from `l10n.aboutAppName`, subtitle from `l10n.aboutTagline`
|
||||
- ListTile: title "Version", subtitle from `l10n.aboutVersion` with version string (use package_info_plus or hardcode "0.1.0" for now -- package_info_plus can be added later if needed)
|
||||
- A `Divider` between sections for visual separation
|
||||
|
||||
6. Create `test/shell/app_shell_test.dart` (covers FOUND-04):
|
||||
- Widget test: wrap `MaterialApp.router(routerConfig: router)` in `ProviderScope` with localization delegates and `locale: Locale('de')`
|
||||
- Pump and settle
|
||||
- Verify that 3 `NavigationDestination` widgets are rendered
|
||||
- Verify that the labels match the expected German strings from ARB (with umlauts): "Übersicht", "Räume", "Einstellungen"
|
||||
- Verify that tapping a different destination changes `selectedIndex`
|
||||
- Use `SharedPreferences.setMockInitialValues({})` for ThemeNotifier isolation
|
||||
</action>
|
||||
<verify>
|
||||
<automated>cd /home/jlmak/Projects/jlmak/HouseHoldKeaper && dart analyze 2>&1 | tail -10 && echo "PASS: All screens analyze cleanly"</automated>
|
||||
<automated>cd /home/jlmak/Projects/jlmak/HouseHoldKeaper && dart analyze 2>&1 | tail -10 && flutter test test/shell/app_shell_test.dart 2>&1 | tail -10 && echo "PASS: Screens analyze cleanly, shell test passes"</automated>
|
||||
</verify>
|
||||
<done>router.dart defines GoRouter with StatefulShellRoute.indexedStack and 3 branches. app_shell.dart renders NavigationBar with 3 tabs using localized labels and thematic icons (checklist, door, tune). home_screen.dart shows empty state with localized text and a button that navigates to /rooms. rooms_screen.dart shows empty state with localized text and action button. settings_screen.dart shows grouped sections: "Darstellung" with SegmentedButton theme switcher wired to ThemeNotifier, and "Uber" with app name, tagline, and version. All text loaded from AppLocalizations, zero hardcoded German strings in Dart code.</done>
|
||||
<done>router.dart defines GoRouter with StatefulShellRoute.indexedStack and 3 branches. app_shell.dart renders NavigationBar with 3 tabs using localized labels (with proper umlauts) and thematic icons (checklist, door, tune). home_screen.dart shows empty state with localized text and a button that navigates to /rooms. rooms_screen.dart shows empty state with localized text and action button. settings_screen.dart shows grouped sections: "Darstellung" with SegmentedButton theme switcher wired to ThemeNotifier, and "Über" with app name, tagline, and version. All text loaded from AppLocalizations, zero hardcoded German strings in Dart code. app_shell_test.dart passes, verifying 3 navigation destinations with correct labels.</done>
|
||||
</task>
|
||||
|
||||
<task type="auto">
|
||||
@@ -247,17 +260,14 @@ From lib/l10n/app_de.arb (generated AppLocalizations):
|
||||
|
||||
3. Run `dart run build_runner build --delete-conflicting-outputs` one final time to ensure all generated files are current (router may need regeneration if it uses @riverpod).
|
||||
|
||||
4. Run `flutter build apk --debug` to verify the entire app compiles for Android.
|
||||
|
||||
5. Verify the complete integration:
|
||||
4. Verify the complete integration:
|
||||
- `dart analyze` passes cleanly
|
||||
- `flutter test` passes (default test or any existing tests)
|
||||
- The app structure matches the architecture from RESEARCH.md
|
||||
- `flutter test` passes (all tests including Wave 0 tests from Plan 01)
|
||||
</action>
|
||||
<verify>
|
||||
<automated>cd /home/jlmak/Projects/jlmak/HouseHoldKeaper && flutter build apk --debug 2>&1 | tail -5 && echo "PASS: App compiles for Android"</automated>
|
||||
<automated>cd /home/jlmak/Projects/jlmak/HouseHoldKeaper && dart analyze 2>&1 | tail -5 && flutter test 2>&1 | tail -10 && echo "PASS: Analysis clean, all tests pass"</automated>
|
||||
</verify>
|
||||
<done>app.dart wires MaterialApp.router with GoRouter config, light/dark themes from AppTheme, themeMode from ThemeNotifier provider, and German localization delegates. main.dart wraps App in ProviderScope. The app compiles via `flutter build apk --debug` without errors. The complete architecture is in place: Drift database + Riverpod providers + GoRouter navigation + Material 3 theme + ARB localization.</done>
|
||||
<done>app.dart wires MaterialApp.router with GoRouter config, light/dark themes from AppTheme, themeMode from ThemeNotifier provider, and German localization delegates. main.dart wraps App in ProviderScope. `dart analyze` passes cleanly. `flutter test` passes all tests (database, theme, color scheme, localization, app shell). The complete architecture is in place: Drift database + Riverpod providers + GoRouter navigation + Material 3 theme + ARB localization. Final confirmation: `flutter build apk --debug` compiles without errors.</done>
|
||||
</task>
|
||||
|
||||
<task type="checkpoint:human-verify" gate="blocking">
|
||||
@@ -277,7 +287,7 @@ Verification checklist:
|
||||
8. Dark theme shows warm charcoal-brown surfaces (not cold gray)
|
||||
9. System theme follows device setting
|
||||
10. Theme preference persists across app restart
|
||||
11. "Uber" section shows app name and tagline
|
||||
11. "Über" section shows app name and tagline
|
||||
12. Overall sage and stone palette feels calm and warm
|
||||
</action>
|
||||
<verify>Human visually confirms all 12 checklist items pass</verify>
|
||||
@@ -285,7 +295,7 @@ Verification checklist:
|
||||
<what-built>Complete Phase 1 app: bottom navigation with 3 tabs, sage and stone theme (light/dark), playful German placeholder screens, Settings with working theme switcher and About section. All text from ARB localization.</what-built>
|
||||
<how-to-verify>
|
||||
1. Launch the app on an Android device/emulator: `flutter run`
|
||||
2. Verify bottom navigation bar shows 3 tabs with icons and German labels: "Ubersicht" (checklist icon), "Raume" (door icon), "Einstellungen" (sliders icon)
|
||||
2. Verify bottom navigation bar shows 3 tabs with icons and German labels: "Übersicht" (checklist icon), "Räume" (door icon), "Einstellungen" (sliders icon)
|
||||
3. Tap each tab -- verify it switches content and the active tab indicator uses sage green
|
||||
4. On the Home tab: verify playful empty state with icon, German text, and "Raum erstellen" button. Tap the button -- verify it navigates to the Rooms tab.
|
||||
5. On the Rooms tab: verify playful empty state with door icon and German text
|
||||
@@ -294,7 +304,7 @@ Verification checklist:
|
||||
8. Switch theme to "Dunkel" (dark) -- verify warm charcoal-brown backgrounds (NOT cold gray/black)
|
||||
9. Switch back to "System" -- verify it follows device setting
|
||||
10. Kill and relaunch the app -- verify theme preference persisted
|
||||
11. Scroll to "Uber" section -- verify app name "HouseHoldKeaper" and tagline "Dein Haushalt, entspannt organisiert."
|
||||
11. Scroll to "Über" section -- verify app name "HouseHoldKeaper" and tagline "Dein Haushalt, entspannt organisiert."
|
||||
12. Overall: confirm the sage and stone palette feels calm and warm, not clinical
|
||||
</how-to-verify>
|
||||
<resume-signal>Type "approved" to complete Phase 1, or describe any visual/functional issues to fix</resume-signal>
|
||||
@@ -303,8 +313,9 @@ Verification checklist:
|
||||
</tasks>
|
||||
|
||||
<verification>
|
||||
- `flutter build apk --debug` succeeds
|
||||
- `dart analyze` reports zero errors/warnings
|
||||
- `flutter test` passes all tests (Wave 0 + app shell test)
|
||||
- `flutter build apk --debug` succeeds
|
||||
- App launches and shows 3-tab bottom navigation
|
||||
- All UI text comes from ARB localization (no hardcoded German in .dart files)
|
||||
- Theme switching works (System/Hell/Dunkel) and persists across restart
|
||||
@@ -320,6 +331,7 @@ Verification checklist:
|
||||
- All UI strings loaded from ARB localization files (zero hardcoded German text in Dart code)
|
||||
- Settings screen has working theme switcher (System/Hell/Dunkel) that persists and About section
|
||||
- Placeholder screens show playful empty states with localized text and action buttons
|
||||
- All automated tests pass (Wave 0 tests from Plan 01 + app shell test)
|
||||
- Human verification approves the visual appearance and interaction
|
||||
</success_criteria>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user