Skip to content

Make Cmd+W close the active tab instead of the window#64

Merged
wesbillman merged 1 commit intomainfrom
cmd-w-close-tab
Apr 1, 2026
Merged

Make Cmd+W close the active tab instead of the window#64
wesbillman merged 1 commit intomainfrom
cmd-w-close-tab

Conversation

@wesbillman
Copy link
Copy Markdown
Collaborator

Summary

  • Intercepts Cmd+W in the existing AppShell keydown handler to close the active tab via closeAndCleanupTab instead of letting Tauri's default close-window behavior fire
  • When no tab is active, the shortcut is swallowed — nothing happens
  • Follows the same pattern as the existing Cmd+, (settings) and Cmd+B (sidebar) handlers

Test plan

  • Open one or more tabs, press Cmd+W — active tab should close, next tab becomes active
  • Close all tabs with Cmd+W — should return to the home screen
  • With no tabs open, press Cmd+W — nothing should happen (window stays open)
  • Verify Cmd+, and Cmd+B still work as before

🤖 Generated with Claude Code

Intercepts the Cmd+W keydown event in the AppShell keyboard handler
to close the current active tab via closeAndCleanupTab. When no tab
is active, the shortcut is swallowed with no effect.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wesbillman wesbillman merged commit cf8c316 into main Apr 1, 2026
7 checks passed
@wesbillman wesbillman deleted the cmd-w-close-tab branch April 1, 2026 20:53
tellaho added a commit to tellaho/goose2 that referenced this pull request Apr 2, 2026
Merges 7 commits from main into tho/boss-ui:
- Image paste support in chat input (block#68)
- Tab name text unselectable (block#67)
- Chat title immediate update on send (block#66)
- Artifact v1 file viewing (block#63)
- Cmd+W tab close (block#64)
- Chat activity/unread state tracking (block#62)
- Sidebar hierarchy polish + faster reloads (block#61)

Key conflict resolutions:
- Keep Tailwind v4 CSS-based config (delete tailwind.config.js)
- Keep boss-ui dialog.tsx, add showCloseButton prop from main
- Add text-foreground-subtle token to boss-ui theme system
- Keep ToolCallAdapter (boss-ui), adopt ToolChainCards pattern from main
- Delete MarkdownContent/ToolCallCard (replaced by boss-ui ai-elements)
- Adopt SessionActivityIndicator from main into sidebar
- Adopt ClickableImage/ImageLightbox from main
- Merge drag-and-drop image support into ChatInput
- Keep boss-ui hover:bg-accent/50 treatment throughout sidebar

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant