Add task completion checklist to refactoring plan
Track the 30 tasks across 5 phases with checkboxes. Each checkbox can be marked complete as tasks land and pass review. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -235,6 +235,56 @@ talks only to `app.Service` and reacts to events via `fyne.Do`.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 3.1 Task completion checklist
|
||||||
|
|
||||||
|
Track progress here. Mark tasks complete as they land and pass review.
|
||||||
|
|
||||||
|
### Phase 0 — Safety net
|
||||||
|
- [ ] T0.1 — Add test script + `go vet` + `go test -race`
|
||||||
|
- [ ] T0.2 — Add characterization tests
|
||||||
|
|
||||||
|
### Phase 1 — Split flat `core` package
|
||||||
|
- [ ] T1.1 — Create `src/domain`; move Job/RunRecord/Config/etc
|
||||||
|
- [ ] T1.2 — Create `src/platform/winproc`; move `configureHiddenWindow`
|
||||||
|
- [ ] T1.3 — Create `src/runner`; move runner logic
|
||||||
|
- [ ] T1.4 — Create `src/scheduler`; move scheduler
|
||||||
|
- [ ] T1.5 — Create `src/storage`; move store/paths
|
||||||
|
- [ ] T1.6 — Create `src/platform/autostart`; move autostart logic
|
||||||
|
- [ ] T1.7 — Create `src/platform/desktop`; move desktop integration
|
||||||
|
- [ ] T1.8 — Delete empty `src/core`; build + test both platforms
|
||||||
|
|
||||||
|
### Phase 2 — Domain cleanup
|
||||||
|
- [ ] T2.1 — Add `src/domain/schedule.go`; Schedule value object
|
||||||
|
- [ ] T2.2 — Migrate `scheduler` to use Schedule
|
||||||
|
- [ ] T2.3 — Split `domain.Job` (durable) from `domain.JobRuntime` (transient)
|
||||||
|
- [ ] T2.4 — Update `storage`: load/save Job only; move runtime init
|
||||||
|
|
||||||
|
### Phase 3 — Application service layer
|
||||||
|
- [ ] T3.1 — Create `src/app/service.go`; owns state behind mutex
|
||||||
|
- [ ] T3.2 — Add `src/app/events.go`; Event types + Observer
|
||||||
|
- [ ] T3.3 — Add state-mutating operations to service
|
||||||
|
- [ ] T3.4 — Convert `scheduler` to use service; inject Clock
|
||||||
|
- [ ] T3.5 — Move display helpers to `src/app/format.go`
|
||||||
|
- [ ] T3.6 — Add `src/app` unit tests (no Fyne)
|
||||||
|
|
||||||
|
### Phase 4 — Carve up the GUI
|
||||||
|
- [ ] T4.1 — Rename `gui` → `ui`; split app.go into run.go + mainwindow.go
|
||||||
|
- [ ] T4.2 — Extract `jobs_view.go`
|
||||||
|
- [ ] T4.3 — Extract `job_dialog.go`
|
||||||
|
- [ ] T4.4 — Extract `history_view.go`
|
||||||
|
- [ ] T4.5 — Extract `settings_view.go`
|
||||||
|
- [ ] T4.6 — Extract `tray.go`, `singleinstance.go`, `layout.go`
|
||||||
|
- [ ] T4.7 — Confirm app.go is gone; smoke test both platforms
|
||||||
|
|
||||||
|
### Phase 5 — Hardening & docs
|
||||||
|
- [ ] T5.1 — Surface errors from service + storage
|
||||||
|
- [ ] T5.2 — Introduce `autostart.Manager` interface
|
||||||
|
- [ ] T5.3 — Fill test gaps (folder filtering, cleanup, migration, concurrency)
|
||||||
|
- [ ] T5.4 — Run `go test -race ./...` clean on both platforms
|
||||||
|
- [ ] T5.5 — Update docs (ARCHITECTURE.md, TESTS.md, README)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 4. Definition of done
|
## 4. Definition of done
|
||||||
|
|
||||||
- `go vet ./...` clean; `go test -race ./...` green on Windows and Linux.
|
- `go vet ./...` clean; `go test -race ./...` green on Windows and Linux.
|
||||||
|
|||||||
Reference in New Issue
Block a user