Skip to content

Commit d149313

Browse files
committed
fix(sidebar): pass isCollapsed to Sidebar in the error fallback
The error UI renders Sidebar outside WorkspaceChrome, so it has no derived collapse state; feed it the same source of truth via readCollapsedCookie() now that isCollapsed is a required prop.
1 parent 0834afe commit d149313

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/error

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/error/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { Button } from '@/components/emcn'
88
import { Panel } from '@/app/workspace/[workspaceId]/w/[workflowId]/components'
99
import { usePreventZoom } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks'
1010
import { Sidebar } from '@/app/workspace/[workspaceId]/w/components/sidebar/sidebar'
11+
import { readCollapsedCookie } from '@/stores/sidebar/store'
1112

1213
const logger = createLogger('ErrorBoundary')
1314

@@ -48,7 +49,7 @@ export function ErrorUI({
4849

4950
return (
5051
<div ref={preventZoomRef} className='flex h-screen w-full flex-col bg-[var(--surface-1)]'>
51-
<Sidebar />
52+
<Sidebar isCollapsed={readCollapsedCookie()} />
5253

5354
<div className='relative flex flex-1'>
5455
<div className='pointer-events-none absolute inset-0 flex items-center justify-center'>

0 commit comments

Comments
 (0)