feat(FN-2447): add dependency-aware task delete flow
- Extend TaskStore deleteTask with a safe default that blocks deleting tasks still referenced by live dependents - Add an opt-in removeDependencyReferences path that rewrites dependent tasks atomically before deletion - Update dashboard API/routes to surface TASK_HAS_DEPENDENTS as a 409 with structured details and a delete query flag - Add TaskCard/TaskDetailModal confirmation-retry UX plus coverage in core, dashboard route/API, and component tests - Document the new delete semantics and opt-in behavior in the dashboard API README
This commit is contained in:
@@ -601,7 +601,9 @@ The dashboard server exposes a REST API at `/api`:
|
||||
- `POST /api/tasks/:id/move` - Move task to column
|
||||
- `POST /api/tasks/:id/pause` - Pause task
|
||||
- `POST /api/tasks/:id/unpause` - Unpause task
|
||||
- `DELETE /api/tasks/:id` - Delete task
|
||||
- `DELETE /api/tasks/:id` - Delete task. Default mode is safe: if other tasks still reference this ID in `dependencies`, the route returns `409` with `{ error, details: { code: "TASK_HAS_DEPENDENTS", taskId, dependentIds } }`.
|
||||
- To explicitly remove those incoming dependency references and then delete, call `DELETE /api/tasks/:id?removeDependencyReferences=true`.
|
||||
- This opt-in path rewrites each dependent task's `dependencies` array atomically before deleting the target task, so no live task is left pointing at a missing task ID.
|
||||
|
||||
### Git Operations
|
||||
- `GET /api/git/status` - Current branch and status
|
||||
|
||||
Reference in New Issue
Block a user