@@ -1884,7 +1884,8 @@ function ChatViewContent(props: ChatViewProps) {
18841884 panelAnimationDurationMs ,
18851885 ) ;
18861886 const rightPanelPresent = rightPanelPresence . present ;
1887- const rightPanelControlsInPanel = rightPanelPresent && rightPanelOpen ;
1887+ const rightPanelControlsInPanel = shouldUseRightPanelSheet && rightPanelPresent && rightPanelOpen ;
1888+ const rightPanelControlsAtRoot = rightPanelPresent && ! shouldUseRightPanelSheet ;
18881889 const renderedRightPanelSurface = rightPanelPresence . value ?. activeSurface ?? null ;
18891890 const renderedRightPanelSurfaces = rightPanelPresence . value ?. surfaces ?? [ ] ;
18901891 const previewMiniPlayerVisible = shouldRenderPreviewMiniPlayer (
@@ -7526,15 +7527,6 @@ function ChatViewContent(props: ChatViewProps) {
75267527 < div className = "pointer-events-auto flex h-full items-center" > { panelToggleControls } </ div >
75277528 </ div >
75287529 ) ;
7529- const inlineRightPanelControls = (
7530- < div className = "mr-px flex h-full items-center gap-1 [-webkit-app-region:no-drag]" >
7531- < RightPanelMaximizeControl
7532- maximized = { rightPanelMaximized }
7533- onToggle = { toggleRightPanelMaximized }
7534- />
7535- { panelToggleControls }
7536- </ div >
7537- ) ;
75387530 const rightPanelContent = activeThreadRef ? (
75397531 renderedRightPanelSurface ?. kind === "preview" ? (
75407532 < Suspense fallback = { null } >
@@ -7681,6 +7673,7 @@ function ChatViewContent(props: ChatViewProps) {
76817673
76827674 return (
76837675 < div className = "relative flex min-h-0 min-w-0 flex-1 overflow-hidden bg-background" >
7676+ { rightPanelControlsAtRoot ? panelLayoutControls : null }
76847677 < div
76857678 className = { cn (
76867679 "flex min-h-0 min-w-0 flex-col overflow-x-hidden" ,
@@ -7695,7 +7688,13 @@ function ChatViewContent(props: ChatViewProps) {
76957688 reserveNativeControls = { reserveTitleBarControlInset && ! inlineRightPanelOwnsTitleBar }
76967689 className = "relative bg-background"
76977690 >
7698- { ! rightPanelControlsInPanel ? panelLayoutControls : null }
7691+ { isElectron && rightPanelControlsAtRoot ? (
7692+ < span
7693+ aria-hidden
7694+ className = "pointer-events-none fixed top-[var(--workspace-controls-top)] right-[var(--workspace-controls-right)] h-[var(--workspace-topbar-height)] w-28 [-webkit-app-region:no-drag]"
7695+ />
7696+ ) : null }
7697+ { ! rightPanelControlsAtRoot && ! rightPanelControlsInPanel ? panelLayoutControls : null }
76997698 < ChatHeader
77007699 { ...( ! supportsPullRequests || activeProjectRepository === null
77017700 ? { }
@@ -8126,7 +8125,6 @@ function ChatViewContent(props: ChatViewProps) {
81268125 mode = "inline"
81278126 open = { rightPanelOpen }
81288127 maximized = { rightPanelMaximized }
8129- layoutControls = { rightPanelOpen ? inlineRightPanelControls : null }
81308128 surfaces = { renderedRightPanelSurfaces }
81318129 environmentId = { activeThreadRef . environmentId }
81328130 activeSurfaceId = { renderedRightPanelSurface ?. id ?? null }
0 commit comments