Repository navigation
fix(web-ui): keep tab shortcuts scoped to the focused region - #3774
Merged
Merged
Conversation
3 tasks done
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Ctrl+W on Windows/Linux and Cmd+W on macOS now close the tab in the region the user is operating. The conversation area closes its scene tab; the file/terminal area closes its own active tab, including split groups and a separate bottom terminal canvas.
Type and Areas
Type: bug fix / keyboard interaction
Areas: Web UI, shared desktop frontend, shortcut registration, documentation
Motivation / Impact
Previously, the top-level conversation had no close binding, nested terminal focus did not reach the canvas handler, and independently mounted canvases could replace each other's registrations. The third split also resolved to the second group.
tab.closecustomization ID.Verification
pnpm --dir src/web-ui run test:run src/app/hooks/useTabCloseShortcut.test.tsx src/infrastructure/services/ShortcutManager.test.ts src/app/components/panels/content-canvas/hooks/useTabLifecycle.btw.test.tsx src/app/stores/sceneStore.test.ts src/app/services/sessionSceneLifecycle.test.ts src/flow_chat/services/sessionActivation.test.ts src/flow_chat/services/storeSync.test.ts src/app/workbench/WorkbenchLayout.test.tsx src/app/workbench/workbenchContent.test.ts src/app/scenes/settings/pages/application/KeyboardShortcutsSection.test.tsx src/app/scenes/settings/pages/application/KeyboardShortcutsSection.presentation.test.ts src/app/browserShortcutPolicy.test.ts src/app/global-search/globalSearchShortcut.test.ts src/app/hooks/windowFullscreenShortcut.test.ts src/app/components/panels/content-canvas/hooks/canvasPanelOwnership.test.tsx src/app/components/SceneBar/SceneBar.test.tsx src/app/components/panels/content-canvas/editor-area/EditorArea.test.tsx— 282 tests passed across 17 files.pnpm run check:web— passed appearance, typography, theme and TypeScript checks.pnpm --dir src/web-ui exec tsc --noEmit— passed after the final changes.git diff --check— passed.Reviewer Notes
AI-assisted implementation and review; locally tested with real shortcut dispatch and store/lifecycle fixtures. The keyboard tests simulate Windows/Linux/macOS modifiers, concurrent panes, terminal lifecycle, existing custom bindings and cancellation after a Peer surface switch. Native OS/WebView keyboard delivery and live SSH, Remote Control, Peer Device and Detached Dispatch scenarios have not been manually exercised. There is no visual layout change; interaction regressions are covered by DOM tests.
The four commits separate shortcut-registration support, focused tab-close behavior, related navigation/recording fixes, and recorder focus/conflict checks found during review. Regression tests reproduced the related failures before the fixes. No persisted format, remote protocol or runtime/session ownership changes are introduced.
Checklist