diff --git a/apps/web/src/components/AppSidebarLayout.tsx b/apps/web/src/components/AppSidebarLayout.tsx index 00d5c05ef089029f04a18ed6fbb64b5d3a89b1ca..fd56ee8ca5ac9de20a7cf284361ff8465a048b0f 100644 --- a/apps/web/src/components/AppSidebarLayout.tsx +++ b/apps/web/src/components/AppSidebarLayout.tsx @@ -83,7 +83,7 @@ function readInitialThreadSidebarWidth(): number { function SidebarControl() { const usagePageOpen = useLocation({ select: (location) => location.pathname === "/usage" }); const keybindings = useAtomValue(primaryServerKeybindingsAtom); - const { toggleSidebar } = useSidebar(); + const { toggleSidebar, isMobile, mobileSheetMounted } = useSidebar(); const isSidebarVisible = useSidebarVisibility(); const environmentIdentificationMode = useEnvironmentIdentificationMode(); const stageBackdropVariant = useSidebarStageBackdropVariant( @@ -138,8 +138,12 @@ function SidebarControl() { // The right-side layout controls carry mr-px (border compensation inside // the panel), so the trigger mirrors it: both clusters sit one extra pixel // off their edge and the titlebar reads symmetric. + // The sheet owns its trigger until its closing transition unmounts it.