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:
@@ -37,16 +37,37 @@ Build with `-c Release` per project. Commit per task (Conventional Commits).
|
|||||||
|
|
||||||
## Task 4 — Approve merges the whole unit
|
## Task 4 — Approve merges the whole unit
|
||||||
|
|
||||||
- `WorkerHub.ApproveReview` (+ MCP `ReviewTask` approve): if the task has children,
|
**Decision: full UX consolidation.** Approve becomes the single entry for reviewing
|
||||||
invoke `PlanningMergeOrchestrator` (parent worktree if `Active` + each `Done` child
|
*and* merging any task; the separate planning-merge views are folded into the review
|
||||||
in order) then transition parent → `Done`; on child conflict keep `WaitingForReview`
|
panel. The `PlanningMergeOrchestrator` (which already merges the unit + sets the
|
||||||
and surface the conflicting child. If no children, keep the existing
|
parent `Done` for both planning and improvement, with conflict continue/abort) is
|
||||||
`TaskMergeService.ApproveAndMergeAsync` path.
|
reused as the engine; only its *entry/UI* moves.
|
||||||
- Retire `WorkerHub.MergeAllPlanning` + its UI button/command and any now-dead
|
|
||||||
orchestrator entry that only `MergeAllPlanning` used (keep the orchestrator itself).
|
Backend:
|
||||||
- Sync test fakes for `IWorkerClient`/`WorkerHub` if signatures changed.
|
- `WorkerHub.ApproveReview`: for a parent that **has children**, drive
|
||||||
- Tests: approving a parent with two `Done` children merges both then sets `Done`;
|
`PlanningMergeOrchestrator.StartAsync` (event-based: `PlanningMergeStarted` /
|
||||||
a conflicting second child keeps the parent in `WaitingForReview`.
|
`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
|
## Task 5 — Cancellable `WaitingForChildren` parent
|
||||||
|
|
||||||
|
|||||||
@@ -39,9 +39,12 @@ UX is explicitly out of scope.
|
|||||||
|
|
||||||
- **All parents get review.** A planning parent now surfaces in `WaitingForReview`
|
- **All parents get review.** A planning parent now surfaces in `WaitingForReview`
|
||||||
after its children finish, instead of auto-completing to `Done`.
|
after its children finish, instead of auto-completing to `Done`.
|
||||||
- **Approve merges the whole unit.** Approving a parent merges the parent worktree
|
- **Approve merges the whole unit — full UX consolidation.** Approve is the single
|
||||||
(if any) + all `Done` children in order, reusing `PlanningMergeOrchestrator`. The
|
entry for reviewing *and* merging any task. For a parent with children it drives the
|
||||||
standalone `MergeAllPlanning` button is retired (folded into approve).
|
existing `PlanningMergeOrchestrator` (unit merge + parent→`Done` + conflict
|
||||||
|
continue/abort, all already implemented); the standalone "Merge All" button is
|
||||||
|
removed and the orchestrator's conflict dialog + combined-diff preview are reused
|
||||||
|
in-place. Childless tasks keep `ApproveAndMergeAsync`.
|
||||||
- **Scope = state model + code paths.** Internal refactor; authoring UX and child
|
- **Scope = state model + code paths.** Internal refactor; authoring UX and child
|
||||||
base-commit resolution are unchanged.
|
base-commit resolution are unchanged.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user