feat(kanban): drag-to-delete trash zone + bulk delete for task cards

Salvages #28125 by @Jpalmer95. Adds:
- Drag-to-delete trash zone in the kanban dashboard
- Bulk delete endpoint with cascading delete_task cleanup
- Frontend updates (drag visual + drop handler)
- Confirmation prompt before delete

Resolved end-of-file test conflict by appending both halves.
This commit is contained in:
Jpalmer95 2026-05-18 21:40:08 -07:00 committed by Teknium
parent e3823657d6
commit dfcf48b476
6 changed files with 266 additions and 14 deletions

View file

@ -485,6 +485,33 @@ def test_patch_status_running_rejected(client):
assert statuses.get(t["id"]) != "running"
# ---------------------------------------------------------------------------
# DELETE /tasks/:id
# ---------------------------------------------------------------------------
def test_delete_task(client):
t = client.post("/api/plugins/kanban/tasks", json={"title": "to-delete"}).json()["task"]
r = client.delete(f"/api/plugins/kanban/tasks/{t['id']}")
assert r.status_code == 200
assert r.json()["deleted"] is True
assert r.json()["task_id"] == t["id"]
# Gone from board
board = client.get("/api/plugins/kanban/board").json()
all_ids = [tt["id"] for col in board["columns"] for tt in col["tasks"]]
assert t["id"] not in all_ids
# Gone from detail
r = client.get(f"/api/plugins/kanban/tasks/{t['id']}")
assert r.status_code == 404
def test_delete_task_not_found(client):
r = client.delete("/api/plugins/kanban/tasks/t_nonexistent")
assert r.status_code == 404
assert "not found" in r.json()["detail"]
# ---------------------------------------------------------------------------
# Comments + Links
# ---------------------------------------------------------------------------