improvement(console): increase console max entries for larger workflows (#1032)

* improvement(console): increase console max entries for larger workflows

* increase safety limit for infinite loops
This commit is contained in:
Waleed Latif
2025-08-19 11:24:20 -07:00
committed by Siddharth Ganesan
parent 9aa1fe8037
commit 69773c3174
4 changed files with 5 additions and 5 deletions

View File

@@ -807,7 +807,7 @@ export function useWorkflowExecution() {
// Continue execution until there are no more pending blocks
let iterationCount = 0
const maxIterations = 100 // Safety to prevent infinite loops
const maxIterations = 500 // Safety to prevent infinite loops
while (currentPendingBlocks.length > 0 && iterationCount < maxIterations) {
logger.info(

View File

@@ -225,7 +225,7 @@ export class Executor {
let hasMoreLayers = true
let iteration = 0
const maxIterations = 100 // Safety limit for infinite loops
const maxIterations = 500 // Safety limit for infinite loops
while (hasMoreLayers && iteration < maxIterations && !this.isCancelled) {
const nextLayer = this.getNextExecutionLayer(context)

View File

@@ -4,7 +4,7 @@ import { redactApiKeys } from '@/lib/utils'
import type { NormalizedBlockOutput } from '@/executor/types'
import type { ConsoleEntry, ConsoleStore } from '@/stores/panel/console/types'
const MAX_ENTRIES = 50 // MAX across all workflows
const MAX_ENTRIES = 500 // MAX across all workflows - allows for 100 loop iterations + other workflow logs
const MAX_IMAGE_DATA_SIZE = 1000 // Maximum size of image data to store (in characters)
const MAX_ANY_DATA_SIZE = 5000 // Maximum size of any data to store (in characters)
const MAX_TOTAL_ENTRY_SIZE = 50000 // Maximum size of entire entry to prevent localStorage overflow

View File

@@ -109,7 +109,7 @@ describe('workflow store', () => {
expect(state.loops.loop1.forEachItems).toEqual(['item1', 'item2', 'item3'])
})
it('should clamp loop count between 1 and 50', () => {
it('should clamp loop count between 1 and 100', () => {
const { addBlock, updateLoopCount } = useWorkflowStore.getState()
// Add a loop block
@@ -199,7 +199,7 @@ describe('workflow store', () => {
expect(parsedDistribution).toHaveLength(3)
})
it('should clamp parallel count between 1 and 50', () => {
it('should clamp parallel count between 1 and 20', () => {
const { addBlock, updateParallelCount } = useWorkflowStore.getState()
// Add a parallel block