---
phase: 10-dead-code-cleanup
plan: 01
type: execute
wave: 1
depends_on: []
files_modified:
- lib/features/home/presentation/daily_plan_providers.dart
- lib/features/home/presentation/daily_plan_task_row.dart
- lib/features/home/presentation/progress_card.dart
- lib/features/home/domain/daily_plan_models.dart
autonomous: true
requirements: [CLN-01]
must_haves:
truths:
- "daily_plan_providers.dart no longer exists in the codebase"
- "daily_plan_task_row.dart no longer exists in the codebase"
- "progress_card.dart no longer exists in the codebase"
- "DailyPlanDao is still registered in database.dart and functional"
- "TaskWithRoom class still exists and is importable by calendar system"
- "All 144 tests pass without failures"
- "dart analyze reports zero issues"
artifacts:
- path: "lib/features/home/domain/daily_plan_models.dart"
provides: "TaskWithRoom class (DailyPlanState removed)"
contains: "class TaskWithRoom"
key_links:
- from: "lib/features/home/data/calendar_dao.dart"
to: "lib/features/home/domain/daily_plan_models.dart"
via: "import for TaskWithRoom"
pattern: "import.*daily_plan_models"
- from: "lib/features/home/presentation/calendar_providers.dart"
to: "lib/features/home/domain/daily_plan_models.dart"
via: "import for TaskWithRoom"
pattern: "import.*daily_plan_models"
- from: "lib/core/database/database.dart"
to: "lib/features/home/data/daily_plan_dao.dart"
via: "DAO registration in @DriftDatabase annotation"
pattern: "DailyPlanDao"
---
Delete three orphaned v1.0 daily plan presentation files and clean up the orphaned DailyPlanState class from the domain models file, then verify no regressions.
Purpose: These files were superseded by the calendar strip (Phase 5, v1.1) but never removed. Cleaning them prevents confusion and reduces maintenance surface.
Output: Three files deleted, one file trimmed, zero test/analysis regressions.
@/home/jlmak/.claude/get-shit-done/workflows/execute-plan.md
@/home/jlmak/.claude/get-shit-done/templates/summary.md
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
Task 1: Delete orphaned files and remove DailyPlanState
lib/features/home/presentation/daily_plan_providers.dart (DELETE)
lib/features/home/presentation/daily_plan_task_row.dart (DELETE)
lib/features/home/presentation/progress_card.dart (DELETE)
lib/features/home/domain/daily_plan_models.dart (MODIFY)
1. Delete these three files entirely (use `rm` or equivalent):
- lib/features/home/presentation/daily_plan_providers.dart
- lib/features/home/presentation/daily_plan_task_row.dart
- lib/features/home/presentation/progress_card.dart
2. Edit lib/features/home/domain/daily_plan_models.dart:
- Remove the DailyPlanState class (lines 16-31) entirely. It is only used by the now-deleted daily_plan_providers.dart.
- Keep the TaskWithRoom class intact — it is used by calendar_dao.dart, calendar_models.dart, calendar_providers.dart, calendar_day_list.dart, calendar_task_row.dart, and daily_plan_dao.dart.
- Keep the existing import of database.dart at line 1.
3. DO NOT touch these files (they are still in use):
- lib/features/home/data/daily_plan_dao.dart (used by database.dart daos list and settings_screen.dart)
- lib/features/home/data/daily_plan_dao.g.dart (generated, paired with DAO)
ls lib/features/home/presentation/daily_plan_providers.dart lib/features/home/presentation/daily_plan_task_row.dart lib/features/home/presentation/progress_card.dart 2>&1 | grep -c "No such file" | grep -q 3 && grep -c "DailyPlanState" lib/features/home/domain/daily_plan_models.dart | grep -q 0 && grep -c "TaskWithRoom" lib/features/home/domain/daily_plan_models.dart | grep -qv 0 && echo "PASS" || echo "FAIL"
Three dead files deleted, DailyPlanState removed from daily_plan_models.dart, TaskWithRoom preserved
Task 2: Verify zero regressions
(no files modified — verification only)
1. Run `dart analyze` from the project root. Must report "No issues found!" with zero errors, warnings, or infos. If any issues appear related to the deleted files (unused imports, missing references), fix them — but based on codebase analysis, none are expected since the three files have zero importers.
2. Run `flutter test` from the project root. All 144 tests must pass. No test references the deleted files or DailyPlanState (confirmed via grep during planning).
3. If dart analyze reveals any issue (unexpected import of deleted file elsewhere), fix the import. This is a safety net — grep during planning found zero references, but the analyzer is authoritative.
dart analyze 2>&1 | tail -1 | grep -q "No issues found" && flutter test --reporter compact 2>&1 | tail -1 | grep -q "All tests passed" && echo "PASS" || echo "FAIL"
dart analyze reports zero issues AND all 144+ tests pass — no regressions from dead code removal
1. `ls lib/features/home/presentation/daily_plan_providers.dart` returns "No such file"
2. `ls lib/features/home/presentation/daily_plan_task_row.dart` returns "No such file"
3. `ls lib/features/home/presentation/progress_card.dart` returns "No such file"
4. `grep "DailyPlanDao" lib/core/database/database.dart` still shows the DAO in the daos list
5. `grep "TaskWithRoom" lib/features/home/domain/daily_plan_models.dart` still shows the class
6. `grep "DailyPlanState" lib/features/home/domain/daily_plan_models.dart` returns no matches
7. `dart analyze` reports zero issues
8. `flutter test` — all tests pass
- Three orphaned presentation files are deleted from the codebase
- DailyPlanState class is removed from daily_plan_models.dart
- TaskWithRoom class is preserved in daily_plan_models.dart
- DailyPlanDao is preserved and still registered in database.dart
- `dart analyze` reports zero issues
- All 144+ tests pass