diff --git a/apps/web/src/components/ChatRightPanel.tsx b/apps/web/src/components/ChatRightPanel.tsx index 97599358..758f3a40 100644 --- a/apps/web/src/components/ChatRightPanel.tsx +++ b/apps/web/src/components/ChatRightPanel.tsx @@ -49,6 +49,7 @@ export function ChatRightPanel(props: { onSelectTab={props.onSelectTab} onCloseTab={props.onCloseTab} onReorderTab={props.onReorderTab} + overlay={onDismiss !== undefined} {...(onDismiss ? { trailing: ( diff --git a/apps/web/src/components/chat/RightPanelTabStrip.tsx b/apps/web/src/components/chat/RightPanelTabStrip.tsx index 0fa520ed..dbf78f3b 100644 --- a/apps/web/src/components/chat/RightPanelTabStrip.tsx +++ b/apps/web/src/components/chat/RightPanelTabStrip.tsx @@ -682,6 +682,7 @@ export const RightPanelTabStrip = memo(function RightPanelTabStrip({ onCloseTab, onReorderTab, trailing, + overlay = false, }: { openTabs: ReadonlyArray; availableTabs: ReadonlyArray; @@ -697,6 +698,9 @@ export const RightPanelTabStrip = memo(function RightPanelTabStrip({ onReorderTab?: ((tab: RightPanelTab, toIndex: number) => void) | undefined; /** Sheet-mode dismissal, parked at the end of the row. */ trailing?: React.ReactNode; + /** Sheet mode: the panel starts below the chat header, so the strip neither + * shares its row with the window controls nor acts as a window drag handle. */ + overlay?: boolean; }) { const stripRef = useRef(null); const { mode, rowRef, measureRef, actionsRef, trailingRef } = useTabStripMode(openTabs.join(",")); @@ -732,7 +736,7 @@ export const RightPanelTabStrip = memo(function RightPanelTabStrip({ return (
@@ -745,10 +749,19 @@ export const RightPanelTabStrip = memo(function RightPanelTabStrip({ titlebar rows add 1em. They end in text or labelled controls that would read as crowded against the buttons; this row ends in the `+`, whose own padding is the breathing room, so the extra 12px only pushed it away - from the controls it sits beside. */} + from the controls it sits beside. + + None of that applies in sheet mode: the sheet starts below the chat + header, so the row is not under the controls and must not pad clear of + them (the ✕ would land mid-row), and a drag region floating over the + conversation only got in the way of its own dismiss button. */}
{/* The labelled row the mode decision is measured against. Out of the