Skip to content

Commit 7f8fe39

Browse files
committed
fix(web): keep the terminal toggle clear of the last header action
The closed right-panel maximize control stayed a flex item of the titlebar cluster, so the terminal toggle sat against "Commit, push & PR" and its tooltip painted across that button. The control now leaves the flow while closed, and the header reserves the two toggles plus the same gap the actions keep between themselves.
1 parent f26ee08 commit 7f8fe39

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9589,7 +9589,12 @@ export default function ChatView(props: ChatViewProps) {
95899589
"flex shrink-0",
95909590
panelAnimationsActive &&
95919591
"motion-safe:transition-opacity motion-safe:duration-(--panel-animation-duration) motion-safe:ease-out",
9592-
rightPanelOpen ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0",
9592+
// Closed, the control leaves the flex flow so the cluster is only as wide as the two
9593+
// toggles the header reserves room for; anchored to the cluster's left edge, it fades
9594+
// out where it stood rather than over the terminal toggle.
9595+
rightPanelOpen
9596+
? "pointer-events-auto opacity-100"
9597+
: "pointer-events-none absolute right-full mr-1 opacity-0",
95939598
)}
95949599
inert={!rightPanelOpen}
95959600
>

‎apps/web/src/components/chat/ChatHeader.tsx‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,9 +492,11 @@ export const ChatHeader = memo(function ChatHeader({
492492
data-chat-header-actions
493493
className={cn(
494494
"flex shrink-0 items-center justify-end gap-2 @3xl/header-actions:gap-3",
495-
// Reserve two panel toggles plus their 4px gaps and 1px edge inset.
496-
// The page header adds 8px more right padding at sm.
497-
rightPanelOpen ? "pr-0" : "pr-18.25 sm:pr-14.25",
495+
// Reserve two panel toggles (32px, 28px at sm) with their 4px gap and 1px edge inset,
496+
// plus the same gap the actions keep between themselves (gap-2, gap-3 at @3xl) so the
497+
// terminal toggle does not sit against the last action. The page header adds 8px more
498+
// right padding at sm.
499+
rightPanelOpen ? "pr-0" : "pr-19.25 sm:pr-15.25 @3xl/header-actions:pr-16.25",
498500
"[[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",
499501
)}
500502
>

0 commit comments

Comments
 (0)