WIP: Delete an empty plan, end-to-end #294

Closed
toasterson wants to merge 0 commits from claude/wi-019f1817-delete-an-empty-plan-end-to-end into main
Owner

Anima work item 019f1817-b89f-7993-9a1a-47ed673b5f1e.

What to build

Wire delete into the PWA: a Delete kebab item that appears only when the Plan has 0 Work Items, gated by a modal confirmation; on success navigate back to the project and the Plan is gone. This ships the "clear junk empty plans" use case.

Pushed context

deletePlan is NOT wired into the PWA today — only the generated stub exists in src/gen/anima/v1/plan_pb.ts. Add a deletePlan function to src/lib/grpcApi.ts and src/lib/api.ts, then add the Delete item to the PlanDetail kebab (src/pages/PlanDetail/PlanDetail.tsx) reusing the Menu primitive from its blocker. Show Delete only when the plan's Work Item count is 0; on confirm, call deletePlan, then navigate to /projects/:projectId. Safety is enforced server-side by the empty-only guard (its blocker) — but the UI must also hide Delete for non-empty plans. Modal confirm copy (ADR 0017): "Delete this plan? '

Anima work item `019f1817-b89f-7993-9a1a-47ed673b5f1e`. ## What to build Wire delete into the PWA: a **Delete** kebab item that appears *only* when the Plan has 0 Work Items, gated by a **modal confirmation**; on success navigate back to the project and the Plan is gone. This ships the "clear junk empty plans" use case. ## Pushed context `deletePlan` is NOT wired into the PWA today — only the generated stub exists in `src/gen/anima/v1/plan_pb.ts`. Add a `deletePlan` function to `src/lib/grpcApi.ts` and `src/lib/api.ts`, then add the Delete item to the PlanDetail kebab (`src/pages/PlanDetail/PlanDetail.tsx`) reusing the Menu primitive from its blocker. Show Delete only when the plan's Work Item count is 0; on confirm, call `deletePlan`, then navigate to `/projects/:projectId`. Safety is enforced server-side by the empty-only guard (its blocker) — but the UI must also hide Delete for non-empty plans. Modal confirm copy (ADR 0017): "Delete this plan? '<title>' has no work items. This permanently removes the plan and its discussion. This can't be undone." No typed confirmation needed. ## Acceptance criteria - [ ] `deletePlan` wired through `grpcApi.ts` + `api.ts` - [ ] Delete kebab item renders only when the plan has 0 Work Items - [ ] Clicking Delete opens a modal confirm; confirming deletes and navigates back to the project - [ ] A non-empty plan never shows Delete in the UI ## Blocked by - WI 019f1817-4861-7cb0-af74-32bb0fc38468 (server-side empty-only Delete guard) - WI 019f1817-5e54-73a2-9fa0-831a91db5e0f (kebab menu primitive + Copy link)
toasterson force-pushed claude/wi-019f1817-delete-an-empty-plan-end-to-end from e9bd07b6c7 to c9ff1eaf5a 2026-07-05 02:59:29 +00:00 Compare
toasterson force-pushed claude/wi-019f1817-delete-an-empty-plan-end-to-end from c9ff1eaf5a to 94e9e21da1 2026-07-06 10:34:03 +00:00 Compare
toasterson force-pushed claude/wi-019f1817-delete-an-empty-plan-end-to-end from 94e9e21da1 to e3253b7e6e 2026-07-06 19:29:11 +00:00 Compare
toasterson referenced this pull request from a commit 2026-07-09 17:48:18 +00:00
Author
Owner

Merged at ae5d72d. Delete action + empty-guard + modal + deletePlan woven into the shared plan kebab. Closing.

Merged at `ae5d72d`. Delete action + empty-guard + modal + `deletePlan` woven into the shared plan kebab. Closing.
toasterson closed this pull request 2026-07-09 17:54:49 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
toasterson/Anima!294
No description provided.