Skip to content

Commit 12ccca5

Browse files
committed
fix(web): keep right panel controls clickable
1 parent 80b5373 commit 12ccca5

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

‎apps/web/src/components/ChatView.tsx‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,8 +1844,7 @@ function ChatViewContent(props: ChatViewProps) {
18441844
panelAnimationDurationMs,
18451845
);
18461846
const rightPanelPresent = rightPanelPresence.present;
1847-
const rightPanelControlsInPanel =
1848-
rightPanelPresent && (!shouldUseRightPanelSheet || rightPanelOpen);
1847+
const rightPanelControlsInPanel = rightPanelPresent && rightPanelOpen;
18491848
const renderedRightPanelSurface = rightPanelPresence.value?.activeSurface ?? null;
18501849
const renderedRightPanelSurfaces = rightPanelPresence.value?.surfaces ?? [];
18511850
const previewMiniPlayerVisible = shouldRenderPreviewMiniPlayer(
@@ -7411,6 +7410,15 @@ function ChatViewContent(props: ChatViewProps) {
74117410
<div className="pointer-events-auto flex h-full items-center">{panelToggleControls}</div>
74127411
</div>
74137412
);
7413+
const inlineRightPanelControls = (
7414+
<div className="mr-px flex h-full items-center gap-1 [-webkit-app-region:no-drag]">
7415+
<RightPanelMaximizeControl
7416+
maximized={rightPanelMaximized}
7417+
onToggle={toggleRightPanelMaximized}
7418+
/>
7419+
{panelToggleControls}
7420+
</div>
7421+
);
74147422
const rightPanelContent = activeThreadRef ? (
74157423
renderedRightPanelSurface?.kind === "preview" ? (
74167424
<Suspense fallback={null}>
@@ -7571,7 +7579,7 @@ function ChatViewContent(props: ChatViewProps) {
75717579
reserveNativeControls={reserveTitleBarControlInset && !inlineRightPanelOwnsTitleBar}
75727580
className="relative bg-background"
75737581
>
7574-
{!shouldUseRightPanelSheet || !rightPanelControlsInPanel ? panelLayoutControls : null}
7582+
{!rightPanelControlsInPanel ? panelLayoutControls : null}
75757583
<ChatHeader
75767584
{...(!supportsPullRequests || activeProjectRepository === null
75777585
? {}
@@ -7999,6 +8007,7 @@ function ChatViewContent(props: ChatViewProps) {
79998007
mode="inline"
80008008
open={rightPanelOpen}
80018009
maximized={rightPanelMaximized}
8010+
layoutControls={rightPanelOpen ? inlineRightPanelControls : null}
80028011
surfaces={renderedRightPanelSurfaces}
80038012
environmentId={activeThreadRef.environmentId}
80048013
activeSurfaceId={renderedRightPanelSurface?.id ?? null}

0 commit comments

Comments
 (0)