authorgravatar for 62337003+Bil0000@users.noreply.github.comBilal Bakr <62337003+Bil0000@users.noreply.github.com> 2026-09-12 00:54:02+03:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-11 18:54:02-03:00
log15c6167bc48922c9359235d6eee11259f2164d1d
tree241b259457390cf8fc604bf43c419ad507e0bda7
parente145c5f22a10d7433420b447537ed3f29a66d7d9
signature Signed by PGP key B5690EEEBB952194

fix(web): use the configured panel shortcut on the PR page (#11292)


1 files changed, 9 insertions(+), 2 deletions(-)

apps/web/src/routes/_chat.pull-requests.tsx+9-2
......@@ -114,7 +114,7 @@ import { WorkspacePageContainer } from "../components/WorkspacePageContainer";
114114import { WorkspacePageHeader } from "../components/WorkspacePageHeader";
115115import { isCommandPaletteOpen } from "../commandPaletteBus";
116116import { isElectron } from "../env";
117import { resolveShortcutCommand } from "../keybindings";
117import { resolveShortcutCommand, shortcutLabelForCommand } from "../keybindings";
118118import { isTerminalFocused } from "../lib/terminalFocus";
119119import { PanelLayoutControls } from "../components/chat/PanelLayoutControls";
120120import { Button } from "../components/ui/button";
......@@ -1577,7 +1577,7 @@ function PullRequestsRouteView() {
15771577 terminalShortcutLabel={null}
15781578 rightPanelAvailable={rightPanelAvailable}
15791579 rightPanelOpen={rightPanelState.isOpen}
1580 rightPanelShortcutLabel={null}
1580 rightPanelShortcutLabel={shortcutLabelForCommand(keybindings, "rightPanel.toggle")}
15811581 rightPanelUnavailableLabel="Select a pull request first"
15821582 liveAgentCount={0}
15831583 onToggleTerminal={() => undefined}
......@@ -1914,6 +1914,12 @@ function PullRequestsRouteView() {
19141914 event.stopPropagation();
19151915 if (!event.repeat) closeSurface(activePullRequestSurface);
19161916 });
1917 const toggleRightPanelFromShortcut = useEffectEvent((event: KeyboardEvent) => {
1918 if (!rightPanelAvailable) return;
1919 event.preventDefault();
1920 event.stopPropagation();
1921 if (!event.repeat) toggleRightPanel();
1922 });
19171923 useEffect(() => {
19181924 const onKeyDown = (event: KeyboardEvent) => {
19191925 if (event.defaultPrevented || isCommandPaletteOpen()) return;
......@@ -1921,6 +1927,7 @@ function PullRequestsRouteView() {
19211927 context: { terminalFocus: isTerminalFocused() },
19221928 });
19231929 if (command === "rightPanel.close") closeActiveSurfaceFromShortcut(event);
1930 if (command === "rightPanel.toggle") toggleRightPanelFromShortcut(event);
19241931 if (command === "thread.copyReference") copyPullRequestFromShortcut(event);
19251932 };
19261933 window.addEventListener("keydown", onKeyDown);