docs(phase-3): complete phase execution

This commit is contained in:
2026-03-16 13:00:22 +01:00
parent 8e7afd83e0
commit fd491bf87f
2 changed files with 182 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ milestone: v1.0
milestone_name: milestone milestone_name: milestone
status: verifying status: verifying
stopped_at: Completed 03-03-PLAN.md stopped_at: Completed 03-03-PLAN.md
last_updated: "2026-03-16T11:55:24.995Z" last_updated: "2026-03-16T12:00:07.373Z"
last_activity: 2026-03-16 — Completed 03-03-PLAN.md (Phase 3 verification gate) last_activity: 2026-03-16 — Completed 03-03-PLAN.md (Phase 3 verification gate)
progress: progress:
total_phases: 4 total_phases: 4

View File

@@ -0,0 +1,181 @@
---
phase: 03-daily-plan-and-cleanliness
verified: 2026-03-16T12:30:00Z
status: human_needed
score: 14/14 automated must-haves verified
human_verification:
- test: "Launch app (`flutter run`) and verify the Home tab shows the daily plan, not a placeholder"
expected: "Progress card at top showing 'X von Y erledigt' with linear progress bar"
why_human: "Visual layout and actual screen presentation cannot be verified programmatically"
- test: "If overdue tasks exist, verify the 'Uberfaellig' section header appears in warm coral color above those tasks"
expected: "Section header styled in Color(0xFFE07A5F), only visible when overdue tasks are present"
why_human: "Color rendering requires visual inspection"
- test: "Tap a checkbox on an overdue or today task"
expected: "Task animates out (SizeTransition + SlideTransition, 300ms) and progress counter updates"
why_human: "Animation behavior and timing must be observed at runtime"
- test: "Scroll down to the 'Demnaechst (N)' section and tap to expand it"
expected: "Section collapses by default; tomorrow tasks appear with no checkboxes after tap"
why_human: "ExpansionTile interaction and read-only state of tomorrow tasks requires runtime verification"
- test: "Complete all overdue and today tasks"
expected: "Screen transitions to 'Alles erledigt! (star emoji)' celebration empty state"
why_human: "Empty state transition requires actual task completion flow at runtime"
- test: "Tap the room name tag on a task row"
expected: "Navigates to that room's task list screen"
why_human: "GoRouter navigation to '/rooms/:roomId' requires runtime verification"
- test: "Switch to Rooms tab and inspect room cards"
expected: "Each room card displays a thin coloured cleanliness bar at the bottom (green=clean, coral=dirty)"
why_human: "CLEAN-01 visual indicator requires runtime inspection"
---
# Phase 3: Daily Plan and Cleanliness -- Verification Report
**Phase Goal:** Users can open the app and immediately see what needs doing today, act on tasks directly from the plan view, and see a room-level health indicator
**Verified:** 2026-03-16T12:30:00Z
**Status:** human_needed (all automated checks pass; 7 items need runtime confirmation)
**Re-verification:** No -- initial verification
---
## Goal Achievement
### Observable Truths
| # | Truth | Status | Evidence |
|----|-----------------------------------------------------------------------------------------------------|------------|--------------------------------------------------------------------------|
| 1 | DailyPlanDao.watchAllTasksWithRoomName() returns tasks joined with room name, sorted by nextDueDate | VERIFIED | `daily_plan_dao.dart` L16-33: innerJoin on rooms.id, orderBy nextDueDate asc; 4 tests cover it |
| 2 | DailyPlanDao.watchCompletionsToday() returns count of completions recorded today | VERIFIED | `daily_plan_dao.dart` L37-51: customSelect COUNT(*) with readsFrom; 3 tests cover boundaries |
| 3 | dailyPlanProvider categorizes tasks into overdue, today, and tomorrow sections | VERIFIED | `daily_plan_providers.dart` L26-43: date-only partition into overdue/todayList/tomorrowList |
| 4 | Progress total = remaining overdue + remaining today + completedTodayCount (stable denominator) | VERIFIED | `daily_plan_providers.dart` L53: `totalTodayCount: overdue.length + todayList.length + completedToday` |
| 5 | Localization keys for daily plan sections and progress text exist in app_de.arb | VERIFIED | `app_de.arb` L72-91: all 10 keys present (dailyPlanProgress, SectionOverdue, SectionToday, SectionUpcoming, UpcomingCount, AllClearTitle, AllClearMessage, NoOverdue, NoTasks) |
| 6 | User sees progress card at top with 'X von Y erledigt' and linear progress bar | VERIFIED | `progress_card.dart` L31: `l10n.dailyPlanProgress(completed, total)`; L39-44: LinearProgressIndicator; widget test confirms "2 von 3 erledigt" renders |
| 7 | User sees overdue tasks in highlighted section (warm coral) only when overdue tasks exist | VERIFIED | `home_screen.dart` L236-244: `if (state.overdueTasks.isNotEmpty)` + `color: _overdueColor`; widget test confirms section header appears |
| 8 | User sees today's tasks in a section below overdue | VERIFIED | `home_screen.dart` L246-265: always-rendered today section with DailyPlanTaskRow list |
| 9 | User sees tomorrow's tasks in collapsed 'Demnachst (N)' section that expands on tap | VERIFIED | `home_screen.dart` L313-328: ExpansionTile with `initiallyExpanded: false`; widget test confirms collapse state |
| 10 | User can check a checkbox on overdue/today task -- task animates out and increments progress | VERIFIED* | `home_screen.dart` L287-305: `_completingTaskIds` Set + `_CompletingTaskRow` with SizeTransition+SlideTransition; `_onTaskCompleted` calls `taskActionsProvider.notifier.completeTask()`; *animation requires human confirmation |
| 11 | When no tasks due, user sees 'Alles erledigt!' empty state | VERIFIED | `home_screen.dart` L72-77, L138-177; widget test confirms "Alles erledigt!" text and celebration icon |
| 12 | Room name tag on each task row navigates to room's task list on tap | VERIFIED | `daily_plan_task_row.dart` L62: `context.go('/rooms/${taskWithRoom.roomId}')` on GestureDetector; *runtime navigation needs human check |
| 13 | Task rows have NO row-tap navigation -- only checkbox and room tag are interactive | VERIFIED | `daily_plan_task_row.dart` L46-92: ListTile has no `onTap` or `onLongPress`; confirmed by code inspection |
| 14 | CLEAN-01: Room cards display cleanliness indicator from Phase 2 | VERIFIED | `room_card.dart` L79-85: LinearProgressIndicator with `cleanlinessRatio`, lerped green-to-coral color |
**Score:** 14/14 truths verified (automated). 7 of these require human runtime confirmation for full confidence.
---
## Required Artifacts
| Artifact | Expected | Lines | Status | Details |
|-------------------------------------------------------------------|-------------------------------------------------------|-------|------------|--------------------------------------------------|
| `lib/features/home/data/daily_plan_dao.dart` | Cross-room join query and today's completion count | 52 | VERIFIED | innerJoin + customSelect; exports DailyPlanDao, TaskWithRoom |
| `lib/features/home/domain/daily_plan_models.dart` | DailyPlanState data class for categorized data | 31 | VERIFIED | TaskWithRoom and DailyPlanState with all required fields |
| `lib/features/home/presentation/daily_plan_providers.dart` | Riverpod provider combining task and completion stream | 56 | VERIFIED | Manual StreamProvider.autoDispose with asyncMap |
| `lib/features/home/presentation/home_screen.dart` | Complete daily plan screen replacing placeholder | 389 | VERIFIED | ConsumerStatefulWidget, all 4 states implemented |
| `lib/features/home/presentation/daily_plan_task_row.dart` | Task row with room name tag, optional checkbox | 94 | VERIFIED | StatelessWidget, GestureDetector for room tag, no row-tap |
| `lib/features/home/presentation/progress_card.dart` | Progress banner card with linear progress bar | 51 | VERIFIED | Card + LinearProgressIndicator, localized text |
| `test/features/home/data/daily_plan_dao_test.dart` | Unit tests for DAO (min 80 lines) | 166 | VERIFIED | 7 tests covering all specified behaviors |
| `test/features/home/presentation/home_screen_test.dart` | Widget tests for empty state, sections (min 40 lines) | 253 | VERIFIED | 6 widget tests covering all state branches |
---
## Key Link Verification
| From | To | Via | Status | Details |
|---------------------------------------|-----------------------------------------|-------------------------------------------------|------------|-----------------------------------------------------------|
| `daily_plan_dao.dart` | `database.dart` | @DriftAccessor registration | VERIFIED | `database.dart` L48: `daos: [RoomsDao, TasksDao, DailyPlanDao]` |
| `daily_plan_providers.dart` | `daily_plan_dao.dart` | db.dailyPlanDao.watchAllTasksWithRoomName() | VERIFIED | `daily_plan_providers.dart` L14: exact call present |
| `home_screen.dart` | `daily_plan_providers.dart` | ref.watch(dailyPlanProvider) | VERIFIED | `home_screen.dart` L42: `ref.watch(dailyPlanProvider)` |
| `home_screen.dart` | `task_providers.dart` | ref.read(taskActionsProvider.notifier).completeTask() | VERIFIED | `home_screen.dart` L35: exact call present |
| `daily_plan_task_row.dart` | `go_router` | context.go('/rooms/$roomId') on room tag tap | VERIFIED | `daily_plan_task_row.dart` L62: `context.go('/rooms/${taskWithRoom.roomId}')` |
---
## Requirements Coverage
| Requirement | Source Plan | Description | Status | Evidence |
|-------------|--------------|------------------------------------------------------------------------|------------|-----------------------------------------------------------------------------|
| PLAN-01 | 03-01, 03-03 | User sees all tasks due today (grouped by room via inline tag) | SATISFIED | `home_screen.dart` today section; room name tag on each DailyPlanTaskRow |
| PLAN-02 | 03-01, 03-03 | Overdue tasks appear in separate highlighted section at top | SATISFIED | `home_screen.dart` L236-244: conditional overdue section with coral header |
| PLAN-03 | 03-01, 03-03 | User can preview upcoming tasks (tomorrow) | SATISFIED | `home_screen.dart` L308-328: collapsed ExpansionTile for tomorrow tasks |
| PLAN-04 | 03-02, 03-03 | User can complete tasks via checkbox directly from daily plan view | SATISFIED | `home_screen.dart` L31-36: onTaskCompleted calls taskActionsProvider; animation implemented |
| PLAN-05 | 03-01, 03-03 | User sees progress indicator showing completed vs total tasks | SATISFIED | `progress_card.dart`: "X von Y erledigt" + LinearProgressIndicator |
| PLAN-06 | 03-02, 03-03 | "All clear" empty state when no tasks due | SATISFIED | `home_screen.dart` L72-77, L138-177: two all-clear states implemented |
| CLEAN-01 | 03-02, 03-03 | Room cards display cleanliness indicator (Phase 2 carry-over) | SATISFIED | `room_card.dart` L79-85: LinearProgressIndicator with cleanlinessRatio |
All 7 requirement IDs from plans are accounted for. No orphaned requirements found.
---
## Anti-Patterns Found
| File | Line | Pattern | Severity | Impact |
|------|------|---------|----------|--------|
| `home_screen.dart` | 18 | Comment mentioning "placeholder" -- describes what was replaced | Info | None -- documentation comment only, no code issue |
No blockers or warnings found. The single info item is a comment accurately describing the replacement of a prior placeholder.
---
## Human Verification Required
The following 7 items require the app to be running. All automated checks (72/72 tests pass, `dart analyze` clean) support that the code is correct; these confirm the live user experience.
### 1. Daily plan renders on Home tab
**Test:** Run `flutter run`. Switch to the Home tab.
**Expected:** Progress card ("X von Y erledigt" + progress bar) is the first thing visible, followed by task sections.
**Why human:** Visual layout and actual screen rendering cannot be verified programmatically.
### 2. Overdue section styling (PLAN-02)
**Test:** Ensure at least one task is overdue (nextDueDate in the past). Open the Home tab.
**Expected:** An "Uberfaellig" section header appears in warm coral color (0xFFE07A5F) above those tasks.
**Why human:** Color rendering and conditional section visibility require visual inspection.
### 3. Checkbox completion and animation (PLAN-04)
**Test:** Tap the checkbox on an overdue or today task.
**Expected:** The task row slides right and collapses in height over ~300ms, then disappears. Progress counter increments.
**Why human:** Animation timing and visual smoothness must be observed at runtime.
### 4. Tomorrow section collapse/expand (PLAN-03)
**Test:** Scroll to the "Demnaechst (N)" section. Observe it is collapsed. Tap it.
**Expected:** Section expands showing tomorrow's tasks with room name tags but NO checkboxes.
**Why human:** ExpansionTile interaction and the read-only state of tomorrow tasks require runtime observation.
### 5. All-clear empty state (PLAN-06)
**Test:** Complete all overdue and today tasks via checkboxes.
**Expected:** Screen transitions to the "Alles erledigt! (star emoji)" celebration state with the celebration icon.
**Why human:** Requires a complete task-completion flow with real data; state transition must be visually confirmed.
### 6. Room name tag navigation
**Test:** Tap the room name tag (small pill label) on any task row in the daily plan.
**Expected:** App navigates to that room's task list screen (`/rooms/:roomId`).
**Why human:** GoRouter navigation with the correct roomId requires runtime verification.
### 7. Cleanliness indicator on room cards (CLEAN-01)
**Test:** Switch to the Rooms tab and inspect room cards.
**Expected:** Each room card has a thin bar at the bottom, coloured from coral (dirty) to sage green (clean) based on the ratio of overdue tasks.
**Why human:** Visual indicator colour, rendering, and dynamic response to task state require live inspection.
---
## Summary
Phase 3 automated verification passes completely:
- All 14 must-have truths verified against actual code (not summary claims)
- All 8 artifacts exist, are substantive (ranging 31-389 lines), and are wired
- All 5 key links verified in the actual files
- All 7 requirement IDs (PLAN-01 through PLAN-06, CLEAN-01) satisfied with code evidence
- 72/72 tests pass; `dart analyze` reports zero issues
- No TODO/FIXME/stub anti-patterns in production code
Status is `human_needed` because the user experience goals (visual layout, animation feel, navigation flow, colour rendering) can only be fully confirmed by running the app. The code structure gives high confidence all 7 runtime items will pass.
---
_Verified: 2026-03-16T12:30:00Z_
_Verifier: Claude (gsd-verifier)_