From 20012ebd80b06a4c10ab0e78893822e7f873b2a8 Mon Sep 17 00:00:00 2001 From: Igor Makowski <56691628+Mnigos@users.noreply.github.com> Date: Fri, 2 Oct 2026 05:33:36 +0200 Subject: [PATCH] fix(web): keep the terminal toggle clear of the last header action (#13426) --- apps/web/src/components/ChatView.tsx | 7 ++++++- apps/web/src/components/chat/ChatHeader.tsx | 8 +++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index db13c8f21c80ef56ec4510690acaf1efded6b0c1..a32c1473cda710fa8968796dcbd2ca6eb0c111cc 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -9516,7 +9516,12 @@ export default function ChatView(props: ChatViewProps) { "flex shrink-0", panelAnimationsActive && "motion-safe:transition-opacity motion-safe:duration-(--panel-animation-duration) motion-safe:ease-out", - rightPanelOpen ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0", + // Closed, the control leaves the flex flow so the cluster is only as wide as the two + // toggles the header reserves room for; anchored to the cluster's left edge, it fades + // out where it stood rather than over the terminal toggle. + rightPanelOpen + ? "pointer-events-auto opacity-100" + : "pointer-events-none absolute right-full mr-1 opacity-0", )} inert={!rightPanelOpen} > diff --git a/apps/web/src/components/chat/ChatHeader.tsx b/apps/web/src/components/chat/ChatHeader.tsx index bbe014ddbd0650adcc3fcb2991e7483c50bddd86..92f615538f2d944d4d6271a7279b5d1cc6b0e2bb 100644 --- a/apps/web/src/components/chat/ChatHeader.tsx +++ b/apps/web/src/components/chat/ChatHeader.tsx @@ -492,9 +492,11 @@ export const ChatHeader = memo(function ChatHeader({ data-chat-header-actions className={cn( "flex shrink-0 items-center justify-end gap-2 @3xl/header-actions:gap-3", - // Reserve two panel toggles plus their 4px gaps and 1px edge inset. - // The page header adds 8px more right padding at sm. - rightPanelOpen ? "pr-0" : "pr-18.25 sm:pr-14.25", + // Reserve two panel toggles (32px, 28px at sm) with their 4px gap and 1px edge inset, + // plus the same gap the actions keep between themselves (gap-2, gap-3 at @3xl) so the + // terminal toggle does not sit against the last action. The page header adds 8px more + // right padding at sm. + rightPanelOpen ? "pr-0" : "pr-19.25 sm:pr-15.25 @3xl/header-actions:pr-16.25", "[[data-panel-animations=true]_&]:motion-safe:transition-[padding-right] [[data-panel-animations=true]_&]:motion-safe:duration-(--panel-animation-duration) [[data-panel-animations=true]_&]:motion-safe:ease-out", )} > -- 2.54.0