Commit Graph

31 Commits

Author SHA1 Message Date
6133c977f5 feat(08-02): add delete button and confirmation dialog to TaskFormScreen
- Red FilledButton.icon with error color below history section (edit mode only)
- _onDelete shows AlertDialog with taskDeleteConfirmTitle/Message l10n strings
- Confirm calls smartDeleteTask and pops back to room task list
- Cancel dismisses dialog with no action
- Button disabled while _isLoading
- All 144 tests pass, dart analyze clean
2026-03-18 21:01:53 +01:00
1b1b981dac feat(08-02): add smartDeleteTask to TaskActions provider
- Checks completion count before deleting
- Hard-deletes tasks with 0 completions
- Soft-deletes (isActive=false) tasks with completions
- Keeps existing deleteTask method for cascade/other uses
2026-03-18 21:00:29 +01:00
b2f14dcd97 feat(08-01): add isActive filters to CalendarDao, DailyPlanDao, RoomsDao
- CalendarDao: filter all 6 task queries (watchTasksForDate,
  watchTasksForDateInRoom, watchOverdueTasks, watchOverdueTasksInRoom,
  getTaskCount, getTaskCountInRoom) by isActive=true
- DailyPlanDao: filter all 3 queries (watchAllTasksWithRoomName,
  getOverdueAndTodayTaskCount, getOverdueTaskCount) by isActive=true
- RoomsDao: filter watchRoomWithStats task query by isActive=true
- Update migration test: add schema_v3.dart, test v1->v3 and v2->v3 paths
- Update database_test schemaVersion assertion to expect 3
- Fix test helpers in home_screen_test and task_list_screen_test to pass isActive=true
2026-03-18 20:56:34 +01:00
4b51f5fa04 feat(08-01): add isActive column, migration v3, softDeleteTask and getCompletionCount
- Add isActive BoolColumn (default true) to Tasks table
- Bump schema version from 2 to 3 with addColumn migration
- Filter watchTasksInRoom to isActive=true only
- Filter getOverdueTaskCount to isActive=true only
- Add softDeleteTask(taskId) - sets isActive=false without removing data
- Add getCompletionCount(taskId) - counts TaskCompletions for a task
2026-03-18 20:49:45 +01:00
d220dbe5ce test(TaskListScreen): add integration tests for filtered and overdue task states
All checks were successful
Build and Release to F-Droid / build-and-deploy (push) Successful in 10m30s
- Covers empty states, celebration state, and scheduled/overdue task rendering
- Verifies proper checkbox behavior for future tasks
- Tests AppBar for sort dropdown, edit/delete actions, and calendar strip
- Adds necessary test helpers and overrides for room-specific tasks
2026-03-16 23:35:17 +01:00
e5eccb74e5 feat(07-02): build SortDropdown widget and integrate into HomeScreen and TaskListScreen
- Create SortDropdown ConsumerWidget using PopupMenuButton<TaskSortOption>
- Displays current sort label with sort icon in AppBar actions
- Check mark shown on active option via Opacity widget
- Add Scaffold with AppBar (title: Übersicht, actions: SortDropdown) to HomeScreen
- Add SortDropdown before edit/delete IconButtons in TaskListScreen AppBar
2026-03-16 22:37:18 +01:00
3697e4efc4 feat(07-01): integrate sort logic into calendarDayProvider and tasksInRoomProvider
- calendarDayProvider watches sortPreferenceProvider and sorts dayTasks
- overdueTasks intentionally unsorted (pinned at top per design decision)
- tasksInRoomProvider watches sortPreferenceProvider and sorts via stream.map
- _sortTasks helper (TaskWithRoom) and _sortTasksRaw helper (Task) both support:
  - alphabetical: case-insensitive A-Z by name
  - interval: by intervalType.index ascending, intervalDays as tiebreaker
  - effort: by effortLevel.index ascending (low→medium→high)
