# Phase 5: Calendar Strip - Context

**Gathered:** 2026-03-16
**Status:** Ready for planning

<domain>
## Phase Boundary

Replace the stacked daily plan home screen (overdue/today/tomorrow sections) with a horizontal scrollable date-strip and day-task list. Users navigate by tapping day cards to view that day's tasks below the strip. Requirements: CAL-01 through CAL-05.

</domain>

<decisions>
## Implementation Decisions

### Day card appearance
- Each card shows: German day abbreviation (Mo, Di, Mi...) and date number only
- No task-count badges, dots, or indicators on the cards
- All cards have a light sage/green tint
- Selected card has a noticeably stronger green and is always centered in the strip
- Today's card uses bold text with an accent underline
- When today is selected, both treatments combine (bold + underline + stronger green + centered)

### Month boundary treatment (CAL-03)
- A slightly wider gap between the last day of one month and the first of the next
- A small month name label (e.g., "Apr") inserted in the gap between months

### Scroll range & navigation
- Strip scrolls both into the past and into the future (Claude picks a reasonable range balancing performance and usefulness)
- On app launch, the strip auto-scrolls to center on today with a quick slide animation (~200ms)
- A floating "Today" button appears when the user has scrolled away from today; tap to snap back. Hidden when today is already visible.

### Task list below the strip
- No ProgressCard — task list appears directly under the strip
- Overdue tasks (CAL-05) appear in a separate section with coral accent header above the day's own tasks, same pattern as current "Überfällig" section
- Task rows show: task name, tappable room tag, and checkbox — no relative date (strip already communicates which day)
- Checkboxes are interactive — tapping completes the task with the existing slide-out animation

### Empty and celebration states
- If a selected day had tasks that were all completed: show celebration state (icon + message, same spirit as current AllClear)
- If a selected day never had any tasks: simple centered "Keine Aufgaben" message with subtle icon
- First-run empty state (no rooms/tasks at all): keep the current pattern pointing user to create rooms

### Overdue carry-over behavior (CAL-05)
- Overdue tasks (due before today, not yet completed) appear in a separate "Überfällig" section when viewing today
- When viewing past days: show what was due that day (tasks whose nextDueDate matches that day)
- When viewing future days: show only tasks due that day, no overdue carry-over
- Overdue tasks use the existing warm coral/terracotta accent (#E07A5F)

### Claude's Discretion
- Exact scroll range (past and future day count)
- Day card dimensions, spacing, and border radius
- Animation curves and durations beyond the ~200ms auto-scroll
- Floating "Today" button styling and position
- How the celebration state adapts to the calendar context (may simplify from current full-screen version)
- Whether to reuse DailyPlanDao or create a new CalendarDao
- Widget architecture and state management approach

</decisions>

<specifics>
## Specific Ideas

- Day cards should feel like a unified strip with a light green wash — the selected day stands out by being a "marginally stronger green," not a completely different color. Think cohesive gradient, not toggle buttons.
- The selected card is always centered — the strip scrolls to keep the selection in the middle, giving a carousel feel.
- Month labels in the gap between months act as wayfinding, similar to section headers in a contact list.

</specifics>

<code_context>
## Existing Code Insights

### Reusable Assets
- `DailyPlanTaskRow`: Existing task row widget — can be adapted by removing the relative date display and keeping name + room tag + checkbox
- `_CompletingTaskRow`: Animated slide-out on task completion — reuse directly for calendar task list
- `ProgressCard`: Will NOT be used in the new view, but the pattern of a card above a list is established
- `_overdueColor` (#E07A5F): Warm coral constant already defined for overdue indicators — reuse as-is
- `TaskWithRoom` model: Pairs task with room name/ID — directly usable for calendar task list

### Established Patterns
- Riverpod `StreamProvider.autoDispose` for reactive data (see `dailyPlanProvider`) — calendar provider follows same pattern
- Manual provider definition (not `@riverpod`) because of drift's generated types — same constraint applies
- Feature folder structure: `features/home/data/`, `domain/`, `presentation/` — new calendar code lives here (replaces daily plan)
- German-only localization via `.arb` files and `AppLocalizations`

### Integration Points
- `HomeScreen` at route `/` in `router.dart` — the calendar screen replaces this widget entirely
- `AppShell` with bottom NavigationBar — home tab stays as-is, just the screen content changes
- `DailyPlanDao.watchAllTasksWithRoomName()` — returns all tasks sorted by nextDueDate; may need a new query or adapted filtering for arbitrary date selection
- `TaskActionsProvider` — `completeTask(taskId)` already handles task completion and nextDueDate advancement
- `AppDatabase` with `DailyPlanDao` registered — any new DAO must be registered here

</code_context>

<deferred>
## Deferred Ideas

None — discussion stayed within phase scope

</deferred>

---

*Phase: 05-calendar-strip*
*Context gathered: 2026-03-16*
