feat(api): make agent deletes undoable (subtree capture + restore-by-id) #362
Labels
No labels
area:auth
area:ci
area:db
area:infra
area:native
area:pwa
area:service
epic
feature
foundation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
james/carol#362
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ADR-0031 / #354 deliberately left
destructive_deleteun-undoable:POST /api/agent/audit/{id}/undoreturns 409not_undoablefor deletes, and the activity UI (#356) hides the undo affordance for the delete-family tools. This ticket removes that limitation.Why it's hard today (from ADR-0031)
audit_eventsbeforesnapshot captures only the single deleted row, not the cascading children a delete removes (deleting a Person cascades to its notes, contacts, organization links). Re-creating the row alone silently loses the subtree.Scope
buildUndoProposalsodestructive_deleteproduces a working inverse (a restore), going through the same propose-then-confirm + audit machinery.isUndoableclient heuristic + the activity copy.Design first (extends ADR-0031). Part of epic #47.