feat: Add Close Others/Left/Right to chat tab context menu#2112
Conversation
|
Warning Review limit reached
Next review available in: 14 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
QA panel review — PASS
code-review-structural · head 837667d0d042 · formal
[review-synthesizer completed: workflow code-review-structural:report]
The PR contains no findings from the review panel or the structural analysis pass. No defects were identified, and no findings were refuted or marked uncertain by the verifier.
Overall risk is low as no issues were surfaced. There is no "fix-first" item. The panel was in unanimous agreement. No gaps were reported other than the absence of findings.
[]There was a problem hiding this comment.
QA panel review — PASS
code-review-structural · head 2c4f749e64d9 · formal
[review-synthesizer completed: workflow code-review-structural:report]
The change appears to be low-risk as no defects were identified by the review panel or the structural analysis pass. There are no priority fixes required, and there was no disagreement among the finders. The verification pass confirmed the absence of findings. No coverage gaps were noted.
[]…rtifacts, fleet inputs/secrets (#2130) Bump 0.106.0 → 0.107.0 and roll the changelog for the release. Highlights: - Versioned file artifacts + save_file_artifact (ADR 0092 D2, #2126) - Document-generation stack baked into the desktop bundle (ADR 0092 D1, #2123) - Fleet agents accept operator inputs + secrets at create time (#2121/#2122/#2125/#2127) - Deterministic persona-drift detection (#2116) - Chat tab context menu Close Others/Left/Right (#2112) - Fixes: archetype-catalog bundling (#2115), PyPI publishes on tag push (#2113) Backfilled [Unreleased] entries for the feature PRs that lacked them, rolled to [0.107.0], scaffolded + polished the marketing changelog. uv.lock: project version line only (surgical — avoids uv 0.11.13-vs-pinned-0.11.29 marker drift). Claude-Session: https://claude.ai/code/session_01EVmWoy2TdXdMshNn5WBR2Z Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Adds Close others, Close left, and Close right to the chat tab right-click context menu.
apps/web/src/chat/bulkClose.ts(new): a pure, host-freesessionsToClose(sessions, anchorId, mode)helper that resolves the target tab ids for each mode in tab order. It always excludes the right-clicked anchor and any pinned tab (thepinnedfield is optional/forward-looking, so a currentChatSessionis structurally accepted and never matches — pinned tabs are respected once pinning exists).ChatSurface.tsx:onTabContextMenucomputes the three target sets and passesonCloseOthers/onCloseLeft/onCloseRightcallbacks only when that direction has tabs to close. A smallcloseQueuestate feeds each targeted session through the existingsetPendingClose→ConfirmDialogflow one at a time — the next id promotes into the dialog as each resolves. This means goal-driving tabs still get their per-tab Stop/Detach confirmation, only ever one dialog is open (no dialog storm), and cancel aborts the remaining batch.contextMenu/registrations.tsx: thechat-tabmenu renders the three bulk-close entries beneath Close chat, each shown only when its closure is supplied (so "Close left" never appears on the leftmost tab).Tests:
bulkClose.test.tscovers the targeting logic (others/left/right, anchor exclusion, edges, pinned exclusion, missing anchor, bare sessions);registrations.test.tsgains a suite asserting the menu shows/hides each entry by closure presence and that each entry invokes its own callback. Existing New chat / Rename / single Close behavior is untouched.