docs(03-02): complete daily plan UI plan
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -36,13 +36,13 @@ Requirements for initial release. Each maps to roadmap phases.
|
||||
- [x] **PLAN-01**: User sees all tasks due today grouped by room on the daily plan screen (primary/default screen)
|
||||
- [x] **PLAN-02**: Overdue tasks appear in a separate highlighted section at the top of the daily plan
|
||||
- [x] **PLAN-03**: User can preview upcoming tasks (tomorrow / this week)
|
||||
- [ ] **PLAN-04**: User can swipe-to-complete or tap checkbox to mark tasks done directly from the daily plan view
|
||||
- [x] **PLAN-04**: User can swipe-to-complete or tap checkbox to mark tasks done directly from the daily plan view
|
||||
- [x] **PLAN-05**: User sees a progress indicator showing completed vs total tasks for today (e.g. "5 of 12 tasks done")
|
||||
- [ ] **PLAN-06**: When no tasks are due, user sees an encouraging "all clear" empty state
|
||||
- [x] **PLAN-06**: When no tasks are due, user sees an encouraging "all clear" empty state
|
||||
|
||||
### Cleanliness Indicator
|
||||
|
||||
- [ ] **CLEAN-01**: Each room card displays a cleanliness indicator derived from the ratio of overdue tasks to total tasks in that room
|
||||
- [x] **CLEAN-01**: Each room card displays a cleanliness indicator derived from the ratio of overdue tasks to total tasks in that room
|
||||
|
||||
### Notifications
|
||||
|
||||
@@ -143,10 +143,10 @@ Which phases cover which requirements. Updated during roadmap creation.
|
||||
| PLAN-01 | Phase 3: Daily Plan and Cleanliness | Complete |
|
||||
| PLAN-02 | Phase 3: Daily Plan and Cleanliness | Complete |
|
||||
| PLAN-03 | Phase 3: Daily Plan and Cleanliness | Complete |
|
||||
| PLAN-04 | Phase 3: Daily Plan and Cleanliness | Pending |
|
||||
| PLAN-04 | Phase 3: Daily Plan and Cleanliness | Complete |
|
||||
| PLAN-05 | Phase 3: Daily Plan and Cleanliness | Complete |
|
||||
| PLAN-06 | Phase 3: Daily Plan and Cleanliness | Pending |
|
||||
| CLEAN-01 | Phase 3: Daily Plan and Cleanliness | Pending |
|
||||
| PLAN-06 | Phase 3: Daily Plan and Cleanliness | Complete |
|
||||
| CLEAN-01 | Phase 3: Daily Plan and Cleanliness | Complete |
|
||||
| NOTF-01 | Phase 4: Notifications | Pending |
|
||||
| NOTF-02 | Phase 4: Notifications | Pending |
|
||||
|
||||
|
||||
@@ -92,5 +92,5 @@ Note: Phase 4 depends on Phase 2 (needs scheduling data) but can be developed in
|
||||
|-------|----------------|--------|-----------|
|
||||
| 1. Foundation | 2/2 | Complete | 2026-03-15 |
|
||||
| 2. Rooms and Tasks | 5/5 | Complete | 2026-03-15 |
|
||||
| 3. Daily Plan and Cleanliness | 0/3 | In progress | - |
|
||||
| 3. Daily Plan and Cleanliness | 2/3 | In Progress| |
|
||||
| 4. Notifications | 0/TBD | Not started | - |
|
||||
|
||||
@@ -3,15 +3,15 @@ gsd_state_version: 1.0
|
||||
milestone: v1.0
|
||||
milestone_name: milestone
|
||||
status: executing
|
||||
stopped_at: Completed 03-01-PLAN.md
|
||||
last_updated: "2026-03-16T11:31:13Z"
|
||||
last_activity: 2026-03-16 — Completed 03-01-PLAN.md (daily plan data layer)
|
||||
stopped_at: Completed 03-02-PLAN.md
|
||||
last_updated: "2026-03-16T11:39:17Z"
|
||||
last_activity: 2026-03-16 — Completed 03-02-PLAN.md (daily plan UI)
|
||||
progress:
|
||||
total_phases: 4
|
||||
completed_phases: 2
|
||||
total_plans: 10
|
||||
completed_plans: 8
|
||||
percent: 80
|
||||
completed_plans: 9
|
||||
percent: 90
|
||||
---
|
||||
|
||||
# Project State
|
||||
@@ -26,18 +26,18 @@ See: .planning/PROJECT.md (updated 2026-03-15)
|
||||
## Current Position
|
||||
|
||||
Phase: 3 of 4 (Daily Plan and Cleanliness)
|
||||
Plan: 1 of 3 in current phase -- COMPLETE
|
||||
Status: Executing Phase 3 -- Plan 01 complete, Plan 02 next
|
||||
Last activity: 2026-03-16 — Completed 03-01-PLAN.md (daily plan data layer)
|
||||
Plan: 2 of 3 in current phase -- COMPLETE
|
||||
Status: Executing Phase 3 -- Plan 02 complete, Plan 03 next
|
||||
Last activity: 2026-03-16 — Completed 03-02-PLAN.md (daily plan UI)
|
||||
|
||||
Progress: [████████--] 80%
|
||||
Progress: [█████████░] 90%
|
||||
|
||||
## Performance Metrics
|
||||
|
||||
**Velocity:**
|
||||
- Total plans completed: 8
|
||||
- Average duration: 6.9 min
|
||||
- Total execution time: 0.9 hours
|
||||
- Total plans completed: 9
|
||||
- Average duration: 6.6 min
|
||||
- Total execution time: 1.0 hours
|
||||
|
||||
**By Phase:**
|
||||
|
||||
@@ -45,11 +45,11 @@ Progress: [████████--] 80%
|
||||
|-------|-------|-------|----------|
|
||||
| 1 - Foundation | 2 | 15 min | 7.5 min |
|
||||
| 2 - Rooms and Tasks | 5 | 35 min | 7.0 min |
|
||||
| 3 - Daily Plan and Cleanliness | 1 | 5 min | 5.0 min |
|
||||
| 3 - Daily Plan and Cleanliness | 2 | 9 min | 4.5 min |
|
||||
|
||||
**Recent Trend:**
|
||||
- Last 5 plans: 02-02 (11 min), 02-03 (12 min), 02-04 (3 min), 02-05 (1 min), 03-01 (5 min)
|
||||
- Trend: Data layer plan with TDD completed in 5 min
|
||||
- Last 5 plans: 02-03 (12 min), 02-04 (3 min), 02-05 (1 min), 03-01 (5 min), 03-02 (4 min)
|
||||
- Trend: UI plan with animation and tests completed in 4 min
|
||||
|
||||
*Updated after each plan completion*
|
||||
| Phase 02 P01 | 8 | 2 tasks | 16 files |
|
||||
@@ -58,6 +58,7 @@ Progress: [████████--] 80%
|
||||
| Phase 02 P04 | 3 | 2 tasks | 5 files |
|
||||
| Phase 02 P05 | 1 | 1 task | 0 files |
|
||||
| Phase 03 P01 | 5 | 2 tasks | 10 files |
|
||||
| Phase 03 P02 | 4 | 2 tasks | 5 files |
|
||||
|
||||
## Accumulated Context
|
||||
|
||||
@@ -96,6 +97,9 @@ Recent decisions affecting current work:
|
||||
- [03-01]: watchCompletionsToday uses customSelect with readsFrom for proper stream invalidation
|
||||
- [03-01]: dailyPlanProvider uses manual StreamProvider.autoDispose (not @riverpod) due to drift Task type issue
|
||||
- [03-01]: Progress total = remaining overdue + remaining today + completedTodayCount for stable denominator
|
||||
- [03-02]: Used stream-driven completion with local _completingTaskIds Set for animation instead of AnimatedList
|
||||
- [03-02]: DailyPlanTaskRow is StatelessWidget (not ConsumerWidget) -- completion callback passed in from parent
|
||||
- [03-02]: No-tasks empty state uses dailyPlanNoTasks key for clearer daily plan context messaging
|
||||
|
||||
### Pending Todos
|
||||
|
||||
@@ -109,6 +113,6 @@ None yet.
|
||||
|
||||
## Session Continuity
|
||||
|
||||
Last session: 2026-03-16T11:31:13Z
|
||||
Stopped at: Completed 03-01-PLAN.md
|
||||
Last session: 2026-03-16T11:39:17Z
|
||||
Stopped at: Completed 03-02-PLAN.md
|
||||
Resume file: None
|
||||
|
||||
130
.planning/phases/03-daily-plan-and-cleanliness/03-02-SUMMARY.md
Normal file
130
.planning/phases/03-daily-plan-and-cleanliness/03-02-SUMMARY.md
Normal file
@@ -0,0 +1,130 @@
|
||||
---
|
||||
phase: 03-daily-plan-and-cleanliness
|
||||
plan: 02
|
||||
subsystem: ui
|
||||
tags: [flutter, riverpod, widget, animation, localization, consumer-stateful]
|
||||
|
||||
# Dependency graph
|
||||
requires:
|
||||
- phase: 03-daily-plan-and-cleanliness
|
||||
provides: DailyPlanDao, DailyPlanState, dailyPlanProvider, TaskWithRoom model, 10 localization keys
|
||||
- phase: 02-rooms-and-tasks
|
||||
provides: taskActionsProvider for task completion, GoRouter routes for room navigation
|
||||
provides:
|
||||
- Complete daily plan HomeScreen replacing placeholder
|
||||
- DailyPlanTaskRow widget with room tag navigation and optional checkbox
|
||||
- ProgressCard widget with linear progress bar
|
||||
- Animated task completion (SizeTransition + SlideTransition)
|
||||
- Empty states for no-tasks and all-clear scenarios
|
||||
- 6 widget tests for HomeScreen states
|
||||
affects: [03-03-phase-verification]
|
||||
|
||||
# Tech tracking
|
||||
tech-stack:
|
||||
added: []
|
||||
patterns:
|
||||
- "ConsumerStatefulWidget with local animation state for task completion"
|
||||
- "Provider override pattern for widget tests without database"
|
||||
- "SizeTransition + SlideTransition combo for animated list item removal"
|
||||
|
||||
key-files:
|
||||
created:
|
||||
- lib/features/home/presentation/daily_plan_task_row.dart
|
||||
- lib/features/home/presentation/progress_card.dart
|
||||
- test/features/home/presentation/home_screen_test.dart
|
||||
modified:
|
||||
- lib/features/home/presentation/home_screen.dart
|
||||
- test/shell/app_shell_test.dart
|
||||
|
||||
key-decisions:
|
||||
- "Used simpler stream-driven approach with local _completingTaskIds for animation instead of AnimatedList"
|
||||
- "DailyPlanTaskRow is StatelessWidget (not ConsumerWidget) -- completion callback passed in from parent"
|
||||
- "No-tasks empty state uses dailyPlanNoTasks key (not homeEmptyTitle) for clearer messaging"
|
||||
|
||||
patterns-established:
|
||||
- "DailyPlan task row: room tag as tappable Container with secondaryContainer color, no row-tap navigation"
|
||||
- "Completing animation: track IDs in local Set, wrap in SizeTransition/SlideTransition, stream re-emission cleans up"
|
||||
|
||||
requirements-completed: [PLAN-04, PLAN-06, CLEAN-01]
|
||||
|
||||
# Metrics
|
||||
duration: 4min
|
||||
completed: 2026-03-16
|
||||
---
|
||||
|
||||
# Phase 3 Plan 02: Daily Plan UI Summary
|
||||
|
||||
**Complete daily plan HomeScreen with progress card, overdue/today/tomorrow sections, animated checkbox completion, and celebration empty state**
|
||||
|
||||
## Performance
|
||||
|
||||
- **Duration:** 4 min
|
||||
- **Started:** 2026-03-16T11:35:00Z
|
||||
- **Completed:** 2026-03-16T11:39:17Z
|
||||
- **Tasks:** 2
|
||||
- **Files modified:** 5
|
||||
|
||||
## Accomplishments
|
||||
- HomeScreen fully rewritten from placeholder to complete daily plan with progress card, three task sections, and animated completion
|
||||
- DailyPlanTaskRow with tappable room name tag (navigates to room), relative date (coral if overdue), optional checkbox, no row-tap
|
||||
- ProgressCard showing "X von Y erledigt" with LinearProgressIndicator
|
||||
- Animated task completion: checkbox tap triggers SizeTransition + SlideTransition animation while stream re-emission permanently removes the task
|
||||
- Three empty states: no-tasks (first-run), all-clear (celebration), all-clear-with-tomorrow
|
||||
- 6 widget tests covering all states; 72/72 tests passing with no regressions
|
||||
|
||||
## Task Commits
|
||||
|
||||
Each task was committed atomically:
|
||||
|
||||
1. **Task 1: DailyPlanTaskRow and ProgressCard widgets** - `4e3a3ed` (feat)
|
||||
2. **Task 2: HomeScreen rewrite with daily plan sections, animated completion, empty state, and tests** - `444213e` (feat)
|
||||
|
||||
## Files Created/Modified
|
||||
- `lib/features/home/presentation/daily_plan_task_row.dart` - Task row for daily plan with room tag, relative date, optional checkbox
|
||||
- `lib/features/home/presentation/progress_card.dart` - Progress banner card with linear progress bar
|
||||
- `lib/features/home/presentation/home_screen.dart` - Complete rewrite: ConsumerStatefulWidget with daily plan UI
|
||||
- `test/features/home/presentation/home_screen_test.dart` - 6 widget tests for empty, all-clear, normal states
|
||||
- `test/shell/app_shell_test.dart` - Updated to override dailyPlanProvider for new HomeScreen
|
||||
|
||||
## Decisions Made
|
||||
- Used simpler stream-driven completion with local `_completingTaskIds` Set instead of AnimatedList. The stream naturally re-emits without completed tasks (nextDueDate moves to future), and the local Set provides immediate visual feedback via SizeTransition + SlideTransition animation during the ~300ms before re-emission.
|
||||
- DailyPlanTaskRow is a plain StatelessWidget (not ConsumerWidget). It receives `TaskWithRoom`, `showCheckbox`, and `onCompleted` callback from the parent. This keeps it decoupled from Riverpod and easily testable.
|
||||
- The "no tasks" empty state now uses `dailyPlanNoTasks` ("Noch keine Aufgaben angelegt") instead of `homeEmptyTitle` ("Noch nichts zu tun!") for more specific messaging in the daily plan context.
|
||||
|
||||
## Deviations from Plan
|
||||
|
||||
### Auto-fixed Issues
|
||||
|
||||
**1. [Rule 1 - Bug] Updated app_shell_test.dart for new HomeScreen dependency**
|
||||
- **Found during:** Task 2 (HomeScreen rewrite)
|
||||
- **Issue:** Existing app_shell_test.dart expected `homeEmptyTitle` text on home tab, but new HomeScreen watches `dailyPlanProvider` and shows different empty state text
|
||||
- **Fix:** Added `dailyPlanProvider` override to test's ProviderScope, updated assertion from "Noch nichts zu tun!" to "Noch keine Aufgaben angelegt"
|
||||
- **Files modified:** test/shell/app_shell_test.dart
|
||||
- **Verification:** Full test suite passes (72/72)
|
||||
- **Committed in:** 444213e (Task 2 commit)
|
||||
|
||||
---
|
||||
|
||||
**Total deviations:** 1 auto-fixed (1 bug fix)
|
||||
**Impact on plan:** Necessary fix for existing test compatibility. No scope creep.
|
||||
|
||||
## Issues Encountered
|
||||
- "Heute" text appeared twice in overdue+today test (section header + relative date for today task). Fixed by using `findsAtLeast(1)` matcher instead of `findsOneWidget`.
|
||||
|
||||
## User Setup Required
|
||||
|
||||
None - no external service configuration required.
|
||||
|
||||
## Next Phase Readiness
|
||||
- Daily plan UI complete: HomeScreen shows progress, overdue, today, and tomorrow sections
|
||||
- Plan 03 (verification gate) can proceed to validate full Phase 3 integration
|
||||
- CLEAN-01 verified: room cards already display cleanliness indicator from Phase 2
|
||||
- 72/72 tests passing, dart analyze clean on production code
|
||||
|
||||
## Self-Check: PASSED
|
||||
|
||||
All 5 files verified present on disk. All 2 commit hashes verified in git log.
|
||||
|
||||
---
|
||||
*Phase: 03-daily-plan-and-cleanliness*
|
||||
*Completed: 2026-03-16*
|
||||
Reference in New Issue
Block a user