diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/hooks/use-subflow-editor.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/hooks/use-subflow-editor.ts index 85bf82200..ac3e64e8c 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/hooks/use-subflow-editor.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/hooks/use-subflow-editor.ts @@ -26,7 +26,7 @@ const SUBFLOW_CONFIG = { }, typeKey: 'loopType' as const, storeKey: 'loops' as const, - maxIterations: 100, + maxIterations: 1000, configKeys: { iterations: 'iterations' as const, items: 'forEachItems' as const, diff --git a/apps/sim/hooks/use-collaborative-workflow.ts b/apps/sim/hooks/use-collaborative-workflow.ts index 149965ec7..6a2cfcc4d 100644 --- a/apps/sim/hooks/use-collaborative-workflow.ts +++ b/apps/sim/hooks/use-collaborative-workflow.ts @@ -1540,7 +1540,7 @@ export function useCollaborativeWorkflow() { const config = { id: nodeId, nodes: childNodes, - iterations: Math.max(1, Math.min(100, count)), // Clamp between 1-100 for loops + iterations: Math.max(1, Math.min(1000, count)), // Clamp between 1-1000 for loops loopType: currentLoopType, forEachItems: currentCollection, } diff --git a/apps/sim/stores/workflows/workflow/store.test.ts b/apps/sim/stores/workflows/workflow/store.test.ts index 21c13539c..36ae55643 100644 --- a/apps/sim/stores/workflows/workflow/store.test.ts +++ b/apps/sim/stores/workflows/workflow/store.test.ts @@ -109,7 +109,7 @@ describe('workflow store', () => { expect(state.loops.loop1.forEachItems).toEqual(['item1', 'item2', 'item3']) }) - it('should clamp loop count between 1 and 100', () => { + it('should clamp loop count between 1 and 1000', () => { const { addBlock, updateLoopCount } = useWorkflowStore.getState() // Add a loop block @@ -126,9 +126,9 @@ describe('workflow store', () => { ) // Try to set count above max - updateLoopCount('loop1', 150) + updateLoopCount('loop1', 1500) let state = useWorkflowStore.getState() - expect(state.blocks.loop1?.data?.count).toBe(100) + expect(state.blocks.loop1?.data?.count).toBe(1000) // Try to set count below min updateLoopCount('loop1', 0) diff --git a/apps/sim/stores/workflows/workflow/store.ts b/apps/sim/stores/workflows/workflow/store.ts index 8b3bd73df..5adcd6dd7 100644 --- a/apps/sim/stores/workflows/workflow/store.ts +++ b/apps/sim/stores/workflows/workflow/store.ts @@ -850,7 +850,7 @@ export const useWorkflowStore = create()( ...block, data: { ...block.data, - count: Math.max(1, Math.min(100, count)), // Clamp between 1-100 + count: Math.max(1, Math.min(1000, count)), // Clamp between 1-1000 }, }, }