{isMobile ? (
{
const nextOpen = !mobileLeftDrawerOpen;
if (mobileRightSidebarOpen) {
setMobileRightSidebarOpen(false);
}
setMobileSessionPanelOpen(nextOpen);
},
toggleRightDrawer: handleToggleMobileRightDrawer,
leftDrawerX,
rightDrawerX,
leftDrawerWidth,
rightDrawerWidth,
setMobileLeftDrawerOpen: setMobileSessionPanelOpen,
setRightSidebarOpen: setMobileRightSidebarOpen,
}}>
{/* Mobile: header + drawer mode */}
{!isSettingsDialogOpen &&
) : (
<>
{/* Persistent top-left controls (toggle + project actions) that
stay put while the sidebar/header animate beneath them. */}
{/* Desktop: full-height Sidebar beside [Header above (chat | RightSidebar)] */}
}
>
{secondaryView && (
{secondaryView}
)}
{isBottomTerminalOpen && activeMainTab !== 'terminal' ? (
) : null}
{/* Desktop settings: windowed dialog with blur */}
>
)}