Skip to content

Conversation

@emir-karabeg
Copy link
Collaborator

Summary

Run path workflow block and edges.

Type of Change

  • New feature

Testing

Solo testing.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • 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 Nov 15, 2025

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

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Nov 15, 2025 7:26am

@emir-karabeg emir-karabeg merged commit 4bd0f31 into staging Nov 15, 2025
4 checks passed
@emir-karabeg emir-karabeg deleted the improvement/run-path branch November 15, 2025 07:27
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 15, 2025

Greptile Overview

Greptile Summary

This PR implements visual run-path tracking for workflow execution by highlighting blocks and edges that were traversed during the last run.

Key Changes

  • Extracted block ring styling logic into dedicated utility file (block-ring-utils.ts) following separation of concerns
  • Added edge run status tracking to execution store with new lastRunEdges map
  • Edges are marked as traversed when blocks start executing, showing visual feedback for the execution path
  • Updated ring animation from opacity-based to box-shadow expansion (1.5px → 4px) for better visibility
  • Active blocks now show thicker (3.5px) pulsing ring using new --border-success CSS variable
  • Disabled blocks preserve their text color when runPathStatus === 'success'

Style Guide Consideration

  • The globals.css changes (adding --border-success variables) should be reconsidered per the style guide preference for local component styles

Confidence Score: 4/5

  • This PR is safe to merge with one minor style guide consideration
  • The implementation is solid with proper TypeScript, good separation of concerns, and comprehensive state management. The code correctly tracks edges and blocks during execution. The only concern is the globals.css modification which violates the style guide's preference for local component styles, though this is a non-critical style consideration.
  • Pay attention to apps/sim/app/globals.css - consider moving CSS variables to Tailwind config or local styles

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/app/globals.css 3/5 Removed animation keyframes and added new CSS variables (--border-success) for light/dark themes. Violates style guide requiring minimal global CSS changes.
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/block-ring-utils.ts 5/5 New utility file extracting ring styling logic from component. Follows architecture patterns with proper TypeScript interfaces and TSDoc.
apps/sim/stores/execution/store.ts 5/5 Implemented setEdgeRunStatus action and updated clearRunPath to reset both blocks and edges. Properly clears on execution start.
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution.ts 5/5 Tracks incoming edges when blocks start executing. Marks edges as successful immediately on block start.
apps/sim/tailwind.config.ts 5/5 Updated ring-pulse animation to use box-shadow with variable ring thickness (1.5px to 4px) instead of opacity changes.

Sequence Diagram

sequenceDiagram
    participant User
    participant ExecutionHook as useWorkflowExecution
    participant ExecutionStore as Execution Store
    participant BlockCore as useBlockCore
    participant WorkflowBlock as WorkflowBlock Component
    participant WorkflowEdge as WorkflowEdge Component

    User->>ExecutionHook: Start workflow execution
    ExecutionHook->>ExecutionStore: setIsExecuting(true)
    ExecutionStore->>ExecutionStore: Clear lastRunPath & lastRunEdges

    ExecutionHook->>ExecutionHook: onBlockStarted callback
    ExecutionHook->>ExecutionStore: setActiveBlocks(blockId)
    ExecutionHook->>ExecutionHook: Filter incoming edges to block
    loop For each incoming edge
        ExecutionHook->>ExecutionStore: setEdgeRunStatus(edgeId, 'success')
    end

    ExecutionStore->>WorkflowEdge: Provide lastRunEdges map
    WorkflowEdge->>WorkflowEdge: Check edgeRunStatus from map
    WorkflowEdge->>WorkflowEdge: Apply success/error color

    ExecutionStore->>BlockCore: Provide runPathStatus
    BlockCore->>BlockCore: Call getBlockRingStyles()
    BlockCore->>WorkflowBlock: Return ring styles & runPathStatus
    WorkflowBlock->>WorkflowBlock: Apply ring animation (3.5px pulsing)
    WorkflowBlock->>WorkflowBlock: Preserve text color if runPathStatus === 'success'

    ExecutionHook->>ExecutionHook: onBlockCompleted callback
    ExecutionHook->>ExecutionStore: setActiveBlocks(remove blockId)
    ExecutionHook->>ExecutionStore: setBlockRunStatus(blockId, 'success')

    Note over WorkflowBlock,WorkflowEdge: Visual indicators persist after execution<br/>showing the path taken through workflow
