Skip to content

Commit 923c052

Browse files
authored
fix(auto-layout): revert (#1148)
1 parent 3424a33 commit 923c052

File tree

2 files changed

+5
-618
lines changed

2 files changed

+5
-618
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/control-bar/control-bar.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,18 +736,20 @@ export function ControlBar({ hasValidationErrors = false }: ControlBarProps) {
736736

737737
setIsAutoLayouting(true)
738738
try {
739-
// Use the LOCAL auto layout implementation for immediate frontend updates
740-
const { applyLocalAutoLayoutAndUpdateStore } = await import('../../utils/local-auto-layout')
739+
// Use the shared auto layout utility for immediate frontend updates
740+
const { applyAutoLayoutAndUpdateStore } = await import('../../utils/auto-layout')
741741

742-
const result = await applyLocalAutoLayoutAndUpdateStore(activeWorkflowId!)
742+
const result = await applyAutoLayoutAndUpdateStore(activeWorkflowId!)
743743

744744
if (result.success) {
745745
logger.info('Auto layout completed successfully')
746746
} else {
747747
logger.error('Auto layout failed:', result.error)
748+
// You could add a toast notification here if available
748749
}
749750
} catch (error) {
750751
logger.error('Auto layout error:', error)
752+
// You could add a toast notification here if available
751753
} finally {
752754
setIsAutoLayouting(false)
753755
}

0 commit comments

Comments
 (0)