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 @@ -1837,7 +1837,7 @@ const WorkflowContent = React.memo(() => {
}, [collaborativeSetSubblockValue])

// Show skeleton UI while loading until the workflow store is hydrated
const showSkeletonUI = !isWorkflowReady || typeof lastSaved !== 'number'
const showSkeletonUI = !isWorkflowReady

if (showSkeletonUI) {
return (
Expand Down Expand Up @@ -1942,10 +1942,9 @@ const WorkflowContent = React.memo(() => {
/>

{/* Trigger list for empty workflows - only show after workflow has loaded and hydrated */}
{isWorkflowReady &&
typeof lastSaved === 'number' &&
isWorkflowEmpty &&
effectivePermissions.canEdit && <TriggerList onSelect={handleTriggerSelect} />}
{isWorkflowReady && isWorkflowEmpty && effectivePermissions.canEdit && (
<TriggerList onSelect={handleTriggerSelect} />
)}
</div>
</div>
)
Expand Down
38 changes: 0 additions & 38 deletions apps/sim/lib/copilot/tools/server/workflow/build-workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,44 +96,6 @@ export const buildWorkflowServerTool: BaseServerTool<
// Use sanitized state if available
const finalWorkflowState = validation.sanitizedState || workflowState

// Apply positions using smart layout
const positionResponse = await fetch(`${SIM_AGENT_API_URL}/api/yaml/apply-layout`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
workflowState: finalWorkflowState,
options: {
strategy: 'smart',
direction: 'auto',
spacing: {
horizontal: 500,
vertical: 400,
layer: 700,
},
alignment: 'center',
padding: {
x: 250,
y: 250,
},
},
}),
})

if (!positionResponse.ok) {
const errorText = await positionResponse.text().catch(() => '')
logger.warn('Failed to apply layout to workflow', {
status: positionResponse.status,
error: errorText,
})
// Non-critical error - continue with unpositioned workflow
} else {
const layoutResult = await positionResponse.json()
if (layoutResult.success && layoutResult.workflowState) {
// Update the workflow state with positioned blocks
Object.assign(finalWorkflowState, layoutResult.workflowState)
}
}

return {
success: true,
workflowState: finalWorkflowState,
Expand Down