feat: replace tab right-click close with hover × close button#691
feat: replace tab right-click close with hover × close button#691derrick4reals wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fee9e8fc08
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (item.canClose) { | ||
| badgeEl.addEventListener('contextmenu', (e) => { | ||
| const closeEl = badgeEl.createDiv({ |
There was a problem hiding this comment.
Hide close affordance when tab cannot actually close
Rendering the new × control whenever item.canClose is true exposes a clickable close action that can be a guaranteed no-op for users: in a single blank tab state, getTabBarItems() still sets canClose true, but TabManager.closeTab() immediately returns false for the lone empty tab (src/features/chat/tabs/TabManager.ts:317). With this commit, that mismatch becomes visible as a broken affordance (hover × appears, click does nothing), so the close button should only render when the tab is truly closable.
Useful? React with 👍 / 👎.

Summary
stopPropagation/stopImmediatePropagationaria-label="Close tab"for accessibilityChanges
TabBar.renderBadge()now renders a×div instead of listening for contextmenuTest Plan