Skip to content

improvement(ui): rename user-facing "execution" to "run"#4176

Merged
waleedlatif1 merged 5 commits intostagingfrom
waleedlatif1/execution-to-run-rename
Apr 15, 2026
Merged

improvement(ui): rename user-facing "execution" to "run"#4176
waleedlatif1 merged 5 commits intostagingfrom
waleedlatif1/execution-to-run-rename

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Rename all user-facing "execution" language to "run" across app UI, error messages, emails, search suggestions, and docs
  • Add DB transaction to cancel route so UI sees 'cancelled' status immediately
  • Internal code (variable names, types, DB columns, API paths) unchanged

Type of Change

  • Improvement (non-breaking change)

Testing

Tested manually

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)

TheodoreSpeaks and others added 2 commits April 14, 2026 21:39
* feat(posthog): Add tracking on mothership abort (#4023)

Co-authored-by: Theodore Li <theo@sim.ai>

* 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
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 15, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 15, 2026 4:46am

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 15, 2026

PR Summary

Medium Risk
Mostly copy/label changes, but the cancel endpoint now performs a direct DB update on running logs which could affect cancellation state consistency if the conditional update is wrong or races with executor finalization.

Overview
Terminology update: Replaces user-facing references to workflow “executions” with “runs” across docs, UI labels/menus, error strings, emails, and log search suggestions (e.g., “Cancel Run”, “Run ID”, “Run failed/cancelled”, “Run logs persisted”).

Cancellation behavior: Updates POST /api/workflows/[id]/executions/[executionId]/cancel to directly set the workflowExecutionLogs row from runningcancelled (with endedAt) when cancellation is durably recorded or locally aborted, preventing the UI from briefly reverting to running; adds targeted tests for the new DB-update paths and failure tolerance.

Reviewed by Cursor Bugbot for commit 3454745. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 15, 2026

Greptile Summary

This PR renames user-facing "execution" terminology to "run" across the app UI, emails, search suggestions, and docs, and adds an optimistic DB status update in the cancel API route so the UI reflects cancelled immediately without waiting for the executor to finalize.

Two missed renames remain in the user-facing string surface: search-suggestions.ts getMatchingTriggers still emits \"${label}-triggered executions\" while its sibling getFilterValues was already updated, and workflow-execution-utils.ts line 655 still uses 'Workflow execution failed' as a fallback error shown in the console panel.

Confidence Score: 5/5

Safe to merge; all remaining findings are minor P2 copy inconsistencies with no runtime impact.

The functional change (optimistic DB cancel update) is well-guarded with a WHERE clause, a try/catch, and solid test coverage. The rename sweep is thorough with only two P2 copy misses found. No logic, security, or data-integrity issues.

apps/sim/lib/logs/search-suggestions.ts (line 607) and apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-execution-utils.ts (line 655) have leftover "execution" copy.

Important Files Changed

Filename Overview
apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.ts Adds an optimistic DB update (status → 'cancelled') after Redis/local abort succeeds, guarded by a WHERE status='running' clause and a try/catch so failures don't affect the response. Tests added and cover the new DB path well.
apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.test.ts Comprehensive test coverage for the new DB update path: verifies update is called on durably-recorded and locally-aborted cases, skipped for paused-only, and that DB failures still return success.
apps/sim/lib/logs/search-suggestions.ts Two trigger-description templates in the same file: getFilterValues (line ~287) was updated to "runs" but getMatchingTriggers (line 607) still says "executions" — a missed rename visible in search suggestion UI.
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-execution-utils.ts Most user-facing strings updated ('Run failed', 'Run Error', etc.) but the fallback on line 655 ('Workflow execution failed') was missed; it surfaces in the console panel via addHttpErrorConsoleEntry.
apps/sim/app/api/workflows/[id]/executions/[executionId]/stream/route.ts Error message strings updated from "execution" to "run" terminology; no logic changes.
apps/sim/hooks/queries/logs.ts Mutation error strings updated to "cancel run"; query key references unchanged; logic is clean.
apps/sim/components/emails/notifications/workflow-notification-email.tsx Email copy updated: "Your workflow run failed" / "View Run Log" — consistent with the renamed terminology.
apps/sim/app/workspace/[workspaceId]/logs/components/log-row-context-menu/log-row-context-menu.tsx Context menu items renamed: "Cancel Run", "Copy Run ID" — clean.
apps/sim/app/workspace/[workspaceId]/settings/components/subscription/plan-configs.ts Plan feature strings updated from "executions/min" to "runs/min" across all plan tiers.

Sequence Diagram

sequenceDiagram
    participant UI
    participant CancelAPI as Cancel API Route
    participant Redis as Redis (markExecutionCancelled)
    participant DB as Database
    participant Executor

    UI->>CancelAPI: POST /cancel
    CancelAPI->>Redis: markExecutionCancelled(executionId)
    Redis-->>CancelAPI: { durablyRecorded: true }
    CancelAPI->>DB: UPDATE SET status='cancelled' WHERE executionId=? AND status='running'
    DB-->>CancelAPI: OK (UI now sees 'cancelled' immediately)
    CancelAPI-->>UI: { success: true }
    Note over Executor: Still processing...
    Executor->>Redis: Reads cancellation flag
    Executor->>DB: Writes final 'cancelled' status
Loading

Comments Outside Diff (2)

  1. apps/sim/lib/logs/search-suggestions.ts, line 607 (link)

    P2 Missed "execution" → "run" rename

    The same trigger description appears earlier in getFilterValues (around line 287) already using "runs", but this sibling code path in getMatchingTriggers still says "executions". Users typing a trigger name in the search bar will see this stale copy.

  2. apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-execution-utils.ts, line 655 (link)

    P2 Missed "execution" → "run" rename in fallback error message

    This fallback string is surfaced to users in the console panel via addHttpErrorConsoleEntry. Every other user-visible error message in this file ('Run failed', 'Run Error', 'Run was cancelled', 'Run Cancelled') has already been updated, but this one was missed.

Reviews (1): Last reviewed commit: "fix(mothership): remove duplicate handle..." | Re-trigger Greptile

@waleedlatif1 waleedlatif1 merged commit ff71a07 into staging Apr 15, 2026
9 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/execution-to-run-rename branch April 15, 2026 04:49
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