Skip to content

feat(tabs): close sidebar and top-strip tabs with middle-click - #1217

Open
alihandroid wants to merge 1 commit into
l0ng-ai:mainfrom
alihandroid:feat/middle-click-close-tabs
Open

alihandroid wants to merge 1 commit into
l0ng-ai:mainfrom
alihandroid:feat/middle-click-close-tabs

Conversation

@alihandroid

@alihandroid alihandroid commented Oct 23, 2026 •

Copy link
Copy Markdown

Closes #1204.

Problem

Terminal tabs can be closed through the hover close button, context menu, or keyboard shortcut, but not by middle-clicking their sidebar row or top-strip chip. Editor file tabs already support middle-click closure.

Changes

Handle middle-button presses on tab rows in the left sidebar and tab chips in the top strip.

Both handlers use the existing close_tab path, retaining close confirmations and unsaved-file protection. They stop event propagation so the press does not reach underlying controls.

Add a GPUI event-dispatch regression covering both tab-bar positions. It checks that middle-clicking an inactive tab removes only that tab and leaves the active tab unchanged. Update the Unreleased changelog.

Validation

  • cargo test --locked -p tty7 --bin tty7-app: 2,549 passed, 2 ignored, including the new middle-click regression covering both tab-bar positions.
  • cargo fmt --all -- --check: passed.
  • bash .github/scripts/check-host-boundary.sh: passed.
  • git diff --check: passed.
  • Built and launched the full macOS app with cargo run --bin tty7-app; local manual testing confirmed the requested behavior.

Windows and Linux behavior has not been manually verified.

@alihandroid
alihandroid force-pushed the feat/middle-click-close-tabs branch from ec76d0d to 5f04d40 Compare October 23, 2026 13:59
@alihandroid
alihandroid force-pushed the feat/middle-click-close-tabs branch from 5f04d40 to f97e59d Compare October 23, 2026 14:03

This branch has not been deployed

No deployments
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.

Close tab via middle-click in left sidebar (and top tab strip)

1 participant