{
if (active && event.target instanceof HTMLElement) {
lastWorkspaceFocus.current = event.target;
}
}}
onPointerDown={staged ? onOverviewBackgroundPointerDown : undefined}
className={cn(
"relative min-h-0 flex-1 overscroll-x-none",
!active && "pointer-events-none absolute inset-0 invisible",
// Panes round their own cuts against the scrolling strip (PaneCuts);
// a workspace switch rounds the rows it slides past the window.
split && stacked && "rounded-pane",
// Stacked, nothing may scroll it: a composer taking focus in the
// row below would scroll that row into view under the motion.
stacked
? "overflow-clip"
: stripWidth > 1 && !staged
? "overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
: "overflow-hidden",
)}
>
{staged ? (
// The window chrome behind the zoomed-out stage (pen rg38s).
{renderedTabIds.map((tabId) => {
const entry = chatTabsById.get(tabId);
const ghost = entry ? null : ghosts.get(tabId);
if (ghost?.kind === "chat") {
return (
);
}
if (!entry || entry.tab.content.kind !== "chat") return null;
return (
);
})}
{pageTabs.map((tab) =>
isLayoutPageContent(tab.content) ? (
) : null,
)}
{launcherSlots.map(({ placed, tabId, content }) => (
))}
{[...ghosts].map(([tabId, ghost]) =>
ghost.kind === "launcher" ? (
) : ghost.kind === "bare" ? (
) : null,
)}
{surfaceSlots.map(({ placed, tabId, content }) => (
))}
{goneRows.map((row) => (
))}
{staged ? (
) : null}
{split && slots.length > 1 && !staged && !stacked ? (
) : null}