From 229d152271056c05e21cdbe1bb39822d7fd33de7 Mon Sep 17 00:00:00 2001 From: Theodore Li Date: Tue, 7 Apr 2026 16:11:31 -0700 Subject: [PATCH 1/5] v0.6.29: login improvements, posthog telemetry (#4026) * feat(posthog): Add tracking on mothership abort (#4023) Co-authored-by: Theodore Li * fix(login): fix captcha headers for manual login (#4025) * fix(signup): fix turnstile key loading * fix(login): fix captcha header passing * Catch user already exists, remove login form captcha --- apps/sim/app/workspace/[workspaceId]/home/home.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/sim/app/workspace/[workspaceId]/home/home.tsx b/apps/sim/app/workspace/[workspaceId]/home/home.tsx index 1687a1973d..ec053fd6ce 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/home.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/home.tsx @@ -229,6 +229,14 @@ export function Home({ chatId }: HomeProps = {}) { void stopGeneration().catch(() => {}) }, [stopGeneration, workspaceId]) + const handleStopGeneration = useCallback(() => { + captureEvent(posthogRef.current, 'task_generation_aborted', { + workspace_id: workspaceId, + view: 'mothership', + }) + stopGeneration() + }, [stopGeneration, workspaceId]) + const handleSubmit = useCallback( (text: string, fileAttachments?: FileAttachmentForApi[], contexts?: ChatContext[]) => { const trimmed = text.trim() From 3454745a73447e08a2f62ac588238ecc06df62b6 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Tue, 14 Apr 2026 21:37:32 -0700 Subject: [PATCH 2/5] improvement(ui): rename user-facing "execution" to "run" --- apps/docs/content/docs/en/execution/api.mdx | 56 +++++++-------- .../docs/content/docs/en/execution/basics.mdx | 36 +++++----- apps/docs/content/docs/en/execution/costs.mdx | 28 ++++---- apps/docs/content/docs/en/execution/files.mdx | 8 +-- apps/docs/content/docs/en/execution/index.mdx | 46 ++++++------ .../content/docs/en/execution/logging.mdx | 40 +++++------ apps/docs/content/docs/en/triggers/index.mdx | 14 ++-- apps/docs/content/docs/en/triggers/rss.mdx | 4 +- .../content/docs/en/triggers/schedule.mdx | 6 +- apps/docs/content/docs/en/triggers/start.mdx | 10 +-- .../docs/content/docs/en/triggers/webhook.mdx | 16 ++--- .../[executionId]/cancel/route.test.ts | 70 +++++++++++++++++++ .../executions/[executionId]/cancel/route.ts | 25 +++++++ .../executions/[executionId]/stream/route.ts | 7 +- apps/sim/app/api/workflows/[id]/log/route.ts | 4 +- apps/sim/app/chat/constants.ts | 2 +- apps/sim/app/llms.txt/route.ts | 6 +- .../resource-content/resource-content.tsx | 6 +- .../[workspaceId]/home/hooks/use-chat.ts | 4 +- .../execution-snapshot/execution-snapshot.tsx | 12 ++-- .../components/log-details/log-details.tsx | 10 +-- .../log-row-context-menu.tsx | 4 +- .../components/subscription/plan-configs.ts | 4 +- .../utils/workflow-execution-utils.ts | 14 ++-- .../workflow-notification-email.tsx | 4 +- apps/sim/hooks/queries/logs.ts | 4 +- .../sim/lib/logs/execution/logging-session.ts | 8 +-- apps/sim/lib/logs/search-suggestions.ts | 30 ++++---- 28 files changed, 284 insertions(+), 194 deletions(-) diff --git a/apps/docs/content/docs/en/execution/api.mdx b/apps/docs/content/docs/en/execution/api.mdx index 61166941fb..5e8e2ea07c 100644 --- a/apps/docs/content/docs/en/execution/api.mdx +++ b/apps/docs/content/docs/en/execution/api.mdx @@ -6,7 +6,7 @@ import { Callout } from 'fumadocs-ui/components/callout' import { Tab, Tabs } from 'fumadocs-ui/components/tabs' import { Video } from '@/components/ui/video' -Sim provides a comprehensive external API for querying workflow execution logs and setting up webhooks for real-time notifications when workflows complete. +Sim provides a comprehensive external API for querying workflow run logs and setting up webhooks for real-time notifications when workflows complete. ## Authentication @@ -21,7 +21,7 @@ You can generate API keys from the Sim platform and navigate to **Settings**, th ## Logs API -All API responses include information about your workflow execution limits and usage: +All API responses include information about your workflow run limits and usage: ```json "limits": { @@ -48,11 +48,11 @@ All API responses include information about your workflow execution limits and u } ``` -**Note:** Rate limits use a token bucket algorithm. `remaining` can exceed `requestsPerMinute` up to `maxBurst` when you haven't used your full allowance recently, allowing for burst traffic. The rate limits in the response body are for workflow executions. The rate limits for calling this API endpoint are in the response headers (`X-RateLimit-*`). +**Note:** Rate limits use a token bucket algorithm. `remaining` can exceed `requestsPerMinute` up to `maxBurst` when you haven't used your full allowance recently, allowing for burst traffic. The rate limits in the response body are for workflow runs. The rate limits for calling this API endpoint are in the response headers (`X-RateLimit-*`). ### Query Logs -Query workflow execution logs with extensive filtering options. +Query workflow run logs with extensive filtering options. @@ -70,11 +70,11 @@ Query workflow execution logs with extensive filtering options. - `level` - Filter by level: `info`, `error` - `startDate` - ISO timestamp for date range start - `endDate` - ISO timestamp for date range end - - `executionId` - Exact execution ID match - - `minDurationMs` - Minimum execution duration in milliseconds - - `maxDurationMs` - Maximum execution duration in milliseconds - - `minCost` - Minimum execution cost - - `maxCost` - Maximum execution cost + - `executionId` - Exact run ID match + - `minDurationMs` - Minimum run duration in milliseconds + - `maxDurationMs` - Maximum run duration in milliseconds + - `minCost` - Minimum run cost + - `maxCost` - Maximum run cost - `model` - Filter by AI model used **Pagination:** @@ -213,9 +213,9 @@ Retrieve detailed information about a specific log entry. -### Get Execution Details +### Get Run Details -Retrieve execution details including the workflow state snapshot. +Retrieve run details including the workflow state snapshot. @@ -248,7 +248,7 @@ Retrieve execution details including the workflow state snapshot. ## Notifications -Get real-time notifications when workflow executions complete via webhook, email, or Slack. Notifications are configured at the workspace level from the Logs page. +Get real-time notifications when workflow runs complete via webhook, email, or Slack. Notifications are configured at the workspace level from the Logs page. ### Configuration @@ -256,7 +256,7 @@ Configure notifications from the Logs page by clicking the menu button and selec **Notification Channels:** - **Webhook**: Send HTTP POST requests to your endpoint -- **Email**: Receive email notifications with execution details +- **Email**: Receive email notifications with run details - **Slack**: Post messages to a Slack channel **Workflow Selection:** @@ -269,38 +269,38 @@ Configure notifications from the Logs page by clicking the menu button and selec **Optional Data:** - `includeFinalOutput`: Include the workflow's final output -- `includeTraceSpans`: Include detailed execution trace spans +- `includeTraceSpans`: Include detailed trace spans - `includeRateLimits`: Include rate limit information (sync/async limits and remaining) - `includeUsageData`: Include billing period usage and limits ### Alert Rules -Instead of receiving notifications for every execution, configure alert rules to be notified only when issues are detected: +Instead of receiving notifications for every run, configure alert rules to be notified only when issues are detected: **Consecutive Failures** -- Alert after X consecutive failed executions (e.g., 3 failures in a row) -- Resets when an execution succeeds +- Alert after X consecutive failed runs (e.g., 3 failures in a row) +- Resets when a run succeeds **Failure Rate** - Alert when failure rate exceeds X% over the last Y hours -- Requires minimum 5 executions in the window +- Requires minimum 5 runs in the window - Only triggers after the full time window has elapsed **Latency Threshold** -- Alert when any execution takes longer than X seconds +- Alert when any run takes longer than X seconds - Useful for catching slow or hanging workflows **Latency Spike** -- Alert when execution is X% slower than the average +- Alert when a run is X% slower than the average - Compares against the average duration over the configured time window -- Requires minimum 5 executions to establish baseline +- Requires minimum 5 runs to establish baseline **Cost Threshold** -- Alert when a single execution costs more than $X +- Alert when a single run costs more than $X - Useful for catching expensive LLM calls **No Activity** -- Alert when no executions occur within X hours +- Alert when no runs occur within X hours - Useful for monitoring scheduled workflows that should run regularly **Error Count** @@ -317,7 +317,7 @@ For webhooks, additional options are available: ### Payload Structure -When a workflow execution completes, Sim sends the following payload (via webhook POST, email, or Slack): +When a workflow run completes, Sim sends the following payload (via webhook POST, email, or Slack): ```json { @@ -456,7 +456,7 @@ Failed webhook deliveries are retried with exponential backoff and jitter: - Deliveries timeout after 30 seconds - Webhook deliveries are processed asynchronously and don't affect workflow execution performance. + Webhook deliveries are processed asynchronously and don't affect workflow run performance. ## Best Practices @@ -596,11 +596,11 @@ app.listen(3000, () => { import { FAQ } from '@/components/ui/faq' Sim Keys in the platform. Workflows with public API access enabled can also be called without authentication." }, { question: "How does the webhook retry policy work?", answer: "Failed webhook deliveries are retried up to 5 times with exponential backoff: 5 seconds, 15 seconds, 1 minute, 3 minutes, and 10 minutes, plus up to 10% jitter. Only HTTP 5xx and 429 responses trigger retries. Each delivery times out after 30 seconds." }, - { question: "What rate limits apply to the Logs API?", answer: "Rate limits use a token bucket algorithm. Free plans get 30 requests/minute with 60 burst capacity, Pro gets 100/200, Team gets 200/400, and Enterprise gets 500/1000. These are separate from workflow execution rate limits, which are shown in the response body." }, + { question: "What rate limits apply to the Logs API?", answer: "Rate limits use a token bucket algorithm. Free plans get 30 requests/minute with 60 burst capacity, Pro gets 100/200, Team gets 200/400, and Enterprise gets 500/1000. These are separate from workflow run rate limits, which are shown in the response body." }, { question: "How do I verify that a webhook is from Sim?", answer: "Configure a webhook secret when setting up notifications. Sim signs each delivery with HMAC-SHA256 using the format 't={timestamp},v1={signature}' in the sim-signature header. Compute the HMAC of '{timestamp}.{body}' with your secret and compare it to the signature value." }, { question: "What alert rules are available for notifications?", answer: "You can configure alerts for consecutive failures, failure rate thresholds, latency thresholds, latency spikes (percentage above average), cost thresholds, no-activity periods, and error counts within a time window. All alert types include a 1-hour cooldown to prevent notification spam." }, - { question: "Can I filter which executions trigger notifications?", answer: "Yes. You can filter notifications by specific workflows (or select all), log level (info or error), and trigger type (api, webhook, schedule, manual, chat). You can also choose whether to include final output, trace spans, rate limits, and usage data in the notification payload." }, + { question: "Can I filter which runs trigger notifications?", answer: "Yes. You can filter notifications by specific workflows (or select all), log level (info or error), and trigger type (api, webhook, schedule, manual, chat). You can also choose whether to include final output, trace spans, rate limits, and usage data in the notification payload." }, ]} /> diff --git a/apps/docs/content/docs/en/execution/basics.mdx b/apps/docs/content/docs/en/execution/basics.mdx index 1777b7fdcf..60dc79cbd3 100644 --- a/apps/docs/content/docs/en/execution/basics.mdx +++ b/apps/docs/content/docs/en/execution/basics.mdx @@ -6,7 +6,7 @@ import { Callout } from 'fumadocs-ui/components/callout' import { Card, Cards } from 'fumadocs-ui/components/card' import { Image } from '@/components/ui/image' -Understanding how workflows execute in Sim is key to building efficient and reliable automations. The execution engine automatically handles dependencies, concurrency, and data flow to ensure your workflows run smoothly and predictably. +Understanding how workflows run in Sim is key to building efficient and reliable automations. The execution engine automatically handles dependencies, concurrency, and data flow to ensure your workflows run smoothly and predictably. ## How Workflows Execute @@ -14,7 +14,7 @@ Sim's execution engine processes workflows intelligently by analyzing dependenci ### Concurrent Execution by Default -Multiple blocks run concurrently when they don't depend on each other. This parallel execution dramatically improves performance without requiring manual configuration. +Multiple blocks run concurrently when they don't depend on each other. This dramatically improves performance without requiring manual configuration. -This workflow demonstrates how execution can follow different paths based on conditions or AI decisions, with each path executing independently. +This workflow demonstrates how a run can follow different paths based on conditions or AI decisions, with each path running independently. ## Block Types @@ -57,7 +57,7 @@ Sim provides different types of blocks that serve specific purposes in your work - **Starter blocks** initiate workflows and **Webhook blocks** respond to external events. Every workflow needs a trigger to begin execution. + **Starter blocks** initiate workflows and **Webhook blocks** respond to external events. Every workflow needs a trigger to begin a run. @@ -73,37 +73,37 @@ Sim provides different types of blocks that serve specific purposes in your work -All blocks execute automatically based on their dependencies - you don't need to manually manage execution order or timing. +All blocks run automatically based on their dependencies - you don't need to manually manage run order or timing. -## Execution Monitoring +## Run Monitoring -When workflows run, Sim provides real-time visibility into the execution process: +When workflows run, Sim provides real-time visibility into the process: -- **Live Block States**: See which blocks are currently executing, completed, or failed -- **Execution Logs**: Detailed logs appear in real-time showing inputs, outputs, and any errors -- **Performance Metrics**: Track execution time and costs for each block -- **Path Visualization**: Understand which execution paths were taken through your workflow +- **Live Block States**: See which blocks are currently running, completed, or failed +- **Run Logs**: Detailed logs appear in real-time showing inputs, outputs, and any errors +- **Performance Metrics**: Track run time and costs for each block +- **Path Visualization**: Understand which paths were taken through your workflow - All execution details are captured and available for review even after workflows complete, helping with debugging and optimization. + All run details are captured and available for review even after workflows complete, helping with debugging and optimization. -## Key Execution Principles +## Key Principles Understanding these core principles will help you build better workflows: 1. **Dependency-Based Execution**: Blocks only run when all their dependencies have completed 2. **Automatic Parallelization**: Independent blocks run concurrently without configuration 3. **Smart Data Flow**: Outputs flow automatically to connected blocks -4. **Error Handling**: Failed blocks stop their execution path but don't affect independent paths -5. **Response Blocks as Exit Points**: When a Response block executes, the entire workflow stops and the API response is sent immediately. Multiple Response blocks can exist on different branches — the first one to execute wins -6. **State Persistence**: All block outputs and execution details are preserved for debugging -7. **Cycle Protection**: Workflows that call other workflows (via Workflow blocks, MCP tools, or API blocks) are tracked with a call chain. If the chain exceeds 25 hops, execution is stopped to prevent infinite loops +4. **Error Handling**: Failed blocks stop their run path but don't affect independent paths +5. **Response Blocks as Exit Points**: When a Response block runs, the entire workflow stops and the API response is sent immediately. Multiple Response blocks can exist on different branches — the first one to run wins +6. **State Persistence**: All block outputs and run details are preserved for debugging +7. **Cycle Protection**: Workflows that call other workflows (via Workflow blocks, MCP tools, or API blocks) are tracked with a call chain. If the chain exceeds 25 hops, the run is stopped to prevent infinite loops ## Next Steps Now that you understand execution basics, explore: - **[Block Types](/blocks)** - Learn about specific block capabilities -- **[Logging](/execution/logging)** - Monitor workflow executions and debug issues +- **[Logging](/execution/logging)** - Monitor workflow runs and debug issues - **[Cost Calculation](/execution/costs)** - Understand and optimize workflow costs - **[Triggers](/triggers)** - Set up different ways to run your workflows diff --git a/apps/docs/content/docs/en/execution/costs.mdx b/apps/docs/content/docs/en/execution/costs.mdx index 13b23f4ce7..a2391a0b83 100644 --- a/apps/docs/content/docs/en/execution/costs.mdx +++ b/apps/docs/content/docs/en/execution/costs.mdx @@ -6,7 +6,7 @@ import { Callout } from 'fumadocs-ui/components/callout' import { Tab, Tabs } from 'fumadocs-ui/components/tabs' import { Image } from '@/components/ui/image' -Sim automatically calculates costs for all workflow executions, providing transparent pricing based on AI model usage and execution charges. Understanding these costs helps you optimize workflows and manage your budget effectively. +Sim automatically calculates costs for all workflow runs, providing transparent pricing based on AI model usage and run charges. Understanding these costs helps you optimize workflows and manage your budget effectively. ## Credits @@ -16,18 +16,18 @@ All plan limits, usage meters, and billing thresholds are displayed in credits t ## How Costs Are Calculated -Every workflow execution includes two cost components: +Every workflow run includes two cost components: -**Base Execution Charge**: 1 credit ($0.005) per execution +**Base Run Charge**: 1 credit ($0.005) per run **AI Model Usage**: Variable cost based on token consumption ```javascript modelCost = (inputTokens × inputPrice + outputTokens × outputPrice) / 1,000,000 -totalCredits = baseExecutionCharge + modelCost × 200 +totalCredits = baseRunCharge + modelCost × 200 ``` - AI model prices are per million tokens. The calculation divides by 1,000,000 to get the actual cost. Workflows without AI blocks only incur the base execution charge. + AI model prices are per million tokens. The calculation divides by 1,000,000 to get the actual cost. Workflows without AI blocks only incur the base run charge. ## Model Breakdown in Logs @@ -48,7 +48,7 @@ The model breakdown shows: - **Token Usage**: Input and output token counts for each model - **Cost Breakdown**: Individual costs per model and operation - **Model Distribution**: Which models were used and how many times -- **Total Cost**: Aggregate cost for the entire workflow execution +- **Total Cost**: Aggregate cost for the entire workflow run ## Pricing Options @@ -330,18 +330,18 @@ Max (individual) shares the same rate limits as team plans. Team plans (Pro or M Team plans (Pro or Max for Teams) use 500 GB. -### Execution Time Limits +### Run Time Limits | Plan | Sync | Async | |------|------|-------| | **Free** | 5 minutes | 90 minutes | | **Pro / Max / Team / Enterprise** | 50 minutes | 90 minutes | -**Sync executions** run immediately and return results directly. These are triggered via the API with `async: false` (default) or through the UI. -**Async executions** (triggered via API with `async: true`, webhooks, or schedules) run in the background. +**Sync runs** complete immediately and return results directly. These are triggered via the API with `async: false` (default) or through the UI. +**Async runs** (triggered via API with `async: true`, webhooks, or schedules) run in the background. - If a workflow exceeds its time limit, it will be terminated and marked as failed with a timeout error. Design long-running workflows to use async execution or break them into smaller workflows. + If a workflow exceeds its time limit, it will be terminated and marked as failed with a timeout error. Design long-running workflows to use async runs or break them into smaller workflows. ## Billing Model @@ -452,18 +452,18 @@ curl -X GET -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" htt ## Next Steps - Review your current usage in [Settings → Subscription](https://sim.ai/settings/subscription) -- Learn about [Logging](/execution/logging) to track execution details +- Learn about [Logging](/execution/logging) to track run details - Explore the [External API](/execution/api) for programmatic cost monitoring - Check out [workflow optimization techniques](/blocks) to reduce costs import { FAQ } from '@/components/ui/faq' diff --git a/apps/docs/content/docs/en/execution/files.mdx b/apps/docs/content/docs/en/execution/files.mdx index 4a7093c9b4..41c04692c4 100644 --- a/apps/docs/content/docs/en/execution/files.mdx +++ b/apps/docs/content/docs/en/execution/files.mdx @@ -156,7 +156,7 @@ Use `url` for direct downloads or `base64` for inline processing. - **Dropbox** - Dropbox file operations - Files are automatically available to downstream blocks. The execution engine handles all file transfer and format conversion. + Files are automatically available to downstream blocks. The engine handles all file transfer and format conversion. ## Best Practices @@ -165,15 +165,15 @@ Use `url` for direct downloads or `base64` for inline processing. 2. **Check file types** - Ensure the file type matches what the receiving block expects. The Vision block needs images, the File block handles documents. -3. **Consider file size** - Large files increase execution time. For very large files, consider using storage blocks (S3, Supabase) for intermediate storage. +3. **Consider file size** - Large files increase run time. For very large files, consider using storage blocks (S3, Supabase) for intermediate storage. import { FAQ } from '@/components/ui/faq' ) and the receiving block will extract the data it needs." }, - { question: "How do file fields work in the Start block's input format?", answer: "When you define a field with type 'file[]' in the Start block's input format, the execution engine automatically processes incoming file data (base64 or URL) and uploads it to storage, converting it into UserFile objects before the workflow runs." }, + { question: "How do file fields work in the Start block's input format?", answer: "When you define a field with type 'file[]' in the Start block's input format, the engine automatically processes incoming file data (base64 or URL) and uploads it to storage, converting it into UserFile objects before the workflow runs." }, ]} /> diff --git a/apps/docs/content/docs/en/execution/index.mdx b/apps/docs/content/docs/en/execution/index.mdx index cc80425ecf..7b67747313 100644 --- a/apps/docs/content/docs/en/execution/index.mdx +++ b/apps/docs/content/docs/en/execution/index.mdx @@ -7,10 +7,10 @@ import { Card, Cards } from 'fumadocs-ui/components/card' import { Image } from '@/components/ui/image' import { FAQ } from '@/components/ui/faq' -Sim's execution engine brings your workflows to life by processing blocks in the correct order, managing data flow, and handling errors gracefully, so you can understand exactly how workflows are executed in Sim. +Sim's execution engine brings your workflows to life by processing blocks in the correct order, managing data flow, and handling errors gracefully, so you can understand exactly how workflows run in Sim. - Every workflow execution follows a deterministic path based on your block connections and logic, ensuring predictable and reliable results. + Every workflow run follows a deterministic path based on your block connections and logic, ensuring predictable and reliable results. ## Documentation Overview @@ -22,33 +22,33 @@ Sim's execution engine brings your workflows to life by processing blocks in the - Monitor workflow executions with comprehensive logging and real-time visibility + Monitor workflow runs with comprehensive logging and real-time visibility - + - Understand how workflow execution costs are calculated and optimized + Understand how workflow run costs are calculated and optimized - + - Access execution logs and set up webhooks programmatically via REST API + Access run logs and set up webhooks programmatically via REST API ## Key Concepts ### Topological Execution -Blocks execute in dependency order, similar to how a spreadsheet recalculates cells. The execution engine automatically determines which blocks can run based on completed dependencies. +Blocks run in dependency order, similar to how a spreadsheet recalculates cells. The execution engine automatically determines which blocks can run based on completed dependencies. ### Path Tracking -The engine actively tracks execution paths through your workflow. Router and Condition blocks dynamically update these paths, ensuring only relevant blocks execute. +The engine actively tracks run paths through your workflow. Router and Condition blocks dynamically update these paths, ensuring only relevant blocks run. ### Layer-Based Processing Instead of executing blocks one-by-one, the engine identifies layers of blocks that can run in parallel, optimizing performance for complex workflows. -### Execution Context -Each workflow maintains a rich context during execution containing: +### Run Context +Each workflow maintains a rich context during a run containing: - Block outputs and states -- Active execution paths +- Active run paths - Loop and parallel iteration tracking - Environment variables - Routing decisions @@ -56,7 +56,7 @@ Each workflow maintains a rich context during execution containing: ## Deployment Snapshots -API, Chat, Schedule, and Webhook executions run against the workflow’s active deployment snapshot. Manual runs from the editor execute the current draft canvas state, letting you test changes before deploying. Publish a new deployment whenever you change the canvas so every trigger uses the updated version. +API, Chat, Schedule, and Webhook runs use the workflow’s active deployment snapshot. Manual runs from the editor use the current draft canvas state, letting you test changes before deploying. Publish a new deployment whenever you change the canvas so every trigger uses the updated version.
diff --git a/apps/docs/content/docs/en/execution/logging.mdx b/apps/docs/content/docs/en/execution/logging.mdx index 12376de01a..dbbf50a383 100644 --- a/apps/docs/content/docs/en/execution/logging.mdx +++ b/apps/docs/content/docs/en/execution/logging.mdx @@ -6,7 +6,7 @@ import { Callout } from 'fumadocs-ui/components/callout' import { Tab, Tabs } from 'fumadocs-ui/components/tabs' import { Image } from '@/components/ui/image' -Sim provides comprehensive logging for all workflow executions, giving you complete visibility into how your workflows run, what data flows through them, and where issues might occur. +Sim provides comprehensive logging for all workflow runs, giving you complete visibility into how your workflows run, what data flows through them, and where issues might occur. ## Logging System @@ -14,7 +14,7 @@ Sim offers two complementary logging interfaces to match different workflows and ### Real-Time Console -During manual or chat workflow execution, logs appear in real-time in the Console panel on the right side of the workflow editor: +During manual or chat workflow runs, logs appear in real-time in the Console panel on the right side of the workflow editor:
The console shows: -- Block execution progress with active block highlighting +- Block progress with active block highlighting - Real-time outputs as blocks complete -- Execution timing for each block +- Timing for each block - Success/error status indicators ### Logs Page -All workflow executions—whether triggered manually, via API, Chat, Schedule, or Webhook—are logged to the dedicated Logs page: +All workflow runs—whether triggered manually, via API, Chat, Schedule, or Webhook—are logged to the dedicated Logs page:
- **Output Tab** shows the block's execution result: + **Output Tab** shows the block's result: - Structured data with JSON formatting - Markdown rendering for AI-generated content - Copy button for easy data extraction @@ -87,17 +87,17 @@ View the complete data flow for each block with tabs to switch between: -### Execution Timeline +### Run Timeline -For workflow-level logs, view detailed execution metrics: +For workflow-level logs, view detailed run metrics: - Start and end timestamps - Total workflow duration -- Individual block execution times +- Individual block run times - Performance bottleneck identification ## Workflow Snapshots -For any logged execution, click "View Snapshot" to see the exact workflow state at execution time: +For any logged run, click "View Snapshot" to see the exact workflow state at the time of the run:
- Workflow snapshots are only available for executions after the enhanced logging system was introduced. Older migrated logs show a "Logged State Not Found" message. + Workflow snapshots are only available for runs after the enhanced logging system was introduced. Older migrated logs show a "Logged State Not Found" message. ## Log Retention @@ -134,11 +134,11 @@ The snapshot provides: ### For Production - Monitor the Logs page regularly for errors or performance issues - Set up filters to focus on specific workflows or time periods -- Use live mode during critical deployments to watch executions in real-time +- Use live mode during critical deployments to watch runs in real-time ### For Debugging -- Always check the execution timeline to identify slow blocks -- Compare inputs between working and failing executions +- Always check the run timeline to identify slow blocks +- Compare inputs between working and failing runs - Use workflow snapshots to see the exact state when issues occurred ## Next Steps @@ -150,10 +150,10 @@ The snapshot provides: import { FAQ } from '@/components/ui/faq' \ No newline at end of file diff --git a/apps/docs/content/docs/en/triggers/index.mdx b/apps/docs/content/docs/en/triggers/index.mdx index 29279243cf..9936968505 100644 --- a/apps/docs/content/docs/en/triggers/index.mdx +++ b/apps/docs/content/docs/en/triggers/index.mdx @@ -29,7 +29,7 @@ Use the Start block for everything originating from the editor, deploy-to-API, o Receive external webhook payloads - Cron or interval based execution + Cron or interval based runs Monitor RSS and Atom feeds for new content @@ -59,17 +59,17 @@ Use the Start block for everything originating from the editor, deploy-to-API, o > Deployments power every trigger. Update the workflow, redeploy, and all trigger entry points pick up the new snapshot. Learn more in [Execution → Deployment Snapshots](/execution). -## Manual Execution Priority +## Manual Run Priority -When you click **Run** in the editor, Sim automatically selects which trigger to execute based on the following priority order: +When you click **Run** in the editor, Sim automatically selects which trigger to run based on the following priority order: 1. **Start Block** (highest priority) 2. **Schedule Triggers** 3. **External Triggers** (webhooks, integrations like Slack, Gmail, Airtable, etc.) -If your workflow has multiple triggers, the highest priority trigger will be executed. For example, if you have both a Start block and a Webhook trigger, clicking Run will execute the Start block. +If your workflow has multiple triggers, the highest priority trigger will be used. For example, if you have both a Start block and a Webhook trigger, clicking Run will use the Start block. -**External triggers with mock payloads**: When external triggers (webhooks and integrations) are executed manually, Sim automatically generates mock payloads based on the trigger's expected data structure. This ensures downstream blocks can resolve variables correctly during testing. +**External triggers with mock payloads**: When external triggers (webhooks and integrations) are run manually, Sim automatically generates mock payloads based on the trigger's expected data structure. This ensures downstream blocks can resolve variables correctly during testing. ## Email Polling Groups @@ -94,10 +94,10 @@ Invitees receive an email with a link to connect their account. Once connected, When configuring an email trigger, select your polling group from the credentials dropdown instead of an individual account. The system creates webhooks for each member and routes all emails through your workflow. diff --git a/apps/docs/content/docs/en/triggers/rss.mdx b/apps/docs/content/docs/en/triggers/rss.mdx index 3f15c384d7..93f86d3587 100644 --- a/apps/docs/content/docs/en/triggers/rss.mdx +++ b/apps/docs/content/docs/en/triggers/rss.mdx @@ -51,9 +51,9 @@ RSS triggers only fire for items published after you save the trigger. Existing diff --git a/apps/docs/content/docs/en/triggers/schedule.mdx b/apps/docs/content/docs/en/triggers/schedule.mdx index 2bd193191c..8c59882ceb 100644 --- a/apps/docs/content/docs/en/triggers/schedule.mdx +++ b/apps/docs/content/docs/en/triggers/schedule.mdx @@ -79,10 +79,10 @@ Schedule blocks cannot receive incoming connections and serve as workflow entry diff --git a/apps/docs/content/docs/en/triggers/start.mdx b/apps/docs/content/docs/en/triggers/start.mdx index 8997372e8e..672da65024 100644 --- a/apps/docs/content/docs/en/triggers/start.mdx +++ b/apps/docs/content/docs/en/triggers/start.mdx @@ -19,12 +19,12 @@ The Start block is the default trigger for workflows built in Sim. It collects s
-The Start block sits in the start slot when you create a workflow. Keep it there when you want the same entry point to serve editor runs, deploy-to-API requests, and chat sessions. Swap it with Webhook or Schedule triggers when you only need event-driven execution. +The Start block sits in the start slot when you create a workflow. Keep it there when you want the same entry point to serve editor runs, deploy-to-API requests, and chat sessions. Swap it with Webhook or Schedule triggers when you only need event-driven runs. ## Fields exposed by Start -The Start block emits different data depending on the execution surface: +The Start block emits different data depending on the run surface: - **Input Format fields** — Every field you add becomes available as <start.fieldName>. For example, a `customerId` field shows up as <start.customerId> in downstream blocks and templates. - **Chat-only fields** — When the workflow runs from the chat side panel or a deployed chat experience, Sim also provides <start.input> (latest user message), <start.conversationId> (active session id), and <start.files> (chat attachments). @@ -33,11 +33,11 @@ Keep Input Format fields scoped to the names you expect to reference later—tho ## Configure the Input Format -Use the Input Format sub-block to define the schema that applies across execution modes: +Use the Input Format sub-block to define the schema that applies across run modes: 1. Add a field for each value you want to collect. 2. Choose a type (`string`, `number`, `boolean`, `object`, `array`, or `files`). File fields accept uploads from chat and API callers. -3. Provide default values when you want the manual run modal to populate test data automatically. These defaults are ignored for deployed executions. +3. Provide default values when you want the manual run modal to populate test data automatically. These defaults are ignored for deployed runs. 4. Reorder fields to control how they appear in the editor form. Reference structured values downstream with expressions such as <start.customerId> depending on the block you connect. @@ -53,7 +53,7 @@ Reference structured values downstream with expressions such as <start. tools or storage steps. - Deploying to API turns the Input Format into a JSON contract for clients. Each field becomes part of the request body, and Sim coerces primitive types on ingestion. File fields expect objects that reference uploaded files; use the execution file upload endpoint before invoking the workflow. + Deploying to API turns the Input Format into a JSON contract for clients. Each field becomes part of the request body, and Sim coerces primitive types on ingestion. File fields expect objects that reference uploaded files; use the file upload endpoint before invoking the workflow. API callers can include additional optional properties. They are preserved inside <start.fieldName> outputs so you can experiment diff --git a/apps/docs/content/docs/en/triggers/webhook.mdx b/apps/docs/content/docs/en/triggers/webhook.mdx index d897db7681..33d3a6dd95 100644 --- a/apps/docs/content/docs/en/triggers/webhook.mdx +++ b/apps/docs/content/docs/en/triggers/webhook.mdx @@ -8,7 +8,7 @@ import { Image } from '@/components/ui/image' import { Video } from '@/components/ui/video' import { FAQ } from '@/components/ui/faq' -Webhooks allow external services to trigger workflow execution by sending HTTP requests to your workflow. Sim supports two approaches for webhook-based triggers. +Webhooks allow external services to trigger workflow runs by sending HTTP requests to your workflow. Sim supports two approaches for webhook-based triggers. ## Generic Webhook Trigger @@ -30,7 +30,7 @@ The Generic Webhook block creates a flexible endpoint that can receive any paylo 2. **Configure Payload** - Set up the expected payload structure (optional) 3. **Get Webhook URL** - Copy the automatically generated unique endpoint 4. **External Integration** - Configure your external service to send POST requests to this URL -5. **Workflow Execution** - Every request to the webhook URL triggers the workflow +5. **Workflow Run** - Every request to the webhook URL triggers the workflow ### Features @@ -38,7 +38,7 @@ The Generic Webhook block creates a flexible endpoint that can receive any paylo - **Automatic Parsing**: Webhook data is automatically parsed and available to subsequent blocks - **Authentication**: Optional bearer token or custom header authentication - **Rate Limiting**: Built-in protection against abuse -- **Deduplication**: Prevents duplicate executions from repeated requests +- **Deduplication**: Prevents duplicate runs from repeated requests The Generic Webhook trigger fires every time the webhook URL receives a request, making it perfect for real-time integrations. @@ -58,7 +58,7 @@ Alternatively, you can use specific service blocks (like Slack, GitHub, etc.) in 2. **Enable Trigger Mode** - Toggle "Use as Trigger" in the block settings 3. **Configure Service** - Set up authentication and event filters specific to that service 4. **Webhook Registration** - The service automatically registers the webhook with the external platform -5. **Event-Based Execution** - Workflow triggers only for specific events from that service +5. **Event-Based Runs** - Workflow triggers only for specific events from that service ### When to Use Each Approach @@ -120,7 +120,7 @@ Alternatively, you can use specific service blocks (like Slack, GitHub, etc.) in ### Testing Webhooks 1. Use tools like Postman or curl to test your webhook endpoints -2. Check workflow execution logs for debugging +2. Check workflow run logs for debugging 3. Verify payload structure matches your expectations 4. Test authentication and error scenarios @@ -153,8 +153,8 @@ Always validate and sanitize incoming webhook data before processing it in your { question: "What HTTP methods does the Generic Webhook endpoint accept?", answer: "The webhook endpoint handles POST requests for triggering workflows. GET requests are only used for provider-specific verification challenges (such as Microsoft Graph or WhatsApp verification). Other methods return a 405 Method Not Allowed response." }, { question: "How do I authenticate webhook requests?", answer: "Enable the Require Authentication toggle in the webhook configuration, then set an Authentication Token. Callers can send the token as a Bearer token in the Authorization header, or you can specify a custom header name (e.g., X-Secret-Key) and the token will be matched against that header instead." }, { question: "Can I define the expected payload structure for a webhook?", answer: "Yes. The Generic Webhook block includes an Input Format field where you can define the expected JSON schema. This is optional but helps document the expected structure. You can also use type \"file[]\" for file upload fields." }, - { question: "Does the webhook have deduplication built in?", answer: "Yes. The webhook processing pipeline includes idempotency checks to prevent duplicate executions from repeated requests with the same payload." }, + { question: "Does the webhook have deduplication built in?", answer: "Yes. The webhook processing pipeline includes idempotency checks to prevent duplicate runs from repeated requests with the same payload." }, { question: "What data from the webhook request is available in my workflow?", answer: "All request data including headers, body, and query parameters is parsed and made available to subsequent blocks. Common fields like event, id, and data are automatically extracted from the payload when present." }, - { question: "Do I need to deploy my workflow for the webhook URL to work?", answer: "Yes. The webhook endpoint checks that the associated workflow is deployed before triggering execution. If the workflow is not deployed, the webhook returns a not-found response." }, - { question: "Does the webhook auto-disable after repeated failures?", answer: "No. Unlike polling-based triggers (RSS, Gmail, IMAP), push-based generic webhooks do not auto-disable after consecutive failures. Each incoming request is processed independently. If your workflow consistently fails, check the execution logs for error details." }, + { question: "Do I need to deploy my workflow for the webhook URL to work?", answer: "Yes. The webhook endpoint checks that the associated workflow is deployed before triggering a run. If the workflow is not deployed, the webhook returns a not-found response." }, + { question: "Does the webhook auto-disable after repeated failures?", answer: "No. Unlike polling-based triggers (RSS, Gmail, IMAP), push-based generic webhooks do not auto-disable after consecutive failures. Each incoming request is processed independently. If your workflow consistently fails, check the run logs for error details." }, ]} /> diff --git a/apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.test.ts b/apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.test.ts index 73b16fdea1..295b17e4e7 100644 --- a/apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.test.ts +++ b/apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.test.ts @@ -2,6 +2,7 @@ * @vitest-environment node */ +import { databaseMock } from '@sim/testing' import { NextRequest } from 'next/server' import { beforeEach, describe, expect, it, vi } from 'vitest' @@ -203,4 +204,73 @@ describe('POST /api/workflows/[id]/executions/[executionId]/cancel', () => { expect(response.status).toBe(403) }) + + it('updates execution log status in DB when durably recorded', async () => { + const mockWhere = vi.fn().mockResolvedValue(undefined) + const mockSet = vi.fn(() => ({ where: mockWhere })) + databaseMock.db.update.mockReturnValueOnce({ set: mockSet }) + mockMarkExecutionCancelled.mockResolvedValue({ + durablyRecorded: true, + reason: 'recorded', + }) + + await POST(makeRequest(), makeParams()) + + expect(databaseMock.db.update).toHaveBeenCalled() + expect(mockSet).toHaveBeenCalledWith({ + status: 'cancelled', + endedAt: expect.any(Date), + }) + }) + + it('updates execution log status in DB when locally aborted', async () => { + const mockWhere = vi.fn().mockResolvedValue(undefined) + const mockSet = vi.fn(() => ({ where: mockWhere })) + databaseMock.db.update.mockReturnValueOnce({ set: mockSet }) + mockMarkExecutionCancelled.mockResolvedValue({ + durablyRecorded: false, + reason: 'redis_unavailable', + }) + mockAbortManualExecution.mockReturnValue(true) + + await POST(makeRequest(), makeParams()) + + expect(databaseMock.db.update).toHaveBeenCalled() + expect(mockSet).toHaveBeenCalledWith({ + status: 'cancelled', + endedAt: expect.any(Date), + }) + }) + + it('does not update execution log status in DB when only paused execution was cancelled', async () => { + mockMarkExecutionCancelled.mockResolvedValue({ + durablyRecorded: false, + reason: 'redis_unavailable', + }) + mockCancelPausedExecution.mockResolvedValue(true) + + await POST(makeRequest(), makeParams()) + + expect(databaseMock.db.update).not.toHaveBeenCalled() + }) + + it('returns success even if direct DB update fails', async () => { + mockMarkExecutionCancelled.mockResolvedValue({ + durablyRecorded: true, + reason: 'recorded', + }) + databaseMock.db.update.mockReturnValueOnce({ + set: vi.fn(() => ({ + where: vi.fn(() => { + throw new Error('DB connection failed') + }), + })), + }) + + const response = await POST(makeRequest(), makeParams()) + + expect(response.status).toBe(200) + const data = await response.json() + expect(data.success).toBe(true) + }) }) diff --git a/apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.ts b/apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.ts index ec65f69350..e7320f3311 100644 --- a/apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.ts +++ b/apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.ts @@ -1,4 +1,7 @@ +import { db } from '@sim/db' +import { workflowExecutionLogs } from '@sim/db/schema' import { createLogger } from '@sim/logger' +import { and, eq } from 'drizzle-orm' import { type NextRequest, NextResponse } from 'next/server' import { checkHybridAuth } from '@/lib/auth/hybrid' import { markExecutionCancelled } from '@/lib/execution/cancellation' @@ -83,6 +86,28 @@ export async function POST( }) } + // For running executions, update DB directly so the UI sees 'cancelled' immediately + // instead of flashing back to 'running' before the executor finishes processing. + // Paused executions are already handled by cancelPausedExecution's transaction. + if ((cancellation.durablyRecorded || locallyAborted) && !pausedCancelled) { + try { + await db + .update(workflowExecutionLogs) + .set({ status: 'cancelled', endedAt: new Date() }) + .where( + and( + eq(workflowExecutionLogs.executionId, executionId), + eq(workflowExecutionLogs.status, 'running') + ) + ) + } catch (dbError) { + logger.warn('Failed to update execution log status directly', { + executionId, + error: dbError, + }) + } + } + const success = cancellation.durablyRecorded || locallyAborted || pausedCancelled if (success) { diff --git a/apps/sim/app/api/workflows/[id]/executions/[executionId]/stream/route.ts b/apps/sim/app/api/workflows/[id]/executions/[executionId]/stream/route.ts index ad2f94722d..22b60f5aae 100644 --- a/apps/sim/app/api/workflows/[id]/executions/[executionId]/stream/route.ts +++ b/apps/sim/app/api/workflows/[id]/executions/[executionId]/stream/route.ts @@ -48,14 +48,11 @@ export async function GET( const meta = await getExecutionMeta(executionId) if (!meta) { - return NextResponse.json({ error: 'Execution buffer not found or expired' }, { status: 404 }) + return NextResponse.json({ error: 'Run buffer not found or expired' }, { status: 404 }) } if (meta.workflowId && meta.workflowId !== workflowId) { - return NextResponse.json( - { error: 'Execution does not belong to this workflow' }, - { status: 403 } - ) + return NextResponse.json({ error: 'Run does not belong to this workflow' }, { status: 403 }) } const fromParam = req.nextUrl.searchParams.get('from') diff --git a/apps/sim/app/api/workflows/[id]/log/route.ts b/apps/sim/app/api/workflows/[id]/log/route.ts index dc50fa6bd4..dead4bf36d 100644 --- a/apps/sim/app/api/workflows/[id]/log/route.ts +++ b/apps/sim/app/api/workflows/[id]/log/route.ts @@ -95,7 +95,7 @@ export async function POST(request: NextRequest, { params }: { params: Promise<{ const { traceSpans, totalDuration } = buildTraceSpans(resultWithOutput as ExecutionResult) if (result.success === false) { - const message = result.error || 'Workflow execution failed' + const message = result.error || 'Workflow run failed' await loggingSession.safeCompleteWithError({ endedAt: new Date().toISOString(), totalDurationMs: totalDuration || result.metadata?.duration || 0, @@ -112,7 +112,7 @@ export async function POST(request: NextRequest, { params }: { params: Promise<{ } return createSuccessResponse({ - message: 'Execution logs persisted successfully', + message: 'Run logs persisted successfully', }) } diff --git a/apps/sim/app/chat/constants.ts b/apps/sim/app/chat/constants.ts index babbdd00da..52e515ca9e 100644 --- a/apps/sim/app/chat/constants.ts +++ b/apps/sim/app/chat/constants.ts @@ -6,7 +6,7 @@ export const CHAT_ERROR_MESSAGES = { AUTH_REQUIRED_EMAIL: 'Please provide your email to access this chat.', CHAT_UNAVAILABLE: 'This chat is currently unavailable. Please try again later.', NO_CHAT_TRIGGER: - 'No Chat trigger configured for this workflow. Add a Chat Trigger block to enable chat execution.', + 'No Chat trigger configured for this workflow. Add a Chat Trigger block to enable chat.', USAGE_LIMIT_EXCEEDED: 'Usage limit exceeded. Please upgrade your plan to continue using chat.', } as const diff --git a/apps/sim/app/llms.txt/route.ts b/apps/sim/app/llms.txt/route.ts index 0e6f7c3187..387f73d496 100644 --- a/apps/sim/app/llms.txt/route.ts +++ b/apps/sim/app/llms.txt/route.ts @@ -25,10 +25,10 @@ Sim lets teams create agents visually with the workflow builder, conversationall ## Key Concepts -- **Workspace**: The AI workspace — container for agents, workflows, data sources, and executions +- **Workspace**: The AI workspace — container for agents, workflows, data sources, and runs - **Workflow**: Visual builder — directed graph of blocks defining agent logic - **Block**: Individual step such as an LLM call, tool call, HTTP request, or code execution -- **Trigger**: Event or schedule that initiates workflow execution +- **Trigger**: Event or schedule that initiates a workflow run - **Execution**: A single run of a workflow with logs and outputs - **Knowledge Base**: Document store used for retrieval-augmented generation @@ -41,7 +41,7 @@ Sim lets teams create agents visually with the workflow builder, conversationall - Knowledge bases and retrieval-augmented generation - Table creation and management - Document creation and processing -- Scheduled and webhook-triggered executions +- Scheduled and webhook-triggered runs ## Use Cases diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx index 4b25c0affc..35d8c2e115 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx @@ -684,12 +684,10 @@ function EmbeddedLog({ logId }: EmbeddedLogProps) {
- {/* Execution ID */} + {/* Run ID */} {log.executionId && (
- - Execution ID - + Run ID {log.executionId} diff --git a/apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts b/apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts index bafd0d5067..8fef0d4ed0 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts +++ b/apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts @@ -2967,7 +2967,7 @@ export function useChat( input: {}, output: {}, success: false, - error: 'Execution was cancelled', + error: 'Run was cancelled', durationMs: 0, startedAt: now.toISOString(), executionOrder: Number.MAX_SAFE_INTEGER, @@ -2975,7 +2975,7 @@ export function useChat( workflowId, blockId: 'cancelled', executionId: executionId ?? undefined, - blockName: 'Execution Cancelled', + blockName: 'Run Cancelled', blockType: 'cancelled', }) diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/execution-snapshot/execution-snapshot.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/execution-snapshot/execution-snapshot.tsx index 293adba19c..2f2ebd9318 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/execution-snapshot/execution-snapshot.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/execution-snapshot/execution-snapshot.tsx @@ -94,7 +94,7 @@ export function ExecutionSnapshot({ >
- Loading execution snapshot... + Loading run snapshot...
) @@ -108,7 +108,7 @@ export function ExecutionSnapshot({ >
- Failed to load execution snapshot: {error.message} + Failed to load run snapshot: {error.message}
) @@ -122,7 +122,7 @@ export function ExecutionSnapshot({ >
- Loading execution snapshot... + Loading run snapshot...
) @@ -139,8 +139,8 @@ export function ExecutionSnapshot({ Logged State Not Found
- This log was migrated from the old logging system. The workflow state at execution time - is not available. + This log was migrated from the old logging system. The workflow state at the time of + this run is not available.
Note: {workflowState._note} @@ -191,7 +191,7 @@ export function ExecutionSnapshot({ > - Copy Execution ID + Copy Run ID , diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx index 3c8f4e499d..994b4d7daf 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx @@ -448,11 +448,11 @@ export const LogDetails = memo(function LogDetails({
- {/* Execution ID */} + {/* Run ID */} {log.executionId && (
- Execution ID + Run ID {log.executionId} @@ -576,7 +576,7 @@ export const LogDetails = memo(function LogDetails({
- Base Execution: + Base Run: {formatCost(BASE_EXECUTION_CHARGE)} @@ -643,8 +643,8 @@ export const LogDetails = memo(function LogDetails({

- Total cost includes a base execution charge of{' '} - {formatCost(BASE_EXECUTION_CHARGE)} plus any model and tool usage costs. + Total cost includes a base run charge of {formatCost(BASE_EXECUTION_CHARGE)}{' '} + plus any model and tool usage costs.

diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/log-row-context-menu/log-row-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/log-row-context-menu/log-row-context-menu.tsx index 2daf13aca1..a9dba9f471 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/log-row-context-menu/log-row-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/log-row-context-menu/log-row-context-menu.tsx @@ -77,14 +77,14 @@ export const LogRowContextMenu = memo(function LogRowContextMenu({ <> - Cancel Execution + Cancel Run )} - Copy Execution ID + Copy Run ID diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/subscription/plan-configs.ts b/apps/sim/app/workspace/[workspaceId]/settings/components/subscription/plan-configs.ts index 2d3f51580e..054a6de576 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/subscription/plan-configs.ts +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/subscription/plan-configs.ts @@ -15,7 +15,7 @@ import type { PlanFeature } from '@/app/workspace/[workspaceId]/settings/compone export const PRO_PLAN_FEATURES: PlanFeature[] = [ { icon: Zap, text: '150 runs/min (sync)' }, { icon: Clock, text: '1,000 runs/min (async)' }, - { icon: Timer, text: '50 min sync execution limit' }, + { icon: Timer, text: '50 min sync run limit' }, { icon: HardDrive, text: '50GB file storage' }, { icon: Table2, text: '25 tables · 5,000 rows each' }, ] @@ -23,7 +23,7 @@ export const PRO_PLAN_FEATURES: PlanFeature[] = [ export const MAX_PLAN_FEATURES: PlanFeature[] = [ { icon: Zap, text: '300 runs/min (sync)' }, { icon: Clock, text: '2,500 runs/min (async)' }, - { icon: Timer, text: '50 min sync execution limit' }, + { icon: Timer, text: '50 min sync run limit' }, { icon: HardDrive, text: '500GB file storage' }, { icon: Table2, text: '25 tables · 5,000 rows each' }, ] diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-execution-utils.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-execution-utils.ts index f323d4c387..b1320b0f1a 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-execution-utils.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-execution-utils.ts @@ -449,7 +449,7 @@ export function addExecutionErrorConsoleEntry( const isPreExecutionError = params.isPreExecutionError ?? false if (!isPreExecutionError && hasBlockError) return - const errorMessage = params.error || 'Execution failed' + const errorMessage = params.error || 'Run failed' const isTimeout = errorMessage.toLowerCase().includes('timed out') const timing = buildExecutionTiming(params.durationMs) @@ -469,7 +469,7 @@ export function addExecutionErrorConsoleEntry( ? 'Workflow Validation' : isTimeout ? 'Timeout Error' - : 'Execution Error', + : 'Run Error', blockType: isPreExecutionError ? 'validation' : 'error', }) } @@ -514,7 +514,7 @@ export function addHttpErrorConsoleEntry( workflowId: params.workflowId, blockId: isValidationError ? 'validation' : 'execution-error', executionId: params.executionId, - blockName: isValidationError ? 'Workflow Validation' : 'Execution Error', + blockName: isValidationError ? 'Workflow Validation' : 'Run Error', blockType: isValidationError ? 'validation' : 'error', }) } @@ -537,7 +537,7 @@ export function addCancelledConsoleEntry( input: {}, output: {}, success: false, - error: 'Execution was cancelled', + error: 'Run was cancelled', durationMs: timing.durationMs, startedAt: timing.startedAt, executionOrder: Number.MAX_SAFE_INTEGER, @@ -545,7 +545,7 @@ export function addCancelledConsoleEntry( workflowId: params.workflowId, blockId: 'cancelled', executionId: params.executionId, - blockName: 'Execution Cancelled', + blockName: 'Run Cancelled', blockType: 'cancelled', }) } @@ -721,14 +721,14 @@ export async function executeWorkflowWithFullLogging( executionResult = { success: false, output: {}, - error: 'Execution was cancelled', + error: 'Run was cancelled', logs: accumulatedBlockLogs, } }, onExecutionError: (data) => { setCurrentExecutionId(wfId, null) - const errorMessage = data.error || 'Execution failed' + const errorMessage = data.error || 'Run failed' executionResult = { success: false, output: {}, diff --git a/apps/sim/components/emails/notifications/workflow-notification-email.tsx b/apps/sim/components/emails/notifications/workflow-notification-email.tsx index ad08e608bb..3389c8cad3 100644 --- a/apps/sim/components/emails/notifications/workflow-notification-email.tsx +++ b/apps/sim/components/emails/notifications/workflow-notification-email.tsx @@ -70,7 +70,7 @@ export function WorkflowNotificationEmail({ const message = alertReason ? 'An alert was triggered for your workflow.' : isError - ? 'Your workflow execution failed.' + ? 'Your workflow run failed.' : 'Your workflow completed successfully.' return ( @@ -102,7 +102,7 @@ export function WorkflowNotificationEmail({ - View Execution Log + View Run Log {rateLimits && (rateLimits.sync || rateLimits.async) ? ( diff --git a/apps/sim/hooks/queries/logs.ts b/apps/sim/hooks/queries/logs.ts index 835b5d7f97..cab3f63ecb 100644 --- a/apps/sim/hooks/queries/logs.ts +++ b/apps/sim/hooks/queries/logs.ts @@ -292,9 +292,9 @@ export function useCancelExecution() { const res = await fetch(`/api/workflows/${workflowId}/executions/${executionId}/cancel`, { method: 'POST', }) - if (!res.ok) throw new Error('Failed to cancel execution') + if (!res.ok) throw new Error('Failed to cancel run') const data = await res.json() - if (!data.success) throw new Error('Failed to cancel execution') + if (!data.success) throw new Error('Failed to cancel run') return data }, onMutate: async ({ executionId }) => { diff --git a/apps/sim/lib/logs/execution/logging-session.ts b/apps/sim/lib/logs/execution/logging-session.ts index 3b0a20bd64..59a03a32a2 100644 --- a/apps/sim/lib/logs/execution/logging-session.ts +++ b/apps/sim/lib/logs/execution/logging-session.ts @@ -555,7 +555,7 @@ export class LoggingSession { models: {}, } - const message = error?.message || 'Execution failed before starting blocks' + const message = error?.message || 'Run failed before starting blocks' const errorSpan: TraceSpan = { id: 'workflow-error-root', @@ -994,7 +994,7 @@ export class LoggingSession { traceSpans: params?.traceSpans, endedAt: params?.endedAt, totalDurationMs: params?.totalDurationMs, - errorMessage: 'Execution was cancelled', + errorMessage: 'Run was cancelled', isError: false, finalizationPath: 'cancelled', finalOutput: { cancelled: true }, @@ -1021,7 +1021,7 @@ export class LoggingSession { traceSpans: params?.traceSpans, endedAt: params?.endedAt, totalDurationMs: params?.totalDurationMs, - errorMessage: 'Execution paused but failed to store full trace spans', + errorMessage: 'Run paused but failed to store full trace spans', isError: false, finalizationPath: 'paused', finalOutput: { paused: true }, @@ -1041,7 +1041,7 @@ export class LoggingSession { requestId?: string ): Promise { try { - const message = errorMessage || 'Execution failed' + const message = errorMessage || 'Run failed' await db .update(workflowExecutionLogs) .set({ diff --git a/apps/sim/lib/logs/search-suggestions.ts b/apps/sim/lib/logs/search-suggestions.ts index 2892baf7aa..cbef8e514a 100644 --- a/apps/sim/lib/logs/search-suggestions.ts +++ b/apps/sim/lib/logs/search-suggestions.ts @@ -57,25 +57,25 @@ export const FILTER_DEFINITIONS: FilterDefinition[] = [ { key: 'cost', label: 'Cost', - description: 'Filter by execution cost', + description: 'Filter by run cost', options: [ { value: '>0.01', label: 'Over 2 credits', - description: 'Executions costing more than 2 credits', + description: 'Runs costing more than 2 credits', }, { value: '<0.005', label: 'Under 1 credit', - description: 'Executions costing less than 1 credit', + description: 'Runs costing less than 1 credit', }, { value: '>0.05', label: 'Over 10 credits', - description: 'Executions costing more than 10 credits', + description: 'Runs costing more than 10 credits', }, - { value: '=0', label: 'Free', description: 'Free executions' }, - { value: '>0', label: 'Paid', description: 'Executions with cost' }, + { value: '=0', label: 'Free', description: 'Free runs' }, + { value: '>0', label: 'Paid', description: 'Runs with cost' }, ], }, { @@ -104,13 +104,13 @@ export const FILTER_DEFINITIONS: FilterDefinition[] = [ { key: 'duration', label: 'Duration', - description: 'Filter by execution duration', + description: 'Filter by run duration', options: [ - { value: '>5s', label: 'Over 5s', description: 'Executions longer than 5 seconds' }, - { value: '<1s', label: 'Under 1s', description: 'Executions shorter than 1 second' }, - { value: '>10s', label: 'Over 10s', description: 'Executions longer than 10 seconds' }, - { value: '>30s', label: 'Over 30s', description: 'Executions longer than 30 seconds' }, - { value: '<500ms', label: 'Under 0.5s', description: 'Very fast executions' }, + { value: '>5s', label: 'Over 5s', description: 'Runs longer than 5 seconds' }, + { value: '<1s', label: 'Under 1s', description: 'Runs shorter than 1 second' }, + { value: '>10s', label: 'Over 10s', description: 'Runs longer than 10 seconds' }, + { value: '>30s', label: 'Over 30s', description: 'Runs longer than 30 seconds' }, + { value: '<500ms', label: 'Under 0.5s', description: 'Very fast runs' }, ], }, ] @@ -225,8 +225,8 @@ export class SearchSuggestions { suggestions.push({ id: 'filter-key-executionId', value: 'executionId:', - label: 'Execution ID', - description: 'Filter by execution ID', + label: 'Run ID', + description: 'Filter by run ID', category: 'filters', }) @@ -283,7 +283,7 @@ export class SearchSuggestions { id: `filter-value-trigger-${t.value}`, value: `trigger:${t.value}`, label: t.label, - description: `${t.label}-triggered executions`, + description: `${t.label}-triggered runs`, category: 'trigger' as const, color: t.color, })) From d47d591299234fdb32fe07da6583b6dc11b33464 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Tue, 14 Apr 2026 21:42:53 -0700 Subject: [PATCH 3/5] fix(mothership): remove duplicate handleStopGeneration declaration --- apps/sim/app/workspace/[workspaceId]/home/home.tsx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/home/home.tsx b/apps/sim/app/workspace/[workspaceId]/home/home.tsx index ec053fd6ce..1687a1973d 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/home.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/home.tsx @@ -229,14 +229,6 @@ export function Home({ chatId }: HomeProps = {}) { void stopGeneration().catch(() => {}) }, [stopGeneration, workspaceId]) - const handleStopGeneration = useCallback(() => { - captureEvent(posthogRef.current, 'task_generation_aborted', { - workspace_id: workspaceId, - view: 'mothership', - }) - stopGeneration() - }, [stopGeneration, workspaceId]) - const handleSubmit = useCallback( (text: string, fileAttachments?: FileAttachmentForApi[], contexts?: ChatContext[]) => { const trimmed = text.trim() From d927db1e837b7ec2d046a4dd114cc7b9b8aaced7 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Tue, 14 Apr 2026 21:45:00 -0700 Subject: [PATCH 4/5] chore: remove verbose comment in cancel route --- .../workflows/[id]/executions/[executionId]/cancel/route.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.ts b/apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.ts index e7320f3311..889cc353dd 100644 --- a/apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.ts +++ b/apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.ts @@ -86,9 +86,6 @@ export async function POST( }) } - // For running executions, update DB directly so the UI sees 'cancelled' immediately - // instead of flashing back to 'running' before the executor finishes processing. - // Paused executions are already handled by cancelPausedExecution's transaction. if ((cancellation.durablyRecorded || locallyAborted) && !pausedCancelled) { try { await db From 3b6448f76604284215e651a8da23e7ebb44361ac Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Tue, 14 Apr 2026 21:46:43 -0700 Subject: [PATCH 5/5] =?UTF-8?q?fix(ui):=20missed=20execution=20=E2=86=92?= =?UTF-8?q?=20run=20renames=20in=20search=20suggestions=20and=20error=20fa?= =?UTF-8?q?llback?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../w/[workflowId]/utils/workflow-execution-utils.ts | 2 +- apps/sim/lib/logs/search-suggestions.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-execution-utils.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-execution-utils.ts index b1320b0f1a..e8e1fcea9a 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-execution-utils.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-execution-utils.ts @@ -652,7 +652,7 @@ export async function executeWorkflowWithFullLogging( if (!response.ok) { const error = await response.json() - const errorMessage = error.error || 'Workflow execution failed' + const errorMessage = error.error || 'Workflow run failed' addHttpErrorConsoleEntry(addConsole, { workflowId: wfId, executionId, diff --git a/apps/sim/lib/logs/search-suggestions.ts b/apps/sim/lib/logs/search-suggestions.ts index cbef8e514a..859d40ddf1 100644 --- a/apps/sim/lib/logs/search-suggestions.ts +++ b/apps/sim/lib/logs/search-suggestions.ts @@ -604,7 +604,7 @@ export class SearchSuggestions { id: `trigger-match-${trigger.value}`, value: `trigger:${trigger.value}`, label: trigger.label, - description: `${trigger.label}-triggered executions`, + description: `${trigger.label}-triggered runs`, category: 'trigger' as const, color: trigger.color, }))