15 Commits

Author SHA1 Message Date
998f2be87f docs(phase-2): complete context and implementation planning
- Documented comprehensive plan for Phase 2: Rooms and Tasks
- Includes feature scope, requirements, implementation decisions, UI/UX specifics, and scheduling logic
- Updated schema: added Room and Task tables with CRUD and recurrence support
- Added implementation details for room/task templates, cleanliness indicators, and overdue task handling
- Generated Drift schemas for database versioning (v1 → v2) with test coverage
2026-03-16 18:39:00 +01:00
77de7cdbf3 feat(04-02): add widget tests for notification settings UI
- 5 tests for Benachrichtigungen section: header rendering, toggle OFF default,
  time picker visibility on/off with AnimatedSize, formatted time display
- Uses notificationSettingsProvider.overrideWithValue for test isolation
- Uses themeProvider.overrideWithValue to avoid SharedPreferences dependency
- UncontrolledProviderScope + ProviderContainer follows home_screen_test pattern
- All 89 tests pass (84 existing + 5 new)
2026-03-16 15:07:26 +01:00
4f72eac933 feat(04-01): NotificationSettingsNotifier with SharedPreferences persistence and full test suite
- Fix NotificationService API calls to use flutter_local_notifications v21 named parameters
- Expose nextInstanceOf as @visibleForTesting public method for unit testing
- Create NotificationSettingsNotifier with @Riverpod(keepAlive: true)
- NotificationSettings data class with enabled bool + TimeOfDay fields
- Persist notifications_enabled, notifications_hour, notifications_minute to SharedPreferences
- Sync default state in build(), async _load() overrides on hydration
- Update tests to use correct Riverpod 3 provider name (notificationSettingsProvider)
- Add makeContainer() helper to await initial _load() before asserting mutations
- All 84 tests pass (72 existing + 12 new notification tests)
2026-03-16 14:57:04 +01:00
0f6789becd test(04-01): add failing tests for NotificationSettingsNotifier and NotificationService
- Tests for default state (enabled=false, time=07:00)
- Tests for setEnabled persistence to SharedPreferences
- Tests for setTime persistence to SharedPreferences
- Tests for loading persisted values via _load()
- Tests for NotificationService singleton pattern
- Tests for nextInstanceOf timezone logic (future/past time)
2026-03-16 14:54:39 +01:00
e7e6ed4946 fix(03-03): resolve dart analyze warnings in test files
- Remove unused drift import in daily_plan_dao_test
- Fix unused local variable in tasks_dao_test
- Switch ProviderScope to UncontrolledProviderScope in home_screen_test
  and app_shell_test to resolve riverpod_lint scoped_providers warning

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 12:51:39 +01:00
444213ece1 feat(03-02): rewrite HomeScreen with daily plan UI, completion animation, empty states, and tests
- Complete HomeScreen rewrite: progress card, overdue/today/tomorrow sections
- Animated task completion with SizeTransition + SlideTransition on checkbox tap
- "All clear" celebration state when all tasks done, "no tasks" state for first-run
- Room name tags navigate to room task list via context.go
- 6 widget tests covering empty, all-clear, normal state, overdue, tomorrow sections
- Fixed app_shell_test to override dailyPlanProvider for new HomeScreen dependency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 12:39:04 +01:00
74b3bd5543 test(03-01): add failing tests for DailyPlanDao cross-room query and completion count
- 7 failing tests for watchAllTasksWithRoomName and watchCompletionsToday
- DAO stub with UnimplementedError methods registered in AppDatabase
- TaskWithRoom and DailyPlanState model classes defined

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 12:28:21 +01:00
76cd98300d fix: use ValueKey<String> for reorderable grid and add status bar padding
flutter_reorderable_grid_view requires String keys, not int. Also
adds safe area top padding so the room grid doesn't overlap the
system status bar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 22:59:24 +01:00
652ff0123f feat(02-03): create task providers, form screen with frequency and effort selectors
- TaskActions AsyncNotifier for create, update, delete, complete task mutations
- tasksInRoomProvider manual StreamProvider.family wrapping TasksDao.watchTasksInRoom
- TaskFormScreen with name, frequency (10 presets + custom), effort (3-way segmented),
  description, and initial due date picker (German DD.MM.YYYY format)
