Fix close-tab shortcut remapping

Closed
AU
2mo ago
+6-6

Summary

  • Registers closeTab as a remappable action in KeyboardShortcutSettings so Cmd+W respects user-configured shortcuts
  • Updates AppDelegate interceptor to use the remapped shortcut instead of a hardcoded Cmd+W check
  • Wires up closeTabMenuShortcut in the File menu via splitCommandButton so the menu item reflects the remap
  • Replaces hardcoded command palette hints for Close Tab / Close Workspace with dynamic shortcut lookup

Fixes #1710

Test plan

  • Default behavior: Cmd+W still closes the focused tab
  • Remap close-tab to a different shortcut in settings, verify the new shortcut closes tabs and the menu item updates
  • Verify the command palette shows the remapped shortcut hint for Close Tab / Close Workspace
  • Verify Cmd+W in browser popup windows still works as a fallback

🤖 Generated with Claude Code


Summary by cubic

Make Close Tab respect user-remapped shortcuts across the app. Updates the interceptor, File menu, and command palette to use the dynamic shortcut. Fixes #1710.

  • Bug Fixes
    • Registered Close Tab as a remappable action in KeyboardShortcutSettings.
    • Interceptor now matches the remapped Close Tab shortcut (with Cmd+W fallback for browser popups).
    • File menu Close Tab uses splitCommandButton with the decoded shortcut (no hardcoded ⌘W).
    • Command palette maps palette.closeTab and palette.closeWorkspace to actions and removes hardcoded hints, so execution and hints use dynamic lookup.

Summary by CodeRabbit

  • Bug Fixes
    • Improved keyboard shortcut resolution to properly reflect configured settings for closing tabs and workspaces, ensuring shortcut hints display correctly throughout the application.