docs(10-dead-code-cleanup): create phase plan
This commit is contained in:
@@ -72,6 +72,9 @@ Plans:
|
|||||||
**Goal**: Remove orphaned v1.0 daily plan files that are no longer used after the calendar strip replacement, keeping the codebase clean
|
**Goal**: Remove orphaned v1.0 daily plan files that are no longer used after the calendar strip replacement, keeping the codebase clean
|
||||||
**Depends on**: Phase 8 (cleanup after feature work is done)
|
**Depends on**: Phase 8 (cleanup after feature work is done)
|
||||||
**Requirements**: CLN-01
|
**Requirements**: CLN-01
|
||||||
|
**Plans:** 1 plan
|
||||||
|
Plans:
|
||||||
|
- [ ] 10-01-PLAN.md — Delete 3 orphaned presentation files, remove DailyPlanState, verify zero regressions
|
||||||
**Success Criteria** (what must be TRUE):
|
**Success Criteria** (what must be TRUE):
|
||||||
1. daily_plan_providers.dart, daily_plan_task_row.dart, and progress_card.dart are deleted
|
1. daily_plan_providers.dart, daily_plan_task_row.dart, and progress_card.dart are deleted
|
||||||
2. DailyPlanDao is preserved (still used by notification service)
|
2. DailyPlanDao is preserved (still used by notification service)
|
||||||
@@ -91,4 +94,4 @@ Plans:
|
|||||||
| 7. Task Sorting | v1.1 | 2/2 | Complete | 2026-03-16 |
|
| 7. Task Sorting | v1.1 | 2/2 | Complete | 2026-03-16 |
|
||||||
| 8. Task Delete | 2/2 | Complete | 2026-03-18 | - |
|
| 8. Task Delete | 2/2 | Complete | 2026-03-18 | - |
|
||||||
| 9. Task Creation UX | 1/1 | Complete | 2026-03-18 | - |
|
| 9. Task Creation UX | 1/1 | Complete | 2026-03-18 | - |
|
||||||
| 10. Dead Code Cleanup | v1.2 | - | Planned | - |
|
| 10. Dead Code Cleanup | v1.2 | 0/1 | Planned | - |
|
||||||
|
|||||||
134
.planning/phases/10-dead-code-cleanup/10-01-PLAN.md
Normal file
134
.planning/phases/10-dead-code-cleanup/10-01-PLAN.md
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
---
|
||||||
|
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"
|
||||||
|
---
|
||||||
|
|
||||||
|
<objective>
|
||||||
|
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.
|
||||||
|
</objective>
|
||||||
|
|
||||||
|
<execution_context>
|
||||||
|
@/home/jlmak/.claude/get-shit-done/workflows/execute-plan.md
|
||||||
|
@/home/jlmak/.claude/get-shit-done/templates/summary.md
|
||||||
|
</execution_context>
|
||||||
|
|
||||||
|
<context>
|
||||||
|
@.planning/PROJECT.md
|
||||||
|
@.planning/ROADMAP.md
|
||||||
|
@.planning/STATE.md
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<tasks>
|
||||||
|
|
||||||
|
<task type="auto">
|
||||||
|
<name>Task 1: Delete orphaned files and remove DailyPlanState</name>
|
||||||
|
<files>
|
||||||
|
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)
|
||||||
|
</files>
|
||||||
|
<action>
|
||||||
|
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)
|
||||||
|
</action>
|
||||||
|
<verify>
|
||||||
|
<automated>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"</automated>
|
||||||
|
</verify>
|
||||||
|
<done>Three dead files deleted, DailyPlanState removed from daily_plan_models.dart, TaskWithRoom preserved</done>
|
||||||
|
</task>
|
||||||
|
|
||||||
|
<task type="auto">
|
||||||
|
<name>Task 2: Verify zero regressions</name>
|
||||||
|
<files>
|
||||||
|
(no files modified — verification only)
|
||||||
|
</files>
|
||||||
|
<action>
|
||||||
|
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.
|
||||||
|
</action>
|
||||||
|
<verify>
|
||||||
|
<automated>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"</automated>
|
||||||
|
</verify>
|
||||||
|
<done>dart analyze reports zero issues AND all 144+ tests pass — no regressions from dead code removal</done>
|
||||||
|
</task>
|
||||||
|
|
||||||
|
</tasks>
|
||||||
|
|
||||||
|
<verification>
|
||||||
|
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
|
||||||
|
</verification>
|
||||||
|
|
||||||
|
<success_criteria>
|
||||||
|
- 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
|
||||||
|
</success_criteria>
|
||||||
|
|
||||||
|
<output>
|
||||||
|
After completion, create `.planning/phases/10-dead-code-cleanup/10-01-SUMMARY.md`
|
||||||
|
</output>
|
||||||
Reference in New Issue
Block a user