FN-7410: allow archived task deletion
Allow archived task snapshots to be deleted while preserving soft-delete tombstones. - Restore cold archived snapshots into the tasks table before applying delete tombstones. - Remove archive snapshots after deletion and preserve allowResurrection semantics. - Cover archived deletion through store, API, UI menu, docs, and changeset updates. Files changed: .changeset/fn-7410-delete-archived-tasks.md | 7 ++ docs/task-management.md | 3 +- .../core/src/__tests__/soft-delete-tasks.test.ts | 129 +++++++++++++++++++++ packages/core/src/store.ts | 25 +++- .../components/__tests__/TaskContextMenu.test.tsx | 19 +++ .../src/__tests__/routes-tasks-ops.test.ts | 24 ++++ 6 files changed, 204 insertions(+), 3 deletions(-) Fusion-Task-Id: FN-7410 Fusion-Task-Lineage: fa7d9983-e62c-4849-89d8-1ae5f6134815 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
@@ -617,6 +617,7 @@ Behavior:
|
||||
- `fn task archive <id>` moves any live-board task (`triage`, `todo`, `in-progress`, `in-review`, or `done`) to `archived`; tasks already in `archived` are rejected.
|
||||
- Archive records the task's `preArchiveColumn` so restore can return to the original live column instead of always assuming `done`.
|
||||
- Dashboard delete confirmations for live tasks include an **Archive Instead** action so users can preserve history without soft-deleting the task.
|
||||
- Archived tasks can also be deleted from the dashboard/API/CLI. Deleting an archived task removes the archived snapshot from lists and search, but first materializes the normal soft-delete tombstone so the task ID remains reserved unless the operator explicitly chooses allow-resurrection behavior.
|
||||
- Cleanup mode can persist compact metadata and remove the task directory
|
||||
- Archived tasks are read-only for task log/document writes:
|
||||
- `logEntry()` throws `Task <id> is archived — logging is read-only`
|
||||
@@ -625,7 +626,7 @@ Behavior:
|
||||
|
||||
### Cleanup behavior
|
||||
|
||||
- Archived entries are persisted as compact archive snapshots (current runtime stores these in SQLite `archivedTasks`; legacy docs may refer to `.fusion/archive.jsonl`)
|
||||
- Archived entries are persisted as compact archive snapshots in `archive.db`; legacy in-main-DB `archivedTasks` rows and older `.fusion/archive.jsonl` references may still appear in historical data/docs.
|
||||
- Task directory (`task.json`, `PROMPT.md`, `agent.log`, attachments) can be removed
|
||||
|
||||
### Compact archive entry format
|
||||
|
||||
Reference in New Issue
Block a user