Add context menu to chat tabs with bulk close actions (#2705)
## Summary
- Add right-click context menu to chat tabs with options: Close tab,
Close other tabs, Close tabs to the right, Close all tabs
- Track which chats were opened in the current session via
`sessionOpenedChatIdsAtom` - only tabs explicitly opened this session
are shown
- Add `context-menu.tsx` UI component from shadcn/ui with Radix UI
dependency
- Add translations for context menu items (en, pt-BR, zh-CN)
## Test plan
- [x] Unit tests added for `getOrderedRecentChatIds` with session
filtering
- [x] Unit tests added for `closeMultipleTabsAtom`
- [x] E2E tests added for context menu interactions (close other tabs,
close tabs to right, close all)
- [ ] Manual testing: right-click a chat tab and verify context menu
appears with all options
- [ ] Manual testing: verify "Close other tabs" closes all tabs except
the clicked one
- [ ] Manual testing: verify "Close tabs to the right" closes only tabs
to the right
- [ ] Manual testing: verify "Close all" closes all tabs
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- devin-review-badge-begin -->
---
<a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2705"
target="_blank">
<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open with Devin">
</picture>
</a>
<!-- devin-review-badge-end -->
---------
Co-authored-by:
Will Chen <willchen90@gmail.com>
Co-authored-by:
Claude Opus 4.5 <noreply@anthropic.com>
正在显示
| ... | ... | @@ -58,7 +58,7 @@ |
| "@ai-sdk/provider-utils": "^4.0.13", | ||
| "@ai-sdk/xai": "^3.0.46", | ||
| "@babel/parser": "^7.28.5", | ||
| "@base-ui/react": "^1.1.0", | ||
| "@base-ui/react": "^1.2.0", | ||
| "@biomejs/biome": "^1.9.4", | ||
| "@dyad-sh/supabase-management-js": "v1.0.1", | ||
| "@flakiness/playwright": "^1.0.0", | ||
| ... | ... |
请
注册
或者
登录
后发表评论