Skip to content

Conversation

@icecrasher321
Copy link
Collaborator

Summary

Manual Trigger to trigger workflows.

Type of Change

  • Bug fix

Testing

Manually executing workflows with this as the start block.

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 Sep 25, 2025

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

Project Deployment Preview Comments Updated (UTC)
sim Ready Ready Preview Comment Sep 25, 2025 11:28pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Sep 25, 2025 11:28pm

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

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_trigger over input_trigger for 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
Loading

6 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@vercel vercel bot temporarily deployed to Preview – docs September 25, 2025 23:25 Inactive
@icecrasher321 icecrasher321 merged commit e03c036 into staging Sep 25, 2025
11 checks passed
icecrasher321 added a commit that referenced this pull request Sep 26, 2025
… 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>
@waleedlatif1 waleedlatif1 deleted the feat/add-manual-trigger branch October 13, 2025 17:39
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