Skip to content

Commit 20012eb

Browse files
authored
fix(web): keep the terminal toggle clear of the last header action (pingdotgg#13426)
1 parent fa6262d commit 20012eb

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
@@ -9516,7 +9516,12 @@ export default function ChatView(props: ChatViewProps) {
95169516
"flex shrink-0",
95179517
panelAnimationsActive &&
95189518
"motion-safe:transition-opacity motion-safe:duration-(--panel-animation-duration) motion-safe:ease-out",
9519-
rightPanelOpen ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0",
9519+
// Closed, the control leaves the flex flow so the cluster is only as wide as the two
9520+
// toggles the header reserves room for; anchored to the cluster's left edge, it fades
9521+
// out where it stood rather than over the terminal toggle.
9522+
rightPanelOpen
9523+
? "pointer-events-auto opacity-100"
9524+
: "pointer-events-none absolute right-full mr-1 opacity-0",
95209525
)}
95219526
inert={!rightPanelOpen}
95229527
>

‎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)