File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ import type { InstalledPackage } from '@objectstack/spec/kernel';
4141import {
4242 Sidebar ,
4343 SidebarContent ,
44+ SidebarFooter ,
4445 SidebarGroup ,
4546 SidebarGroupContent ,
4647 SidebarGroupLabel ,
@@ -53,6 +54,7 @@ import {
5354 SidebarMenuSub ,
5455 SidebarMenuSubItem ,
5556 SidebarMenuSubButton ,
57+ SidebarTrigger ,
5658} from "@/components/ui/sidebar"
5759import {
5860 Collapsible ,
@@ -547,6 +549,13 @@ export function AppSidebar({
547549 </ SidebarGroupContent >
548550 </ SidebarGroup >
549551 </ SidebarContent >
552+ < SidebarFooter >
553+ < SidebarMenu >
554+ < SidebarMenuItem >
555+ < SidebarTrigger />
556+ </ SidebarMenuItem >
557+ </ SidebarMenu >
558+ </ SidebarFooter >
550559 </ Sidebar >
551560 )
552561}
Original file line number Diff line number Diff line change @@ -35,12 +35,14 @@ import {
3535import {
3636 Sidebar ,
3737 SidebarContent ,
38+ SidebarFooter ,
3839 SidebarGroup ,
3940 SidebarGroupContent ,
4041 SidebarMenu ,
4142 SidebarMenuButton ,
4243 SidebarMenuItem ,
4344 SidebarSeparator ,
45+ SidebarTrigger ,
4446} from '@/components/ui/sidebar' ;
4547import { useSession } from '@/hooks/useSession' ;
4648
@@ -157,6 +159,13 @@ export function GlobalSidebar() {
157159 </ SidebarGroupContent >
158160 </ SidebarGroup >
159161 </ SidebarContent >
162+ < SidebarFooter >
163+ < SidebarMenu >
164+ < SidebarMenuItem >
165+ < SidebarTrigger />
166+ </ SidebarMenuItem >
167+ </ SidebarMenu >
168+ </ SidebarFooter >
160169 </ Sidebar >
161170 ) ;
162171}
Original file line number Diff line number Diff line change 1212
1313import { useLocation , useParams } from '@tanstack/react-router' ;
1414import { useMemo } from 'react' ;
15- import { SidebarTrigger } from '@/components/ui/sidebar' ;
1615import { Separator } from '@/components/ui/separator' ;
1716import {
1817 Breadcrumb ,
@@ -181,8 +180,6 @@ export function TopBar({
181180 < header className = "flex h-12 shrink-0 items-center justify-between gap-2 border-b px-4" >
182181 { /* Left segment: Org + Env + Package switchers */ }
183182 < div className = "flex items-center gap-2" >
184- < SidebarTrigger className = "-ml-1" />
185- < Separator orientation = "vertical" className = "mr-2 h-4" />
186183 < OrganizationSwitcher />
187184 < Separator orientation = "vertical" className = "mx-1 h-4" />
188185 < EnvironmentSwitcher />
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ const SidebarProvider = React.forwardRef<
142142 } as React . CSSProperties
143143 }
144144 className = { cn (
145- "group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-svh w-full overflow-hidden " ,
145+ "group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-0 w-full" ,
146146 className
147147 ) }
148148 ref = { ref }
Original file line number Diff line number Diff line change @@ -139,17 +139,21 @@ function RequireAuth({ children }: { children: React.ReactNode }) {
139139 const showGlobalSidebar = isGlobalShellPath ( location . pathname ) ;
140140
141141 return (
142- < div className = "flex min-h-screen flex-col" >
143- < TopBar
144- packages = { packages }
145- selectedPackage = { selectedPackage }
146- onSelectPackage = { handleSelectPackage }
147- />
148- < div className = "flex flex-1 min-h-0" >
149- { showGlobalSidebar && < GlobalSidebar /> }
150- { children }
142+ < SidebarProvider >
143+ < div className = "flex min-h-screen w-full flex-col" >
144+ < TopBar
145+ packages = { packages }
146+ selectedPackage = { selectedPackage }
147+ onSelectPackage = { handleSelectPackage }
148+ />
149+ < div className = "flex flex-1 w-full overflow-hidden" >
150+ { showGlobalSidebar && < GlobalSidebar /> }
151+ < main className = "flex flex-1 min-w-0 overflow-hidden" >
152+ { children }
153+ </ main >
154+ </ div >
151155 </ div >
152- </ div >
156+ </ SidebarProvider >
153157 ) ;
154158 }
155159
@@ -181,15 +185,13 @@ function RootComponent() {
181185 < SessionProvider >
182186 < PluginRegistryProvider plugins = { builtInPlugins } >
183187 < ErrorBoundary >
184- < SidebarProvider >
185- < ProductionGuardProvider >
186- < RequireAuth >
187- < Outlet />
188- </ RequireAuth >
189- < Toaster />
190- < AuthedAiChatPanel />
191- </ ProductionGuardProvider >
192- </ SidebarProvider >
188+ < ProductionGuardProvider >
189+ < RequireAuth >
190+ < Outlet />
191+ </ RequireAuth >
192+ < Toaster />
193+ < AuthedAiChatPanel />
194+ </ ProductionGuardProvider >
193195 </ ErrorBoundary >
194196 </ PluginRegistryProvider >
195197 </ SessionProvider >
You can’t perform that action at this time.
0 commit comments