Uh oh!
There was an error while loading. Please reload this page.
improvement(chat): increase max files to 15 and resolve workflow variables in webhook execution - #1764
Conversation
…ables in webhook execution
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
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.tsto 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 (Executor → InputResolver), 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
4 files reviewed, no comments
Uh oh!
There was an error while loading. Please reload this page.
…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
Summary
Type of Change
Testing
Tested with @aadamgough
Checklist