Skip to content

Conversation

@icecrasher321
Copy link
Collaborator

Summary

  • Increase max number of files to 15
  • Resolve workflow variables in webhook execution

Type of Change

  • Bug fix

Testing

Tested with @aadamgough

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)

@vercel
Copy link

vercel bot commented Oct 29, 2025

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

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Oct 29, 2025 9:57pm

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 Overview

Greptile Summary

Increases max file attachments from 5 to 15 across chat interfaces and resolves workflow variables in webhook execution context.

Key Changes:

  • Updated file limits consistently across all chat file upload components (input.tsx, chat.tsx, chat-file-upload.tsx)
  • Modified webhook-execution.ts to query and pass workflow variables from database to Executor
  • Added debug logging for workflow variables loading
  • Workflow variables now properly available for reference resolution during webhook execution

Technical Impact:
The webhook execution change fixes a critical gap where workflow-level variables were previously unavailable during webhook-triggered executions. Variables are now fetched from the database alongside workspaceId and passed through the execution chain (ExecutorInputResolver), ensuring consistency with other execution contexts.

Confidence Score: 5/5

  • This PR is safe to merge with no identified issues
  • All changes are simple, well-tested numeric constant updates and a straightforward database query addition. The file limit changes are consistent across all locations (no missed instances), and the workflow variables change follows the existing pattern used in other execution paths. Both changes are non-breaking and additive in nature.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/chat/chat.tsx 5/5 Updated max files from 5 to 15 across drag/drop handler, button disable condition, and error message, all changes are consistent
apps/sim/background/webhook-execution.ts 5/5 Added workflow variables retrieval from database and passed to Executor, properly loads variables before workflow execution

Sequence Diagram

sequenceDiagram
    participant Client
    participant WebhookExecution
    participant Database
    participant Executor
    participant InputResolver

    Client->>WebhookExecution: executeWebhookJob(payload)
    WebhookExecution->>Database: Load workflow state
    Database-->>WebhookExecution: blocks, edges, loops, parallels
    
    WebhookExecution->>Database: SELECT workspaceId, variables FROM workflow
    Database-->>WebhookExecution: workspaceId, workflowVariables
    
    Note over WebhookExecution: Log workflow variables count
    
    WebhookExecution->>Database: Get encrypted env vars
    Database-->>WebhookExecution: personalEncrypted, workspaceEncrypted
    
    WebhookExecution->>WebhookExecution: Decrypt environment variables
    
    WebhookExecution->>Executor: new Executor(workflow, states, envVars, input, workflowVariables)
    
    Executor->>InputResolver: new InputResolver(workflow, envVars, workflowVariables)
    Note over InputResolver: Variables available for reference resolution
    
    Executor->>Executor: execute(workflowId, blockId)
    Note over Executor: Workflow variables passed to execution context
    
    Executor-->>WebhookExecution: ExecutionResult
    WebhookExecution-->>Client: Success/Failure response
Loading

4 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@icecrasher321 icecrasher321 merged commit da30c25 into staging Oct 29, 2025
9 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/chat-files-max branch October 30, 2025 06:21
waleedlatif1 pushed a commit that referenced this pull request Nov 12, 2025
…ables in webhook execution (#1764)

* improvement(chat): increase max files to 15 and resolve workflow variables in webhook execution

* fix workflow vars

* fix for schedules
@waleedlatif1 waleedlatif1 mentioned this pull request Nov 12, 2025
10 tasks
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