Skip to content

Add middle-click close for right panel tabs#3161

Merged
juliusmarminge merged 8 commits into
pingdotgg:mainfrom
huxcrux:t3code/feature/right-panel-middle-click-close-tabs
Jun 30, 2026
Merged

Add middle-click close for right panel tabs#3161
juliusmarminge merged 8 commits into
pingdotgg:mainfrom
huxcrux:t3code/feature/right-panel-middle-click-close-tabs

Conversation

@huxcrux

@huxcrux huxcrux commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

What Changed

Adds support for closing right panel tabs with a middle mouse click.

This applies to the tab strip in the expandable right panel, including browser preview tabs and singleton surfaces like Diff. Middle-click uses the same close path as the existing tab close button, so existing cleanup behavior is preserved.

Why

Right panel tabs behave like browser/editor tabs, where middle-click is a common shortcut for closing a tab. The previous implementation only allowed closing via the visible close button or context menu, which makes repeated tab cleanup slower.

UI Changes

No static visual changes.

Interaction change: middle-clicking a right panel tab now closes that tab.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Low Risk
Small UI interaction change in one component; no auth, data, or API surface changes.

Overview
Right panel tab rows now support middle-click to close, matching common browser/editor tab behavior.

onMouseDown prevents the default middle-button action (e.g. autoscroll), and onAuxClick closes the tab via the existing onCloseSurface path—the same cleanup as the close button and context menu.

Reviewed by Cursor Bugbot for commit 811baa1. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add middle-click close for right panel tabs

Adds onMouseDown and onAuxClick handlers to each tab in RightPanelTabs.tsx. Middle-clicking a tab calls props.onCloseSurface(surface) and suppresses the default browser middle-click behavior (e.g. auto-scroll).

Macroscope summarized 811baa1.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: baa341f4-e8e1-4f18-bb0f-ddbcb83474ea

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jun 19, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 19, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

The PR is broken - it imports from ./RightPanelTabs.logic which was deleted in the final commit, causing a build failure. The function needs to be either restored or inlined.

You can customize Macroscope's approvability policy. Learn more.

@macroscopeapp macroscopeapp Bot dismissed their stale review June 30, 2026 17:09

Dismissing prior approval to re-evaluate 2425a0d

@juliusmarminge juliusmarminge enabled auto-merge (squash) June 30, 2026 17:12
@juliusmarminge juliusmarminge merged commit 0615fd7 into pingdotgg:main Jun 30, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants