Repository navigation
Add Always force delete dropdown to the workspace deletion dialog - #26476
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe force-delete button now supports configurable size, disabled state, button ref, children, optional toast dismissal, and saving-state notifications. The footer uses the button for available force-delete actions and updates the shared preference for the always-force-delete action. The dialog tracks preference saving, blocks closing while saving, and includes saving in the footer’s deleting state. New tests cover button actions, preference-save outcomes, saving notifications, and disabled controls. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The saved-choice action waits for the preference save before retrying deletion, and the dialog remains open while saving. No issue identified here prevents merging after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
|
Reviewed the CodeRabbit report: it found no actionable code issues. The docstring-coverage warning conflicts with this repository’s AGENTS.md instruction to use only concise comments for non-obvious behavior, rather than narrating functions. The shared save-before-delete flow and focus handling are covered by the existing comments, 29 focused tests, and rendered Electron checks, so no blanket docstrings were added. |
ELI5
The workspace deletion dialog now offers the same Force Delete arrow menu as the failure toast. Choose Force Delete to retry once, or Always force delete to remember the choice for future deletions.
What Changed
The dialog reuses the existing split-button component, keeping its normal button size, trash icon, and initial keyboard focus. The menu includes Always force delete and the tooltip “Applies to all future workspace deletions.” It writes the existing hidden user preference through the durable settings handler before retrying. Cancel, Escape, and other dismissal attempts are blocked while saving; if saving fails, the dialog remains available for retry.
Why
Previously, reopening a failed workspace deletion showed a plain Force Delete button without the saved preference option. Reusing the toast control keeps both recovery surfaces consistent without duplicating menu or persistence logic.
Linked Issue
Internal maintainer-requested follow-up to #26425; no existing issue. The maintainer exception applies.
Visual Proof
Captured with the visual-proof and electron skills in an isolated, hidden macOS Electron instance after a real dirty-worktree deletion failure.
Before:
After:
Menu and tooltip:
Testing
pnpm tcandpnpm run check:code-quality:changedpass. The background Electron dev build succeeds.Review
Agent skill upstream boundary
Checklist