Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -736,18 +736,20 @@ export function ControlBar({ hasValidationErrors = false }: ControlBarProps) {

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

const result = await applyLocalAutoLayoutAndUpdateStore(activeWorkflowId!)
const result = await applyAutoLayoutAndUpdateStore(activeWorkflowId!)

if (result.success) {
logger.info('Auto layout completed successfully')
} else {
logger.error('Auto layout failed:', result.error)
// You could add a toast notification here if available
}
} catch (error) {
logger.error('Auto layout error:', error)
// You could add a toast notification here if available
} finally {
setIsAutoLayouting(false)
}
Expand Down
Loading