Loading

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.

10 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines 111 to +114
--border-strong: #d1d1d1;
--divider: #e5e5e5;
--border-muted: #eeeeee;
--border-success: #d5d5d5;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Adding CSS variables to globals.css violates the style guide which states "You should not update the global styles unless it is absolutely necessary." Consider defining --border-success in the Tailwind config or in local component styles instead.

Context Used: Context from dashboard - Avoid editing the globals.css file unless absolutely necessary. Move style changes to local componen... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/globals.css
Line: 111:114

Comment:
**style:** Adding CSS variables to `globals.css` violates the style guide which states "You should not update the global styles unless it is absolutely necessary." Consider defining `--border-success` in the Tailwind config or in local component styles instead.

**Context Used:** Context from `dashboard` - Avoid editing the globals.css file unless absolutely necessary. Move style changes to local componen... ([source](https://app.greptile.com/review/custom-context?memory=c3b5e4b0-6580-4307-83aa-ba28f105b3c4))

How can I resolve this? If you propose a fix, please make it concise.

waleedlatif1 added a commit that referenced this pull request Nov 17, 2025
* test(pr): hackathon (#1999)

* test(pr): github trigger (#2000)

* fix(usage-indicator): conditional rendering, upgrade, and ui/ux (#2001)

* fix: usage-limit indicator and render conditonally on is billing enabled

* fix: upgrade render

* fix(notes): fix notes, tighten spacing, update deprecated zustand function, update use mention data to ignore block positon (#2002)

* fix(pdfs): use unpdf instead of pdf-parse (#2004)

* fix(modals): fix z-index for various modals and output selector and variables (#2005)

* fix(condition): treat condition input the same as the code subblock (#2006)

* feat(models): added gpt-5.1 (#2007)

* improvement: runpath edges, blocks, active (#2008)

* feat(i18n): update translations (#2009)

* fix(triggers): check triggermode and consolidate block type (#2011)

* fix(triggers): disabled trigger shouldn't be added to dag (#2012)

* Fix disabled blocks

* Comments

* Fix api/chat trigger not found message

* fix(tags): only show start block upstream if is ancestor (#2013)

* fix(variables): Fix resolution on double < (#2016)

* Fix variable <>

* Ling

* Clean

* feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect (#2015)

* feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect

* fix build

* ack PR comments

* feat(performance): added reactquery hooks for workflow operations, for logs, fixed logs reloading, fix subscription UI (#2017)

* feat(performance): added reactquery hooks for workflow operations, for logs, fixed logs reloading, fix subscription UI

* use useInfiniteQuery for logs fetching

* fix(copilot): run workflow supports input format and fix run id (#2018)

* fix(router): fix error edge in router block + fix source handle problem (#2019)

* Fix router block error port handling

* Remove comment

* Fix edge execution

* improvement: code subblock, action bar, connections (#2024)

* improvement: action bar, connections

* fix: code block draggable resize

* fix(response): fix response block http format (#2027)

* Fix response block

* Lint

* fix(notes): fix notes block spacing, additional logs for billing transfer route (#2029)

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
Sg312 added a commit that referenced this pull request Nov 21, 2025
* Edit workflow returns workflow

* Condense workflkow conosle

* Limit console results to 2

* mark checkoff v1

* Mark and checkoff todo

* Fixes

* Plan mode

* fix agent output

* broken

* Fixes

* Fix diff mode persist

* Fix diff coloring

* Undo/redo

* Checkpoint udno redo

* fix(templates): fix templates details page (#1942)

* Fix template details

* Fix deps

* fix(templates-details): restore approval feature, and keep details UI consistent, smoothen out creation of profile (#1943)

* fix(templates): view current ui

* update UI to be less cluttered

* make state management for creating user profile smoother

* fix autoselect logic

* fix lint

* fix(landing): need to propagate landing page copilot prompt (#1944)

* fix(wand): subblocks should not be overwritten after wand gen (#1946)

* fix(settings): fix broken api keys, help modal, logs, workflow renaming (#1945)

* fix(settings): fix broken api keys, help modal, logs, workflow renaming

* fix build

* cleanup

* use emcn

* fix(files): changed file input value sample from string -> object (#1947)

* improvement: usage-indicator UI (#1948)

* fix(deploy): fix button (#1949)

* fix(executor): consolidate execution hooks (#1950)

* fix(autoconnect): should check if triggermode is set from the toolbar drag event directly (#1951)

* improvement: templates styling (#1952)

* improvement: template use button (#1954)

* feat(newgifs): added new gifs (#1953)

* new gifs

* changed wording

* changed wording

* lowercase

* changed wording

* remove blog stuff

---------

Co-authored-by: aadamgough <adam@sim.ai>
Co-authored-by: waleed <walif6@gmail.com>

* feat(drizzle): added ods for analytics from drizzle (#1956)

* feat(drizzle): added ods for analytics from drizzle

* clean

* fix(sheets): file selector had incorrect provider (#1958)

* feat(docs): added docs analytics drizzle ods (#1957)

* feat(docs): added docs analytics drizzle ods

* fix build

* fix provider for docs selector (#1959)

* fix(custom-tools): updates to legacy + copilot generated custom tools  (#1960)

* fix(custom-tools): updates to existing tools

* don't reorder custom tools in modal based on edit time

* restructure custom tools to persist copilot generated tools

* fix tests

* fix(slack): remove update message incorrect canonical param (#1964)

* fix(slack): send message tool

* add logging

* add more logs

* add more logs

* fix canonical param

* improvement(templates): add share button, serve public templates routes for unauthenticated users and workspace one for authenticated users, improve settings style and organization (#1962)

* improvement(templates): add share button, serve public templates routes for unauthenticated users and workspace one for authenticated users, improve settings style and organization

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>

* fix(onedrive): incorrect canonical param (#1966)

* fix(onedrive): incorrect canonical param

* fix download file

* fix

* fix

* Revert "fix"

This reverts commit f68ccd7.

* Revert "fix"

This reverts commit f3d8ace.

* fix(executor): streaming after tool calls (#1963)

* Provider changes

* Fix lint

* fix(code): readd wand to code subblock (#1969)

* fix(cmd-k): z-index + reoder tools, triggers (#1970)

* fix(cmd-k): z-index + reoder tools, triggers

* fix more z-index styling

* fix(executor): streaming response format (#1972)

* fix(workflow-block): fix redeploy header to not repeatedly show redeploy when redeploy is not necessary (#1973)

* fix(workflow-block): fix redeploy header to not repeatedly show redeploy when redeploy is not necessary

* cleanup

* improvement(platform): chat, emcn, terminal, usage-limit (#1974)

* improvement(usage-indicator): layout

* improvement: expand default terminal height

* fix: swap workflow block ports

* improvement: chat initial positioning

* improvement(chat): display; improvement(emcn): popover attributes

* fix lint

* feat(settings): added reactquery for settings, removed zustand stores, added apollo, added workflow block selector dropdown search, added add environment variable option to empty env var dropdown (#1971)

* feat(settings): added reactquery for settings, removed zustand stores, added apollo, added workflow block selector dropdown search, added add environment variable option to empty env var dropdown

* fix delete dialog for copilot keys

* simplify combobox

* fix more z indices

* consolidated duplicate hooks

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>

* fix(copilot-subflows): copilot-added subflows id mismatch (#1977)

* feat(i18n): update translations (#1978)

* feat(i18n): update translations

* fix build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* fix(logs): show block inputs (#1979)

* Fix executor lgos block inputs

* Fix Comment

* fix(onedrive): parse array values correctly (#1981)

* fix(onedrive): parse array values correctly

* fix onedrive

* fix

* fix onedrive input parsing by reusing code subblock

* fix type

* feat(files): add presigned URL generation support for execution files (#1980)

* fix(popovers): billed account + async example command (#1982)

* fix(settings): update usage data in settings > subs to use reactquery hooks (#1983)

* fix(settings): update usage data in settings > subs to use reactquery hooks

* standardize usage pills calculation

* fix(output-selector): z-index in chat deploy modal (#1984)

* improvement(logs): improved logs search (#1985)

* improvement(logs): improved logs search

* more

* ack PR comments

* feat(slack): added slack full message object in response (#1987)

* feat(slack): add better error messages, reminder to add bot to app (#1990)

* feat(i18n): update translations (#1989)

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* fix(landing): hero stripe icon (#1988)

* Temp

* Update

* Update

* Update

* Progress

* Diff store fixes

* simplify sockets ops for diff store

* Search patterns tool

* Better tool calls

* Fix sanitizationg

* Context window display

* fix(variables): fix double stringification (#1991)

* improvement(variables): support dot notation for nested objects (#1992)

* improvement(tanstack): migrate multiple stores (#1994)

* improvement(tanstack): migrate folders, knowledge to tanstack

* fix types

* fix(folders): duplicate (#1996)

* fix(variables): fix variables block json resolution (#1997)

* Improvement(ui/ux): signup, command-list, cursors, search modal, workflow runs, usage indicator (#1998)

* improvement: signup loading, command-list, cursors, search modal ordering

* improvement: workflow runs, search modal

* improvement(usage-indicator): ui/ux

* test(pr): hackathon (#1999)

* test(pr): github trigger (#2000)

* fix(usage-indicator): conditional rendering, upgrade, and ui/ux (#2001)

* fix: usage-limit indicator and render conditonally on is billing enabled

* fix: upgrade render

* fix(notes): fix notes, tighten spacing, update deprecated zustand function, update use mention data to ignore block positon (#2002)

* fix(pdfs): use unpdf instead of pdf-parse (#2004)

* fix(modals): fix z-index for various modals and output selector and variables (#2005)

* fix(condition): treat condition input the same as the code subblock (#2006)

* feat(models): added gpt-5.1 (#2007)

* improvement: runpath edges, blocks, active (#2008)

* feat(i18n): update translations (#2009)

* fix(triggers): check triggermode and consolidate block type (#2011)

* fix(triggers): disabled trigger shouldn't be added to dag (#2012)

* Fix disabled blocks

* Comments

* Fix api/chat trigger not found message

* fix(tags): only show start block upstream if is ancestor (#2013)

* fix(variables): Fix resolution on double < (#2016)

* Fix variable <>

* Ling

* Clean

* feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect (#2015)

* feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect

* fix build

* ack PR comments

* feat(performance): added reactquery hooks for workflow operations, for logs, fixed logs reloading, fix subscription UI (#2017)

* feat(performance): added reactquery hooks for workflow operations, for logs, fixed logs reloading, fix subscription UI

* use useInfiniteQuery for logs fetching

* fix(copilot): run workflow supports input format and fix run id (#2018)

* fix(router): fix error edge in router block + fix source handle problem (#2019)

* Fix router block error port handling

* Remove comment

* Fix edge execution

* improvement: code subblock, action bar, connections (#2024)

* improvement: action bar, connections

* fix: code block draggable resize

* fix(response): fix response block http format (#2027)

* Fix response block

* Lint

* fix(notes): fix notes block spacing, additional logs for billing transfer route (#2029)

* fix(usage-data): refetch on usage limit update in settings (#2032)

* fix(overage): fix pill calculation in the usage indicator to be consistent across views (#2034)

* fix(workflows): fixed workflow loading in without start block, added templates RQ hook, cleaned up unused templates code (#2035)

* fix(triggers): dedup + not surfacing deployment status log (#2033)

* fix(triggers): dedup + not surfacing deployment status log

* fix ms teams

* change to microsoftteams

* Revert "change to microsoftteams"

This reverts commit 217f808.

* fix

* fix

* fix provider name

* fix oauth for msteams

* improvement(undo-redo): expand undo-redo store to store 100 ops instead of 15 (#2036)

* improvement(undo-redo): expand undo-redo store to store 100 ops instead of 15

* prevent undo-redo from interfering with subblock browser text undo

* improvement(docs): remove copy page from mobile view on docs (#2037)

* improvement(docs): remove copy page from mobile view on docs

* bring title and pagenav lower on mobile

* added cursor pointer to clickable components in docs

* fix(workflow-block): clearing child workflow input format field must lazy cascade parent workflow state deletion (#2038)

* Error tools

* Ui tools

* Navigate ui tool

* Combine env vars and oauth tools

* Plan mode section

* Plan mode v1

* Plan mode v1

* Plan mode improvements

* Build plan button

* Make workflow plan editable

* Tool improvements

* Fix build plan button

* Lint

* Fix

* Fix lint

* Fix plan

* Remove migrations

* fix undo/redo settling of ops

* Add migratinos back

* Smoothen out diff store

* Hide plan mode

* Fix lint

* Edit run workflow params

* Fix lint

* Fix tests

* Fix typing

* Fix build errors and lint

* Fix build

* Fix tests

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: aadamgough <adam@sim.ai>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
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