Repository navigation
Confirm before bulk-closing tabs - #30551
Conversation
Close Others, Close Tabs to the Left/Right, and Close All Editor Tabs now show a confirmation dialog first, so one misclick or shortcut no longer closes a group of tabs at once. Pinned tabs are still skipped. Tabs are selected again after the user confirms. If a tab was pinned, moved, or removed while the dialog was open, it is left alone. Tabs created after the request are not closed. The shared confirmation lives in use-bulk-tab-close-confirmation.ts and is used by both the tab bar and the tab group. The tab group hook now reads the store directly instead of taking group and groupTabs as props.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to
|
Close Others, Close Tabs to the Left/Right, and Close All Editor Tabs now show a confirmation dialog first, so one misclick or shortcut no longer closes a group of tabs at once. Pinned tabs are still skipped. Tabs are selected again after the user confirms. If a tab was pinned, moved, or removed while the dialog was open, it is left alone. Tabs created after the request are not closed. The shared confirmation lives in use-bulk-tab-close-confirmation.ts and is used by both the tab bar and the tab group. The tab group hook now reads the store directly instead of taking group and groupTabs as props.
Problem
The tab right-click menu has Close Tabs To The Left directly above Change Title. A quick misclick while trying to rename a tab closed several tabs at once, with no warning.
Solution
Bulk-close actions now ask for confirmation first. Cancelling leaves every tab open. Pinned tabs are still skipped, and the dialog says so.
ELI5
Before, one wrong click could close a whole row of tabs right away. Now Orca asks first, and nothing closes until you say yes.
What Changed
use-bulk-tab-close-confirmation.ts) used by Close Other Tabs, Close Tabs To The Right, Close Tabs To The Left, and Close All Editor Tabs, across the tab group, terminal tab bar, floating terminal, and the close-all shortcut.Why
The existing close paths already handle dirty files and pinned tabs, so the confirmation is added in front of them instead of rewriting them. This is the smallest change that guards every bulk-close entry point.
Linked Issue
Fixes #30507
Visual Proof
TODO: attach a before/after video or screenshots of the confirmation dialog from the tab context menu.
Testing
Added unit tests covering cancel, confirm, pinned tabs, and tabs changing while the dialog is open, for the group close commands, the close-all shortcut, and the floating terminal close actions.
TODO: manual testing on macOS, Linux, Windows, or SSH.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
TODO
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)