docs(worker): Task 4 = full approve/merge UX consolidation

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
mika kuns
2026-06-09 11:27:35 +02:00
parent 12732d6dc9
commit 803c04d9e0
2 changed files with 37 additions and 13 deletions

View File

@@ -37,16 +37,37 @@ Build with `-c Release` per project. Commit per task (Conventional Commits).
## Task 4 — Approve merges the whole unit
- `WorkerHub.ApproveReview` (+ MCP `ReviewTask` approve): if the task has children,
invoke `PlanningMergeOrchestrator` (parent worktree if `Active` + each `Done` child
in order) then transition parent → `Done`; on child conflict keep `WaitingForReview`
and surface the conflicting child. If no children, keep the existing
`TaskMergeService.ApproveAndMergeAsync` path.
- Retire `WorkerHub.MergeAllPlanning` + its UI button/command and any now-dead
orchestrator entry that only `MergeAllPlanning` used (keep the orchestrator itself).
- Sync test fakes for `IWorkerClient`/`WorkerHub` if signatures changed.
- Tests: approving a parent with two `Done` children merges both then sets `Done`;
a conflicting second child keeps the parent in `WaitingForReview`.
**Decision: full UX consolidation.** Approve becomes the single entry for reviewing
*and* merging any task; the separate planning-merge views are folded into the review
panel. The `PlanningMergeOrchestrator` (which already merges the unit + sets the
parent `Done` for both planning and improvement, with conflict continue/abort) is
reused as the engine; only its *entry/UI* moves.
Backend:
- `WorkerHub.ApproveReview`: for a parent that **has children**, drive
`PlanningMergeOrchestrator.StartAsync` (event-based: `PlanningMergeStarted` /
`PlanningSubtaskMerged` / `PlanningMergeConflict` / `PlanningMergeAborted` /
`PlanningCompleted`) instead of the one-shot `ApproveAndMergeAsync`. Childless tasks
keep `ApproveAndMergeAsync`. Conflict resolution still goes through
`ContinuePlanningMerge` / `AbortPlanningMerge`.
- Keep the orchestrator, `ContinuePlanningMerge`, `AbortPlanningMerge`,
`GetPlanningAggregate`, `BuildPlanningIntegrationBranch`. Remove the now-redundant
standalone `MergeAllPlanning` hub method (approve is the entry).
- (Optional cleanup) route the orchestrator's `FinalizeParentDoneAsync` through
`TaskStateService` so `Status` writes stay centralized; low priority.
UI (Avalonia, MVVM — visual-verification gaps, flag for user):
- The review panel (`DetailsIslandViewModel` / its view) is the single approve+merge
surface. For a child-bearing parent in `WaitingForReview`, approve shows the
unit-merge progress + per-subtask state, the aggregate/integration diff preview, and
conflict continue/abort — all inline in the review panel.
- Remove the separate planning-merge view(s)/commands and the standalone "Merge all"
button; re-wire their `PlanningMerge*` event handlers into the review panel VM.
- Sync `IWorkerClient` + hand-rolled test fakes in both UI/Worker test projects.
Tests: approving a parent with two `Done` children merges both then sets `Done`; a
conflicting second child surfaces the conflict and pauses (continue/abort) without
losing the parent's `WaitingForReview`/merge state.
## Task 5 — Cancellable `WaitingForChildren` parent