- All 113 tests pass, analyze clean
2026-03-16 22:33:34 +01:00
13c7d623ba feat(07-01): create TaskSortOption enum, SortPreferenceNotifier, and localization strings
- TaskSortOption enum with alphabetical, interval, effort values
- SortPreferenceNotifier persists sort preference to SharedPreferences
- Follows ThemeNotifier pattern: sync default (alphabetical), async load
- Generated sort_preference_notifier.g.dart via build_runner
- Added sortAlphabetical/sortInterval/sortEffort/sortLabel to app_de.arb
- Regenerated app_localizations.dart and app_localizations_de.dart
2026-03-16 22:32:06 +01:00
9f902ff2c7 feat(06-01): build task history sheet, wire into TaskFormScreen, add CalendarTaskRow navigation
- Create task_history_sheet.dart: showTaskHistorySheet() modal bottom sheet
- Sheet uses StreamBuilder on watchCompletionsForTask, shows dates in dd.MM.yyyy + HH:mm format
- Empty state: Icons.history + 'Noch nie erledigt' message
- Count summary shown above list when completions exist
- Add Verlauf ListTile to TaskFormScreen (edit mode only) opening history sheet
- Add onTap to CalendarTaskRow navigating to /rooms/:roomId/tasks/:taskId
- All 106 tests pass, zero analyze issues
2026-03-16 21:57:11 +01:00
ceae7d7d61 feat(06-01): add watchCompletionsForTask DAO method and history localization strings
- Add watchCompletionsForTask(taskId) to TasksDao: Stream<List<TaskCompletion>> sorted newest first
- Regenerate tasks_dao.g.dart with build_runner
- Add taskHistoryTitle, taskHistoryEmpty, taskHistoryCount to app_de.arb
- Regenerate app_localizations.dart and app_localizations_de.dart
- All 5 new DAO tests pass, zero analyze issues
2026-03-16 21:55:44 +01:00
88ef248a33 feat(05-02): replace HomeScreen with calendar composition and floating Today button
- Rewrite HomeScreen as ConsumerStatefulWidget composing CalendarStrip + CalendarDayList
- CalendarStripController wires floating Today button to scroll-strip-to-today animation
- FloatingActionButton.extended shows "Heute" + Icons.today only when today is out of viewport
- Old overdue/today/tomorrow stacked plan sections and ProgressCard fully removed
2026-03-16 21:35:54 +01:00
f718ee8483 feat(05-02): build CalendarStrip, CalendarTaskRow, CalendarDayList widgets
- Add totalTaskCount field to CalendarDayState to distinguish first-run from celebration
- Add getTaskCount() to CalendarDao (SELECT COUNT from tasks)
- CalendarStrip: 181-day horizontal scroll with German abbreviations, today highlighting, month boundary labels, scroll-to-today controller
- CalendarTaskRow: task name + room tag chip + checkbox, no relative date, isOverdue coral styling
- CalendarDayList: loading/error/first-run-empty/empty-day/celebration/has-tasks states, overdue section (today only), slide-out completion animation
- Update home_screen_test.dart and app_shell_test.dart to test new calendar providers instead of dailyPlanProvider
2026-03-16 21:35:35 +01:00
68ba7c65ce feat(05-01): add CalendarDayState model, Riverpod providers, and l10n strings
- CalendarDayState: selectedDate, dayTasks, overdueTasks fields with isEmpty helper
- selectedDateProvider: NotifierProvider with SelectedDateNotifier, defaults to today
- calendarDayProvider: StreamProvider.autoDispose, overdue only when viewing today
- Add calendarTodayButton l10n string ("Heute") to ARB and generated dart files
2026-03-16 21:24:07 +01:00
c666f9a1c6 feat(05-01): implement CalendarDao with date-parameterized task queries
- CalendarDao.watchTasksForDate: returns tasks due on a specific calendar day, sorted by name
- CalendarDao.watchOverdueTasks: returns tasks due strictly before reference date, sorted by due date
- Registered CalendarDao in AppDatabase @DriftDatabase annotation
- Generated calendar_dao.g.dart and updated database.g.dart
2026-03-16 21:21:07 +01:00
0103ddebbb feat(04-02): wire notification settings UI, permission flow, scheduling, and tap navigation
- Convert SettingsScreen from ConsumerWidget to ConsumerStatefulWidget
- Add Benachrichtigungen section between Darstellung and Uber sections
- SwitchListTile with permission request on toggle ON (Android 13+)
- Toggle reverts to OFF on permission denial with SnackBar hint
- AnimatedSize progressive disclosure for time picker row when enabled
- _scheduleNotification() queries DailyPlanDao for task/overdue counts
- Skip notification scheduling when task count is 0
- Notification body includes overdue split when overdue > 0
- _onPickTime() shows Material 3 showTimePicker dialog then reschedules
- Wire router.go('/') in NotificationService._onTap for tap navigation
- Regenerate AppLocalizations with 7 new notification strings from Plan 01 ARB
2026-03-16 15:06:00 +01:00
878767138c feat(04-01): Android config, NotificationService, DAO queries, timezone init, ARB strings
- Add flutter_local_notifications ^21.0.0, timezone ^0.11.0, flutter_timezone ^1.0.8 to pubspec.yaml
- Set compileSdk=35, enable core library desugaring in build.gradle.kts
- Add POST_NOTIFICATIONS, RECEIVE_BOOT_COMPLETED permissions and boot receivers to AndroidManifest.xml
- Create NotificationService singleton with initialize, requestPermission, scheduleDailyNotification, cancelAll
- Add getOverdueAndTodayTaskCount and getOverdueTaskCount one-shot queries to DailyPlanDao
- Initialize timezone and NotificationService in main.dart before runApp
- Add 7 notification-related ARB strings to app_de.arb
- All 72 existing tests pass
2026-03-16 14:52:29 +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
4e3a3ed3c2 feat(03-02): add DailyPlanTaskRow and ProgressCard widgets
- DailyPlanTaskRow: task name, tappable room tag, relative date (coral if overdue), optional checkbox, no row-tap
- ProgressCard: "X von Y erledigt" with LinearProgressIndicator

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 12:35:44 +01:00
1c09a43995 feat(03-01): add daily plan provider with date categorization and localization keys
- dailyPlanProvider: manual StreamProvider.autoDispose with overdue/today/tomorrow partitioning
- Stable progress denominator: remaining overdue + remaining today + completedTodayCount
- 10 new German localization keys for daily plan sections, progress, empty states
- dart analyze clean, full test suite (66/66) passes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 12:30:58 +01:00
ad70eb7ff1 feat(03-01): implement DailyPlanDao with cross-room join query and completion count
- watchAllTasksWithRoomName: innerJoin tasks+rooms, sorted by nextDueDate asc
- watchCompletionsToday: customSelect with readsFrom for proper stream invalidation
- All 7 DAO unit tests pass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 12:29:24 +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
03f531f896 feat(02-04): wire template selection flow into room creation
- After createRoom, detect room type via detectRoomType on room name
- Show TemplatePickerSheet if room type matches one of 14 known types
- Create tasks from selected templates with correct frequency, effort, and anchor day
- Navigate to new room after creation (with or without templates)
- Edit mode unchanged: no template prompt on room updates
- Custom rooms (no type match) skip template prompt entirely

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 22:18:33 +01:00
903567e735 feat(02-04): create template picker bottom sheet with German localization
- Add TemplatePickerSheet StatefulWidget with checklist UI for task templates
- Add showTemplatePickerSheet helper for modal display with DraggableScrollableSheet
- Add 4 German localization keys: templatePickerTitle, Skip, Add, Selected count
- All templates unchecked by default, confirm button only enabled with selection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 22:17:21 +01:00
b535f57a39 feat(02-03): build task list screen with task row, completion, and overdue highlighting
- TaskListScreen with room name in AppBar, edit/delete room actions
- AsyncValue.when for loading/error/data states with empty state
- TaskRow with leading checkbox, name, German relative due date, frequency label
- Overdue dates highlighted in warm coral (0xFFE07A5F)
- Checkbox marks done immediately (optimistic UI, no undo)
- Row tap navigates to edit form, long-press shows delete confirmation
- FAB for creating new tasks
- ListView.builder for task list sorted by due date

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 22:09:42 +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
32e61e4bec feat(02-02): create room providers, form screen, icon picker, and router routes
- Add Riverpod providers (roomWithStatsList, RoomActions) connecting to RoomsDao
- Create RoomFormScreen with name field, icon picker preview, create/edit modes
- Create IconPickerSheet bottom sheet with curated Material Icons grid
- Add nested GoRouter routes: /rooms/new, /rooms/:roomId, /rooms/:roomId/edit
- Add placeholder TaskListScreen and TaskFormScreen for Plan 03 routes
- Add 11 new German localization keys for room management UI
- Add flutter_reorderable_grid_view dependency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 22:00:57 +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