- Custom frequency: number + unit picker (Tage/Wochen/Monate)
- Calendar-anchored intervals auto-set anchorDay from due date
- Edit mode loads existing task and pre-fills all fields
- 19 new German localization keys for task form, delete, and empty state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 22:07:53 +01:00
519a56bef7 feat(02-02): build rooms screen with reorderable card grid and room card
- Replace placeholder RoomsScreen with ConsumerWidget watching roomWithStatsProvider
- Create RoomCard with icon, name, due count badge, cleanliness progress bar
- 2-column ReorderableBuilder grid with drag-and-drop reorder
- Empty state, loading, error states with retry
- Long-press menu for edit/delete with confirmation dialog
- FAB for room creation navigation
- Update app_shell_test with provider override for rooms stream

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 22:07:09 +01:00
da270e5457 feat(02-01): German task templates for 14 room types with detectRoomType
- Create TaskTemplate class with name, intervalType, intervalDays, effortLevel
- Add roomTemplates const map with 3-6 templates per room type (14 total)
- Implement detectRoomType with case-insensitive matching and alias support
- Room types: kueche, badezimmer, schlafzimmer, wohnzimmer, flur, buero,
  garage, balkon, waschkueche, keller, kinderzimmer, gaestezimmer, esszimmer, garten
- All 11 template tests passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 21:52:05 +01:00
d2e452655c feat(02-01): Drift tables, DAOs, scheduling utility, domain models with tests
- Add Rooms, Tasks, TaskCompletions Drift tables with schema v2 migration
- Create RoomsDao with CRUD, watchAll, watchWithStats, cascade delete, reorder
- Create TasksDao with CRUD, watchInRoom (sorted by due), completeTask, overdue detection
- Implement calculateNextDueDate and catchUpToPresent pure scheduling functions
- Define IntervalType enum (8 types), EffortLevel enum, FrequencyInterval model
- Add formatRelativeDate German formatter and curatedRoomIcons icon list
- Enable PRAGMA foreign_keys in beforeOpen migration strategy
- All 30 unit tests passing (17 scheduling + 6 rooms DAO + 7 tasks DAO)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 21:50:12 +01:00
f2dd737e9e feat(01-02): create router, navigation shell, screens, and app shell test
- GoRouter with StatefulShellRoute.indexedStack and 3 branches (Home, Rooms, Settings)
- AppShell with NavigationBar using localized labels and thematic icons
- HomeScreen with empty state and cross-navigation to Rooms tab
- RoomsScreen with empty state and placeholder action button
- SettingsScreen with SegmentedButton theme switcher and About section
- Widget test verifying 3 navigation destinations with correct German labels

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 20:04:59 +01:00
51738f78bc feat(01-01): add core infrastructure, localization, and Wave 0 tests
- AppDatabase with schemaVersion 1, in-memory executor for testing
- Database provider with @Riverpod(keepAlive: true)
- AppTheme with sage green seed ColorScheme and warm surface overrides
- ThemeNotifier with SharedPreferences persistence, defaults to system
- Full German ARB localization (15 keys) with proper umlauts
- Minimal main.dart with ProviderScope placeholder
- Drift schema v1 captured via make-migrations
- All .g.dart files generated via build_runner
- Wave 0 tests: database (3), color scheme (6), theme (3), localization (2) -- 14 total, all passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 19:59:44 +01:00
4b27aeadf6 chore(01-01): scaffold Flutter project with all dependencies and tooling
- Flutter project created with flutter create (Android platform)
- Runtime deps: flutter_riverpod, riverpod_annotation, drift 2.31, drift_flutter, go_router, path_provider, shared_preferences, flutter_localizations, intl
- Dev deps: riverpod_generator, drift_dev 2.31, build_runner
- Pinned drift/drift_dev to 2.31 for analyzer ^9.0.0 compatibility with riverpod_generator
- Configured l10n.yaml, build.yaml (Drift), analysis_options.yaml (riverpod_lint)
- Minimal ARB file for localization tooling to resolve

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 19:55:46 +01:00