-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat(manual-trigger): add manual trigger #1452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Summary
This PR introduces a new Manual Trigger block to provide a simplified workflow execution option. The implementation separates concerns between simple manual execution (Manual Trigger) and structured input workflows (Input Form Trigger).
Key Changes:
- New Manual Trigger Block: Simple trigger with no input schema, using Play icon
- Input Form Trigger Clarification: Renamed from "Input Form" and changed to FormInput icon for distinction
- Enhanced Execution Logic: Updated workflow execution to prefer
manual_triggeroverinput_triggerfor simple runs - Trigger Utilities: Extended trigger classification system to handle the new manual trigger type
- Documentation Updates: Clarified references to "Input Form Trigger" vs generic "Input Trigger"
Implementation Quality:
- Clean separation of concerns between different trigger types
- Proper integration with existing trigger infrastructure
- Maintains backward compatibility with legacy starter blocks
- Follows established patterns for block configuration
Confidence Score: 4/5
- This PR is safe to merge with minor syntax fix needed
- Score reflects a well-implemented feature with proper separation of concerns, good integration with existing systems, and only one minor issue with an error message that should be updated to reflect the new trigger types
- The use-workflow-execution.ts file needs attention for the error message update on line 790
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| apps/sim/blocks/blocks/manual_trigger.ts | 5/5 | New manual trigger block with minimal configuration, no inputs/outputs, clean implementation |
| apps/sim/lib/workflows/triggers.ts | 5/5 | Added MANUAL trigger type and updated trigger utilities to handle manual vs input form distinction |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution.ts | 4/5 | Enhanced manual execution logic to prefer manual_trigger over input_trigger, includes input extraction from test values |
Sequence Diagram
sequenceDiagram
participant User as User
participant Editor as Workflow Editor
participant Hook as useWorkflowExecution
participant Engine as Workflow Engine
participant Block as Manual Trigger Block
User->>Editor: Click Run/Execute button
Editor->>Hook: executeWorkflow()
Hook->>Hook: Find manual triggers
alt Manual Trigger found
Hook->>Hook: Set selectedTrigger = manual_trigger
Hook->>Hook: selectedBlockId = manual trigger ID
Note right of Hook: No input extraction needed for manual trigger
else Input Form Trigger found
Hook->>Hook: Set selectedTrigger = input_trigger
Hook->>Hook: Extract test values from inputFormat
Hook->>Hook: Set finalWorkflowInput = test values
else Legacy Starter found
Hook->>Hook: Set selectedTrigger = starter block
Note right of Hook: Fallback for legacy workflows
end
Hook->>Engine: Execute workflow with selectedTrigger
Engine->>Block: Start execution from trigger block
Block->>Engine: Return success/result
Engine->>Hook: Execution complete
Hook->>Editor: Update execution state
Editor->>User: Show execution results
6 files reviewed, 1 comment
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution.ts
Show resolved
Hide resolved
… routing (#1444) * improvement(parallel): update parallel subblock to support conditional routing * ignore disconnected blocks in parallel/loop * added utils * fix z-index issues with edges in subflow * fixed aggregation of results from loop & parallel blocks * feat(manual-trigger): add manual trigger (#1452) * feat(manual-trigger): add manual trigger * consolidate input format extraction * exclude triggers from console logs + deployed chat error surfacing * works * centralize error messages + logging for deployed chat * fix(css-config): use correct version (#1453) * fix(css-config): use correct version * fix lint * improvement(parallel): update parallel subblock to support conditional routing * ignore disconnected blocks in parallel/loop * added utils * fix z-index issues with edges in subflow * fixed aggregation of results from loop & parallel blocks * change z index within component and remvoe global css * fix cascade deletion subflows sockets case * improve results array for subflows * fix onedgeclick inside subflows * fix test --------- Co-authored-by: waleed <waleed> Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai> Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Summary
Manual Trigger to trigger workflows.
Type of Change
Testing
Manually executing workflows with this as the start block.
Checklist