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
This commit is contained in:
2026-03-16 21:35:35 +01:00
parent 01de2d0f9c
commit f718ee8483
8 changed files with 863 additions and 122 deletions

View File

@@ -45,6 +45,16 @@ class CalendarDao extends DatabaseAccessor<AppDatabase>
});
}
/// Returns the total count of tasks across all rooms and dates.
///
/// Used by the UI to distinguish first-run empty state from celebration state.
Future<int> getTaskCount() async {
final countExp = tasks.id.count();
final query = selectOnly(tasks)..addColumns([countExp]);
final result = await query.getSingle();
return result.read(countExp) ?? 0;
}
/// Watch tasks whose [nextDueDate] is strictly before [referenceDate].
///
/// Returns tasks sorted by [nextDueDate] ascending (oldest first).