feat(client): undo button on the activity screen #356
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#356
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?
Makes the undo backend (#354 / ADR-0031) user-facing: an undo affordance on each reversible row of the activity history (#350), with an inline confirmation before anything is reversed.
Scope
@carol/api-client:useUndoAuditEvent()— mutation overPOST /api/agent/audit/{id}/undo, returns the inverseProposalDto.apps/client/lib/activity/isUndoable.ts(pure, tested): hide the undo affordance for the delete-family tools (delete_*/remove_*/merge_*); the server's 409not_undoablestays as the backstop.activity.tsx: an "undo" button (LucideRotateCcw) on each undoable row → proposes the inverse → renders an inline confirmation card (summary + diff + apply/decline). Apply commits viauseCommitProposaland invalidates the audit list; decline rejects. Errors (incl. 409) render inline viaformatApiError.activity.undo+activity.confirm.*; updated the lede (was "nothing here can be undone").Out of scope (follow-ups)
Part of epic #47.