Skip to content

Commit 2ca9044

Browse files
authored
fix(layout): layout canvas onInit after node sizes are calculated, remove legacy history code and legacy marking of dirty workflows (#1645)
1 parent b2009fe commit 2ca9044

File tree

10 files changed

+23
-602
lines changed

10 files changed

+23
-602
lines changed

apps/sim/app/(landing)/components/structured-data.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function StructuredData() {
3838
url: 'https://sim.ai',
3939
name: 'Sim - AI Agent Workflow Builder',
4040
description:
41-
'Open-source AI agent workflow builder. 30,000+ developers build and deploy agentic workflows. SOC2 and HIPAA compliant.',
41+
'Open-source AI agent workflow builder. 50,000+ developers build and deploy agentic workflows. SOC2 and HIPAA compliant.',
4242
publisher: {
4343
'@id': 'https://sim.ai/#organization',
4444
},
@@ -98,7 +98,7 @@ export default function StructuredData() {
9898
'@id': 'https://sim.ai/#software',
9999
name: 'Sim - AI Agent Workflow Builder',
100100
description:
101-
'Open-source AI agent workflow builder used by 30,000+ developers. Build agentic workflows with visual drag-and-drop interface. SOC2 and HIPAA compliant. Integrate with 100+ apps.',
101+
'Open-source AI agent workflow builder used by 50,000+ developers. Build agentic workflows with visual drag-and-drop interface. SOC2 and HIPAA compliant. Integrate with 100+ apps.',
102102
applicationCategory: 'DeveloperApplication',
103103
applicationSubCategory: 'AI Development Tools',
104104
operatingSystem: 'Web, Windows, macOS, Linux',
@@ -173,7 +173,7 @@ export default function StructuredData() {
173173
'Visual workflow builder',
174174
'Drag-and-drop interface',
175175
'100+ integrations',
176-
'AI model support (OpenAI, Anthropic, Google)',
176+
'AI model support (OpenAI, Anthropic, Google, xAI, Mistral, Perplexity)',
177177
'Real-time collaboration',
178178
'Version control',
179179
'API access',
@@ -198,15 +198,15 @@ export default function StructuredData() {
198198
name: 'What is Sim?',
199199
acceptedAnswer: {
200200
'@type': 'Answer',
201-
text: 'Sim is an open-source AI agent workflow builder used by 30,000+ developers at trail-blazing startups to Fortune 500 companies. It provides a visual drag-and-drop interface for building and deploying agentic workflows. Sim is SOC2 and HIPAA compliant.',
201+
text: 'Sim is an open-source AI agent workflow builder used by 50,000+ developers at trail-blazing startups to Fortune 500 companies. It provides a visual drag-and-drop interface for building and deploying agentic workflows. Sim is SOC2 and HIPAA compliant.',
202202
},
203203
},
204204
{
205205
'@type': 'Question',
206206
name: 'Which AI models does Sim support?',
207207
acceptedAnswer: {
208208
'@type': 'Answer',
209-
text: 'Sim supports all major AI models including OpenAI (GPT-4, GPT-3.5), Anthropic (Claude), Google (Gemini), Mistral, Perplexity, and many more. You can also connect to open-source models via Ollama.',
209+
text: 'Sim supports all major AI models including OpenAI (GPT-5, GPT-4o), Anthropic (Claude), Google (Gemini), xAI (Grok), Mistral, Perplexity, and many more. You can also connect to open-source models via Ollama.',
210210
},
211211
},
212212
{

apps/sim/app/manifest.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export default function manifest(): MetadataRoute.Manifest {
3838
short_name: 'New',
3939
description: 'Create a new AI workflow',
4040
url: '/workspace',
41-
icons: [{ src: '/icons/new-workflow.png', sizes: '192x192' }],
4241
},
4342
],
4443
lang: 'en-US',

apps/sim/app/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Landing from '@/app/(landing)/landing'
44
export const metadata: Metadata = {
55
title: 'Sim - AI Agent Workflow Builder | Open Source Platform',
66
description:
7-
'Open-source AI agent workflow builder used by 30,000+ developers. Build and deploy agentic workflows with visual drag-and-drop interface. Connect 100+ apps. SOC2 and HIPAA compliant. Used by startups to Fortune 500 companies.',
7+
'Open-source AI agent workflow builder used by 50,000+ developers. Build and deploy agentic workflows with visual drag-and-drop interface. Connect 100+ apps. SOC2 and HIPAA compliant. Used by startups to Fortune 500 companies.',
88
keywords:
99
'AI agent workflow builder, agentic workflows, open source AI, visual workflow builder, AI automation, LLM workflows, AI agents, workflow automation, no-code AI, SOC2 compliant, HIPAA compliant, enterprise AI',
1010
authors: [{ name: 'Sim Studio' }],
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
1818
openGraph: {
1919
title: 'Sim - AI Agent Workflow Builder | Open Source',
2020
description:
21-
'Open-source platform used by 30,000+ developers. Build and deploy agentic workflows with drag-and-drop interface. SOC2 & HIPAA compliant. Connect 100+ apps.',
21+
'Open-source platform used by 50,000+ developers. Build and deploy agentic workflows with drag-and-drop interface. SOC2 & HIPAA compliant. Connect 100+ apps.',
2222
type: 'website',
2323
url: 'https://sim.ai',
2424
siteName: 'Sim',
@@ -45,7 +45,7 @@ export const metadata: Metadata = {
4545
creator: '@simdotai',
4646
title: 'Sim - AI Agent Workflow Builder | Open Source',
4747
description:
48-
'Open-source platform for agentic workflows. 30,000+ developers. Visual builder. 100+ integrations. SOC2 & HIPAA compliant.',
48+
'Open-source platform for agentic workflows. 50,000+ developers. Visual builder. 100+ integrations. SOC2 & HIPAA compliant.',
4949
images: {
5050
url: '/social/twitter-image.png',
5151
alt: 'Sim - Visual AI Workflow Builder',

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ export function ControlBar({ hasValidationErrors = false }: ControlBarProps) {
8686
const workspaceId = params.workspaceId as string
8787

8888
// Store hooks
89-
const { history, revertToHistoryState, lastSaved, setNeedsRedeploymentFlag, blocks } =
90-
useWorkflowStore()
89+
const { lastSaved, setNeedsRedeploymentFlag, blocks } = useWorkflowStore()
9190
const {
9291
workflows,
9392
updateWorkflow,

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ const WorkflowContent = React.memo(() => {
9292
const [draggedNodeId, setDraggedNodeId] = useState<string | null>(null)
9393
const [potentialParentId, setPotentialParentId] = useState<string | null>(null)
9494
// State for tracking validation errors
95-
const [nestedSubflowErrors, setNestedSubflowErrors] = useState<Set<string>>(new Set())
95+
// Use a function initializer to ensure the Set is only created once
96+
const [nestedSubflowErrors, setNestedSubflowErrors] = useState<Set<string>>(() => new Set())
9697
// Enhanced edge selection with parent context and unique identifier
9798
const [selectedEdgeInfo, setSelectedEdgeInfo] = useState<SelectedEdgeInfo | null>(null)
9899

@@ -1292,8 +1293,6 @@ const WorkflowContent = React.memo(() => {
12921293
// Include dynamic dimensions for container resizing calculations
12931294
width: block.isWide ? 450 : 350, // Standard width based on isWide state
12941295
height: Math.max(block.height || 100, 100), // Use actual height with minimum
1295-
// Explicitly set measured to prevent ReactFlow from recalculating
1296-
measured: { width: block.isWide ? 450 : 350, height: Math.max(block.height || 100, 100) },
12971296
})
12981297
})
12991298

@@ -1967,7 +1966,13 @@ const WorkflowContent = React.memo(() => {
19671966
edgeTypes={edgeTypes}
19681967
onDrop={effectivePermissions.canEdit ? onDrop : undefined}
19691968
onDragOver={effectivePermissions.canEdit ? onDragOver : undefined}
1970-
fitView
1969+
onInit={(instance) => {
1970+
requestAnimationFrame(() => {
1971+
requestAnimationFrame(() => {
1972+
instance.fitView({ padding: 0.3 })
1973+
})
1974+
})
1975+
}}
19711976
minZoom={0.1}
19721977
maxZoom={1.3}
19731978
panOnScroll

apps/sim/stores/workflows/middleware.ts

Lines changed: 0 additions & 265 deletions
This file was deleted.

0 commit comments

Comments
 (0)