From 8c68a303e46d26cc3ed6b7d230979284680a9edb Mon Sep 17 00:00:00 2001 From: Advait Johari Date: Sun, 8 Nov 2026 12:45:40 -0600 Subject: [PATCH 1/4] fix(web): terminal and right panel toggles show open and closed icons --- apps/web/src/components/ChatView.tsx | 4 +- .../components/chat/PanelLayoutControls.tsx | 40 +++++++++++-------- apps/web/src/index.css | 14 ++++--- 3 files changed, 35 insertions(+), 23 deletions(-) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index ff4a642b5c31d..6da517db1b183 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -1084,7 +1084,8 @@ export default function ChatView(props: ChatViewProps) { const rightPanelPresent = rightPanelPresence.present; const rightPanelControlsInPanel = shouldUsePlanSidebarSheet && rightPanelPresent && rightPanelOpen; - const rightPanelControlsAtRoot = rightPanelPresent && !shouldUsePlanSidebarSheet; + // One mount point for open and closed, so the toggle icons can morph instead of remounting. + const rightPanelControlsAtRoot = !rightPanelControlsInPanel; const renderedRightPanelSurface = rightPanelPresence.value?.activeSurface ?? null; const renderedRightPanelSurfaces = rightPanelPresence.value?.surfaces ?? []; const previewMiniPlayerVisible = shouldRenderPreviewMiniPlayer( @@ -3360,7 +3361,6 @@ export default function ChatView(props: ChatViewProps) { 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]" /> ) : null} - {!rightPanelControlsAtRoot && !rightPanelControlsInPanel ? panelLayoutControls : null} {inlineRightPanelOwnsTitleBar ? threadPanelHeaderControl : null} }> - - - + + {terminalAvailable @@ -108,18 +116,18 @@ export const PanelLayoutControls = memo(function PanelLayoutControls({ {showRightPanelControl ? ( }> - - - + + {rightPanelAvailable diff --git a/apps/web/src/index.css b/apps/web/src/index.css index a8f3d33c1853d..e1ac424839783 100644 --- a/apps/web/src/index.css +++ b/apps/web/src/index.css @@ -1478,22 +1478,26 @@ html[data-theme-id] [data-chat-header] [data-toolbar-control] { color: var(--contrast-toolbar-control-foreground); } -/* The panel layout toggles stay ghost: they render both inside the header and - in the titlebar strip, so filling them would make them change appearance as - the panel opens. They only take the themed foreground; hover and pressed - keep the base ghost accent. The tooltip trigger's data-slot wins over the - toggle's when the trigger renders the toggle, so match both. */ +/* The panel layout controls stay ghost: some render inside the header and + others in the titlebar strip, so filling them would make them disagree. They + only take the themed foreground; hover and pressed keep the base ghost + accent. The tooltip trigger's data-slot wins over the control's when the + trigger renders it, so match both. */ html[data-theme-id] [data-panel-layout-controls] [data-slot="toggle"], +html[data-theme-id] [data-panel-layout-controls] [data-slot="button"], html[data-theme-id] [data-panel-layout-controls] [data-slot="tooltip-trigger"], html[data-theme-id] [data-workspace-titlebar-controls] [data-slot="toggle"], +html[data-theme-id] [data-workspace-titlebar-controls] [data-slot="button"], html[data-theme-id] [data-workspace-titlebar-controls] [data-slot="tooltip-trigger"] { --control-icon-color: var(--contrast-toolbar-foreground); color: var(--contrast-toolbar-foreground); } html[data-theme-id] [data-panel-layout-controls] [data-slot="toggle"]:disabled, +html[data-theme-id] [data-panel-layout-controls] [data-slot="button"]:disabled, html[data-theme-id] [data-panel-layout-controls] [data-slot="tooltip-trigger"]:disabled, html[data-theme-id] [data-workspace-titlebar-controls] [data-slot="toggle"]:disabled, +html[data-theme-id] [data-workspace-titlebar-controls] [data-slot="button"]:disabled, html[data-theme-id] [data-workspace-titlebar-controls] [data-slot="tooltip-trigger"]:disabled { --control-icon-color: color-mix( in oklab, From 73259587c742de67af01842681e1ba3c79e335a6 Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Wed, 11 Nov 2026 15:30:08 +0000 Subject: [PATCH 2/4] fix(web): describe the single panel controls mount accurately --- apps/web/src/components/ChatView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index af123498b3130..b4e5c6bc89176 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -1068,7 +1068,7 @@ export default function ChatView(props: ChatViewProps) { const rightPanelPresent = rightPanelPresence.present; const rightPanelControlsInPanel = shouldUsePlanSidebarSheet && rightPanelPresent && rightPanelOpen; - // One mount point for open and closed, so the toggles keep focus instead of remounting. + // One mount point for open and closed, so the toggles are not remounted. const rightPanelControlsAtRoot = !rightPanelControlsInPanel; const renderedRightPanelSurface = rightPanelPresence.value?.activeSurface ?? null; const renderedRightPanelSurfaces = rightPanelPresence.value?.surfaces ?? []; From 89deaccbe2ff92b445690ab03357a86ff683fc7e Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Wed, 18 Nov 2026 11:03:23 +0000 Subject: [PATCH 3/4] fix(web): keep blank titlebar space draggable --- apps/web/src/components/ChatView.tsx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 990b6a8971d10..6e854666cedb4 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -3400,12 +3400,6 @@ export default function ChatView(props: ChatViewProps) { COLLAPSED_SIDEBAR_TITLEBAR_INSET_CLASS, )} > - {isElectron && rightPanelControlsAtRoot ? ( - - ) : null} {inlineRightPanelOwnsTitleBar ? threadPanelHeaderControl : null} Date: Wed, 18 Nov 2026 11:06:59 +0000 Subject: [PATCH 4/4] fix(desktop): place panel controls after caption drag regions --- apps/web/src/components/ChatView.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 6e854666cedb4..6b324d41bdc49 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -3372,7 +3372,6 @@ export default function ChatView(props: ChatViewProps) { state={deviceState} /> )} - {rightPanelControlsAtRoot && !embedded ? panelLayoutControls : null}
) : null} + {/* Electron caption hit-testing gives later no-drag regions precedence. */} + {rightPanelControlsAtRoot && !embedded ? panelLayoutControls : null} +