Repository navigation
feat(desktop): allow force delete when teardown fails - #1370
Conversation
📝 WalkthroughWalkthroughThis PR adds an optional Changes
Sequence DiagramsequenceDiagram
actor User
participant UI as Delete Dialog / Button
participant Toast as Toast UI
participant Logs as Teardown Logs Dialog
participant TRPC as Delete Procedure (server)
participant Teardown as Teardown Handler
User->>UI: Click Delete
UI->>TRPC: delete({ id, deleteLocalBranch?, force: false })
TRPC->>Teardown: run teardown
Teardown-->>TRPC: returns failure + logs
TRPC-->>UI: error with teardown output
UI->>Toast: show teardown-failed toast (with "View Logs" / "Delete Anyway")
User->>Toast: Click "View Logs"
Toast->>Logs: showTeardownLogs(output, { onDeleteAnyway })
User->>Logs: Click "Delete Anyway"
Logs->>TRPC: delete({ id, force: true })
TRPC->>Teardown: run teardown (force mode)
Teardown-->>TRPC: may fail (logged)
TRPC-->>UI: success (deletion proceeds despite teardown failure)
UI->>User: show success
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
When teardown scripts fail during workspace/worktree deletion, users can now choose to "Delete Anyway" instead of being blocked. The option is available both in the error toast and in the teardown logs dialog.
a2fbb3b to
83da352
Compare
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
Changes
delete.ts): Addedforceparameter to bothdeleteanddeleteWorktreeprocedures — whentrue, logs the teardown failure as a warning and continues deletionshowTeardownLogsto accept anonDeleteAnywaycallback; renders a "Delete Anyway" button in the dialog footerTest Plan
Summary by CodeRabbit
New Features
Bug Fixes