fix(worker,ui): route details-pane task delete through worker to advance blocked parents
Deleting a child from the details pane hard-deleted straight from the UI process via TaskRepository, bypassing TaskStateService.TryAdvanceParentAsync entirely. Deleting the last child of a WaitingForChildren parent that way left it wedged forever. WorkerHub.DeleteTask now mirrors the MCP delete_task tool (running-task guard, FK-friendly error, advance-parent call), and the UI goes through it. TryAdvanceParentAsync also short-circuited when zero children remained, treating "no children left" as "nothing to evaluate" instead of "all done" - removed the early return so an empty child list (vacuously) counts as all terminal.
This commit is contained in:
@@ -50,6 +50,9 @@ How a task moves Queued → Running → terminal, across `src/ClaudeDo.Worker`
|
||||
- **Done** CompleteAsync (Running → Done) — top-level success.
|
||||
- **WaitingForReview** SubmitForReviewAsync (Running → WaitingForReview) — review gate.
|
||||
- **WaitingForChildren** SubmitForChildrenAsync (Running → WaitingForChildren) — blocks on children.
|
||||
Advances to WaitingForReview via `TryAdvanceParentAsync` once every remaining child is
|
||||
terminal (Done/Failed/Cancelled) — including zero children left, e.g. after the last child
|
||||
is deleted (`WorkerHub.DeleteTask` / `ExternalMcpService.DeleteTask` both call it).
|
||||
- **Failed** FailAsync (Running/Queued → Failed).
|
||||
- **Cancelled** CancelAsync (Running/Queued/WaitingForReview/WaitingForChildren → Cancelled).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user