diff --git a/desktop/src/app/AppShell.tsx b/desktop/src/app/AppShell.tsx index 6257a75b7..96aa7acba 100644 --- a/desktop/src/app/AppShell.tsx +++ b/desktop/src/app/AppShell.tsx @@ -894,6 +894,7 @@ export function AppShell() { /> ) : null} ; @@ -16,11 +17,18 @@ type AppShellChannelSurfaceProps = { export function AppShellChannelSurface({ children, + hasCommunityRail, isHuddleRoom, isHuddleRoomStarting, mainInsetRef, terminal, }: AppShellChannelSurfaceProps) { + const { isMobile, openMobile, state: sidebarState } = useSidebar(); + const hasCollapsedSidebarGutter = + !isHuddleRoom && + !hasCommunityRail && + (isMobile ? !openMobile : sidebarState === "collapsed"); + return ( + {hasCollapsedSidebarGutter ? ( +
+ ) : null} {isHuddleRoom && !isHuddleRoomStarting ? : null} {isHuddleRoomStarting ? : children} diff --git a/desktop/src/shared/ui/sidebar.tsx b/desktop/src/shared/ui/sidebar.tsx index 8bfe3cdc9..568bb4691 100644 --- a/desktop/src/shared/ui/sidebar.tsx +++ b/desktop/src/shared/ui/sidebar.tsx @@ -36,7 +36,8 @@ const SIDEBAR_WIDTH_MAX = 420; const SIDEBAR_WIDTH_MOBILE = "288px"; const SIDEBAR_WIDTH_ICON = "48px"; const SIDEBAR_KEYBOARD_SHORTCUT = "s"; - +// Increases button hit areas on mobile without changing their layout. +const MOBILE_ACTION_HIT_AREA = "after:absolute after:-inset-2 after:md:hidden"; type SidebarContextProps = { state: "expanded" | "collapsed"; open: boolean; @@ -217,8 +218,8 @@ const SidebarProvider = React.forwardRef< return () => window.removeEventListener("keydown", handleKeyDown); }, [toggleSidebar]); + // Expose semantic state so Tailwind descendants can style both modes. const state = open ? "expanded" : "collapsed"; - const contextValue = React.useMemo( () => ({ state, @@ -360,8 +361,8 @@ const Sidebar = React.forwardRef< />