11import { useAtomValue } from "@effect/atom-react" ;
22import * as Schema from "effect/Schema" ;
33import {
4- lazy ,
5- Suspense ,
64 useEffect ,
75 useState ,
86 useSyncExternalStore ,
@@ -20,6 +18,7 @@ import { useEnvironmentIdentificationMode, useLegacySidebarEnabled } from "../ho
2018import { usePanelAnimationSettings } from "../panelAnimations" ;
2119import LegacyThreadSidebar from "./LegacySidebar" ;
2220import ThreadSidebar from "./Sidebar" ;
21+ import { SettingsSidebarNav } from "./settings/SettingsSidebarNav" ;
2322import { SidebarChromeHeader } from "./sidebar/SidebarChrome" ;
2423import {
2524 resolveSidebarStageFocusRingOffsetClass ,
@@ -45,14 +44,6 @@ import { Tooltip, TooltipPopup, TooltipTrigger } from "./ui/tooltip";
4544
4645const MACOS_TRAFFIC_LIGHTS_LEFT_INSET = "90px" ;
4746
48- // The settings nav (and the Clerk profile surfaces behind it) only renders on
49- // settings routes; lazy-loading it keeps that subtree out of the startup chunk.
50- const SettingsSidebarNav = lazy ( ( ) =>
51- import ( "./settings/SettingsSidebarNav" ) . then ( ( module ) => ( {
52- default : module . SettingsSidebarNav ,
53- } ) ) ,
54- ) ;
55-
5647function subscribeToViewportWidth ( onChange : ( ) => void ) : ( ) => void {
5748 window . addEventListener ( "resize" , onChange ) ;
5849 return ( ) => window . removeEventListener ( "resize" , onChange ) ;
@@ -247,9 +238,7 @@ export function AppSidebarLayout({ children }: { children: ReactNode }) {
247238 { isOnSettings ? (
248239 < >
249240 < SidebarChromeHeader isElectron = { isElectron } />
250- < Suspense fallback = { null } >
251- < SettingsSidebarNav pathname = { pathname } />
252- </ Suspense >
241+ < SettingsSidebarNav pathname = { pathname } />
253242 </ >
254243 ) : legacySidebarEnabled ? (
255244 < LegacyThreadSidebar />
0 commit comments