Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

waleedlatif1 and others added 7 commits August 19, 2025 21:21
…ws (#1032)

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

* increase safety limit for infinite loops
…operations (#1035)

* improvement(supabase): added more verbose error logging for supabase operations

* updated docs
…nd other subblocks + gdrive fixes (#1029)

* fix(oauth-block): race condition for rendering credential selectors and other subblocks

* fix import

* add dependsOn field to track cros-subblock deps

* remove redundant check

* remove redundant checks

* remove misleading comment

* fix

* fix jira

* fix

* fix

* confluence

* fix triggers

* fix

* fix

* make trigger creds collab supported

* fix for backwards compat

* fix trigger modal
…ll behavior in workflow registry sidebar (#1037)

* added sub-workflow logs

* indent input/output in trace spans display

* better color scheme for workflow logs

* scroll behavior in sidebar updated

* cleanup

* fixed failing tests
@vercel
Copy link

vercel bot commented Aug 20, 2025

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

Project Deployment Preview Comments Updated (UTC)
sim (staging) Ready Ready Comment Aug 20, 2025 7:34am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Aug 20, 2025 7:34am

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 release (v0.3.32) introduces substantial improvements to workflow scalability, API flexibility, and user experience across multiple areas of the Sim platform. The changes address critical performance bottlenecks and enhance the collaborative workflow editing experience.

The most significant scalability improvement increases console entry limits from 50 to 500, with corresponding iteration limits raised from 100 to 500 across the execution engine and workflow hooks. This prevents premature termination of complex workflows, particularly those with 100+ loop iterations that were previously cut off at 50 entries.

A major API enhancement adds native URL-encoded form data support to the HTTP request tool. The system now automatically converts JSON objects to properly formatted URL-encoded strings when users set Content-Type: application/x-www-form-urlencoded, eliminating manual encoding requirements for OAuth flows and form submissions.

The Supabase integration receives comprehensive improvements including a new upsert operation (insert-or-update on primary key conflicts), enhanced error handling with detailed JSON parsing feedback, and standardized response formats across all tools. Error messages now provide specific guidance for common issues like schema mismatches and empty results.

A sophisticated dependency management system addresses race conditions in OAuth blocks through a new dependsOn field in sub-block configurations. This declarative approach ensures credential-dependent fields (like file selectors, folder pickers) remain disabled until authentication is complete, with automatic clearing of dependent values when parent fields change. The system includes cycle detection and graceful fallback handling.

Google Drive integration gains shared drives support through supportsAllDrives=true parameters across all operations (upload, create_folder, list, file browsing), enabling seamless interaction with organizational Team Drives alongside personal drives.

Sub-workflow observability introduces comprehensive logging for nested workflow executions. Child workflow logs are captured, transformed into trace spans, and integrated into parent workflow execution logs with proper hierarchical display and metadata context.

Collaborative editing improvements include refined scroll behavior in the workflow registry sidebar, using time-based heuristics to distinguish between new workflow creation (scroll to top) and existing workflow navigation (minimal scrolling). OAuth credential handling transitions from workflow-owner-based to credential-specific approaches in Gmail and Outlook polling services, improving security and supporting multi-user scenarios.

Confidence score: 4/5

  • This PR contains complex architectural changes that improve core functionality but introduce potential integration risks
  • Score reflects the comprehensive nature of changes across multiple subsystems including execution engine, OAuth handling, and database operations
  • Pay close attention to the dependency management system implementation and sub-workflow logging integration as they touch critical workflow execution paths

67 files reviewed, 15 comments

Edit Code Review Bot Settings | Greptile

Comment on lines +67 to +73
let hasCredentialChanged = false
const [isDeleting, setIsDeleting] = useState(false)
const [webhookUrl, setWebhookUrl] = useState('')
const [generatedPath, setGeneratedPath] = useState('')
const [hasCredentials, setHasCredentials] = useState(false)
const [selectedCredentialId, setSelectedCredentialId] = useState<string | null>(null)
hasCredentialChanged = selectedCredentialId !== initialCredentialRef.current
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Variable declared before selectedCredentialId is defined, creating a temporal dead zone issue. Move this assignment after line 72.

Suggested change
let hasCredentialChanged = false
const [isDeleting, setIsDeleting] = useState(false)
const [webhookUrl, setWebhookUrl] = useState('')
const [generatedPath, setGeneratedPath] = useState('')
const [hasCredentials, setHasCredentials] = useState(false)
const [selectedCredentialId, setSelectedCredentialId] = useState<string | null>(null)
hasCredentialChanged = selectedCredentialId !== initialCredentialRef.current
const [isDeleting, setIsDeleting] = useState(false)
const [webhookUrl, setWebhookUrl] = useState('')
const [generatedPath, setGeneratedPath] = useState('')
const [hasCredentials, setHasCredentials] = useState(false)
const [selectedCredentialId, setSelectedCredentialId] = useState<string | null>(null)
// Track if credential has changed from initial snapshot
const hasCredentialChanged = selectedCredentialId !== initialCredentialRef.current

})
return NextResponse.json({ error: 'Unauthorized' }, { status: 403 })
// Authorize use of the credential (supports collaborator credentials via workflow)
const authz = await authorizeCredentialUse(request, { credentialId: credentialId!, workflowId })
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Redundant non-null assertion since credentialId is already checked for truthiness above

Suggested change
const authz = await authorizeCredentialUse(request, { credentialId: credentialId!, workflowId })
const authz = await authorizeCredentialUse(request, { credentialId, workflowId })

url: 'https://api.example.com/oauth/token',
method: 'POST',
body,
headers: [{ cells: { Key: 'Content-Type', Value: 'application/x-www-form-urlencoded' } }],
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Headers structure looks inconsistent - using cells property here but not in other tests. Should use consistent structure for maintainability.

Comment on lines +852 to +854
const dependents = blockConfig.subBlocks.filter(
(sb: any) => Array.isArray(sb.dependsOn) && sb.dependsOn.includes(subblockId)
)
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Uses any type assertion for subblock filtering. Consider adding proper typing for better type safety.

Context Used: Context - Avoid using type assertions to 'any' in TypeScript. Instead, ensure proper type definitions are used to maintain type safety. (link)

// Skip clearing if the dependent is the same field
if (!dep?.id || dep.id === subblockId) continue
// Cascade using the same collaborative path so it emits and further cascades
collaborativeSetSubblockValue(blockId, dep.id, '', { _visited: visited })
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Recursive call with empty string value may not be appropriate for all field types. Consider using null or undefined for better semantic clearing.

requiredScopes={subBlock.requiredScopes || []}
serviceId={subBlock.serviceId}
label={subBlock.placeholder || 'Select SharePoint site'}
disabled={disabled || !credential}
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Inconsistent disabled prop - uses disabled || !credential instead of finalDisabled like other selectors

requiredScopes={subBlock.requiredScopes || []}
serviceId='microsoft-planner'
label={subBlock.placeholder || 'Select task'}
disabled={disabled || !credential || !planId}
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Inconsistent disabled prop - uses disabled || !credential || !planId instead of finalDisabled

requiredScopes={subBlock.requiredScopes || []}
serviceId={subBlock.serviceId}
label={subBlock.placeholder || 'Select Teams message location'}
disabled={disabled || !credential}
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Inconsistent disabled prop - uses disabled || !credential instead of finalDisabled

@waleedlatif1 waleedlatif1 merged commit 6b185be into main Aug 20, 2025
8 checks passed
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.

2 participants