diff --git a/components/dashboard/DashboardShell.tsx b/components/dashboard/DashboardShell.tsx index 93b2bab..714baca 100644 --- a/components/dashboard/DashboardShell.tsx +++ b/components/dashboard/DashboardShell.tsx @@ -38,16 +38,7 @@ function GlassTopBar({ siteId }: { siteId: string }) { }, [realtime]) return ( -
- {/* Collapse toggle — negative margin to align with sidebar icons */} - - +
{/* Realtime indicator */} {lastUpdatedRef.current != null && (
diff --git a/components/dashboard/Sidebar.tsx b/components/dashboard/Sidebar.tsx index 8a265f0..99c49dd 100644 --- a/components/dashboard/Sidebar.tsx +++ b/components/dashboard/Sidebar.tsx @@ -9,6 +9,7 @@ import { listSites, type Site } from '@/lib/api/sites' import { useAuth } from '@/lib/auth/context' import { useSettingsModal } from '@/lib/settings-modal-context' import { useSidebar } from '@/lib/sidebar-context' +import { SidebarSimple } from '@phosphor-icons/react' // `,` shortcut handled globally by UnifiedSettingsModal import { getUserOrganizations, switchContext, type OrganizationMember } from '@/lib/api/organization' import { setSessionAction } from '@/app/actions/auth' @@ -340,6 +341,7 @@ interface SidebarContentProps { onMobileClose: () => void onExpand: () => void onCollapse: () => void + onToggle: () => void wasCollapsed: React.MutableRefObject pickerOpenCallbackRef: React.MutableRefObject<(() => void) | null> auth: ReturnType @@ -350,7 +352,7 @@ interface SidebarContentProps { function SidebarContent({ isMobile, collapsed, siteId, sites, canEdit, pendingHref, - onNavigate, onMobileClose, onExpand, onCollapse, + onNavigate, onMobileClose, onExpand, onCollapse, onToggle, wasCollapsed, pickerOpenCallbackRef, auth, orgs, onSwitchOrganization, openSettings, }: SidebarContentProps) { const router = useRouter() @@ -359,7 +361,20 @@ function SidebarContent({ return (
- {/* App Switcher — top of sidebar (scope-level switch) */} + {/* Collapse toggle — first item, aligned with all other sidebar icons */} + {!isMobile && ( +
+ +
+ )} + + {/* App Switcher — scope-level switch */}
@@ -525,7 +540,7 @@ export default function Sidebar({ onMobileClose={onMobileClose} onExpand={expand} onCollapse={collapse} - + onToggle={toggle} wasCollapsed={wasCollapsedRef} pickerOpenCallbackRef={pickerOpenCallbackRef} auth={auth} @@ -568,7 +583,7 @@ export default function Sidebar({ onMobileClose={handleMobileClose} onExpand={expand} onCollapse={collapse} - + onToggle={toggle} wasCollapsed={wasCollapsedRef} pickerOpenCallbackRef={pickerOpenCallbackRef} auth={auth}