You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(web-ui): support middle-click to close right-sidebar and session tabs - #1339
Restrict onPointerDown docking drag start to primary button (event.button !== 0) so middle-click and mouse side buttons never start a drag or capture the pointer.
Prevent browser autoscroll on middle mousedown and close closable tabs on middle auxclick (ignoring events bubbled from portaled menus/tooltips via currentTarget.contains(target) and respecting canCloseTab).
Top recent-session shortcut tabs (apps/web-ui/packages/client/ui-workspace/src/client/RecentShortcut.tsx):
Prevent browser autoscroll on middle mousedown and close the session shortcut tab on middle auxclick via the same restoreNavigationFocus() + close(visit.sessionId) path as the × button.
UI Changes
No visual changes: adds middle-click pointer interaction equivalent to clicking the existing close (×) button on right-sidebar and recent-session tabs without altering layout, DOM structure, or styling.
Validation
npx prettier --check on both changed files & pre-commit hook (passed)
This adds middle-click closing for right-sidebar tabs and recent-session shortcut tabs with no intended layout change. No merge-blocking risk was found, and the change is easy to revert.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
Recent review details
Context from checks skipped due to timeout: 8
GitHub Check: CodeRabbit
GitHub Check: Check Linux ARM64
GitHub Check: Check ubuntu-22.04
GitHub Check: Check macos-26
GitHub Check: Vitest
GitHub Check: Static checks
GitHub Check: Check windows-latest
GitHub Check: Web Host tests
Additional context used
Code guidelines: 1
docs/product/standalone-web.md — auto-discovered
Path-based instructions: 1
Applicability reference: AGENTS.md: # Repository Guidelines `npm start` / `npm start web` rebuild and relaunch the user's Desktop / Web and may restart the shared Host; `npm stop` stops all local codexhost services across worktrees.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add standard browser/editor middle-click (
auxclick,button === 1) tab closing to CH Web's closable tab strips:apps/web-ui/packages/client/ui-dockkit/src/components/TabPanel.tsx):onPointerDowndocking drag start to primary button (event.button !== 0) so middle-click and mouse side buttons never start a drag or capture the pointer.mousedownand close closable tabs on middleauxclick(ignoring events bubbled from portaled menus/tooltips viacurrentTarget.contains(target)and respectingcanCloseTab).apps/web-ui/packages/client/ui-workspace/src/client/RecentShortcut.tsx):mousedownand close the session shortcut tab on middleauxclickvia the samerestoreNavigationFocus()+close(visit.sessionId)path as the×button.UI Changes
No visual changes: adds middle-click pointer interaction equivalent to clicking the existing close (
×) button on right-sidebar and recent-session tabs without altering layout, DOM structure, or styling.Validation
npx prettier --checkon both changed files & pre-commit hook (passed)node tools/check-boundaries.mjs(passed)npx tsc --noEmit -p apps/web-ui/tsconfig.json(passed)tsdownbundle check for@deepseek-ai/dsh-client-ui-sidebar-rightand@deepseek-ai/dsh-client-ui-workspace(passed)npx vitest run --config tests/vitest.config.js apps/web-ui/packages/client/ui-workspace/test/(2 files, 11/11 passed)