diff --git a/apps/sim/app/_styles/globals.css b/apps/sim/app/_styles/globals.css index 1ece0a9660..be0629e5e3 100644 --- a/apps/sim/app/_styles/globals.css +++ b/apps/sim/app/_styles/globals.css @@ -5,13 +5,16 @@ /** * CSS-based sidebar and panel widths to prevent SSR hydration mismatches. * Default widths are set here and updated via blocking script before React hydrates. + * + * @important These values must stay in sync with stores/constants.ts + * @see stores/constants.ts for the source of truth */ :root { - --sidebar-width: 232px; - --panel-width: 260px; - --toolbar-triggers-height: 300px; - --editor-connections-height: 200px; - --terminal-height: 155px; + --sidebar-width: 232px; /* SIDEBAR_WIDTH.DEFAULT */ + --panel-width: 290px; /* PANEL_WIDTH.DEFAULT */ + --toolbar-triggers-height: 300px; /* TOOLBAR_TRIGGERS_HEIGHT.DEFAULT */ + --editor-connections-height: 172px; /* EDITOR_CONNECTIONS_HEIGHT.DEFAULT */ + --terminal-height: 155px; /* TERMINAL_HEIGHT.DEFAULT */ } .sidebar-container { diff --git a/apps/sim/app/layout.tsx b/apps/sim/app/layout.tsx index da80a06d21..6be1e579c5 100644 --- a/apps/sim/app/layout.tsx +++ b/apps/sim/app/layout.tsx @@ -41,7 +41,12 @@ export default function RootLayout({ children }: { children: React.ReactNode }) }} /> - {/* Workspace layout dimensions: set CSS vars before hydration to avoid layout jump */} + {/* + Workspace layout dimensions: set CSS vars before hydration to avoid layout jump. + + IMPORTANT: These hardcoded values must stay in sync with stores/constants.ts + We cannot use imports here since this is a blocking script that runs before React. + */}