Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

increase console max entries for larger workflows, this was causing a loop with 100 iterations to prematurely stop at 50 since that was the max entries for the console, bad UX

Type of Change

  • Bug fix

Testing

Tested manually.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

Screenshot 2025-08-19 at 11 20 38 AM

@vercel
Copy link

vercel bot commented Aug 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sim Ready Ready Preview Comment Aug 19, 2025 6:29pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Aug 19, 2025 6:29pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR fixes a UX issue where large workflow loops were being prematurely truncated due to console capacity limitations. The primary change increases the MAX_ENTRIES constant in the console store from 50 to 500 entries, allowing workflows with up to 100 loop iterations plus additional logging to display properly in the console.

The console store (apps/sim/stores/panel/console/store.ts) manages all console entries across workflows using a global limit. When workflows executed loops with more than 50 iterations, the console would stop displaying new entries once the limit was reached, creating confusion for users monitoring their workflow execution. The new limit of 500 entries provides sufficient capacity for the maximum supported loop size (100 iterations) while maintaining reasonable memory constraints.

Corresponding test updates in apps/sim/stores/workflows/workflow/store.test.ts reflect the increased loop iteration limit from 50 to 100, confirming that the workflow engine now supports larger loops. The tests also update parallel execution limits from 50 to 20, which appears to be a separate optimization for resource management rather than console-related.

The change integrates well with the existing codebase architecture, maintaining the same entry management logic, persistence behavior, and API key redaction functionality while simply expanding capacity. The console store continues to use the same middleware for development tools and local storage persistence.

Confidence score: 4/5

  • This PR is safe to merge with minimal risk of production issues
  • Score reflects a straightforward constant change with clear business justification and supporting test updates
  • Pay close attention to the parallel count reduction in tests to ensure it aligns with intended resource management goals

2 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

@vercel vercel bot temporarily deployed to Preview – docs August 19, 2025 18:24 Inactive
@waleedlatif1 waleedlatif1 merged commit e46045d into staging Aug 19, 2025
3 of 4 checks passed
@waleedlatif1 waleedlatif1 deleted the improvement/loops branch August 19, 2025 18:24
Sg312 pushed a commit that referenced this pull request Aug 20, 2025
…ws (#1032)

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

* increase safety limit for infinite loops
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
…ws (simstudioai#1032)

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

* increase safety limit for infinite loops
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant