Skip to content

Conversation

@midigofrank
Copy link
Collaborator

@midigofrank midigofrank commented Jan 16, 2026

Description

This PR ensures that steps in a workflow are highlighted in realtime as the steps are updated

Closes #4261

Validation steps

  1. Create a workflow with 2 steps
  2. Have them timeout after some seconds apart (there is a snippet in Step events aren't appearing on canvas #4261)
  3. Open the IDE with the first job and start a run
  4. Close the run and observe the steps get highlighted one at a time.

AI Usage

Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

Pre-submission checklist

  • I have performed an AI review of my code (we recommend using /review
    with Claude Code)
  • I have implemented and tested all related authorization policies.
    (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

@github-project-automation github-project-automation bot moved this to New Issues in v2 Jan 16, 2026
@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.36%. Comparing base (549de66) to head (232e7d4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4326      +/-   ##
==========================================
+ Coverage   89.29%   89.36%   +0.06%     
==========================================
  Files         425      425              
  Lines       19994    19994              
==========================================
+ Hits        17854    17867      +13     
+ Misses       2140     2127      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Replaces manual field mapping with a reusable toStep() helper to
reduce code duplication and improve type safety when converting
step-like objects (StepDetail, RunDetail.steps) to the Step type
used in the cache.

Also adds missing TypeScript interface definitions for test helper
methods introduced in the race condition fix.
@midigofrank midigofrank self-assigned this Jan 16, 2026
@midigofrank midigofrank marked this pull request as ready for review January 16, 2026 12:47
Copy link
Collaborator

@lmac-1 lmac-1 left a comment

Choose a reason for hiding this comment

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

Haven't looked too much at the code yet but I'm not seeing this working as expected:

https://www.loom.com/share/88e0eab1345e4f60a457577fbca49e0d

  1. Success formatting at the end sometimes not coming through
  2. Result of each step doesn't seem to be streaming in

@github-project-automation github-project-automation bot moved this from New Issues to In review in v2 Jan 21, 2026
@midigofrank
Copy link
Collaborator Author

Aaah, good catch @lmac-1

- Add useFollowRun call in diagram to subscribe to run channel
- Remove cache invalidation on history_updated events
- Parse initial run data during store creation to fix race condition
- Update documentation to clarify history vs run step channel separation

This allows step highlights to update incrementally as steps execute,
rather than invalidating the entire cache on run updates.
- Add fallback cache invalidation when runs reach final state
- Fix input_dataclip_id type to allow null values
- Remove unnecessary non-null assertion in toStep mapper
- Ensure components get refreshed data when runs complete
Add _viewRun method to history store mock to fix test failures
caused by missing method called in useHistory hook.
@midigofrank midigofrank requested a review from lmac-1 January 27, 2026 07:49
@midigofrank
Copy link
Collaborator Author

Hey @lmac-1, I have fixed the issue and requested for another review

@lmac-1
Copy link
Collaborator

lmac-1 commented Jan 27, 2026

Thanks @midigofrank. Sorry I didn't quite manage a full review today. I have clicked through and given it a test locally and can confirm it's working now.

I won't be able to look into the code properly until tomorrow after my 1-1 with Roina. Feel free to reassign the review if this is too late. Thanks!

@midigofrank
Copy link
Collaborator Author

No worries @lmac-1 . @doc-han what say you? Do you wanna build a snowman?

@lmac-1
Copy link
Collaborator

lmac-1 commented Jan 28, 2026

@midigofrank reviewing now 😊

@lmac-1
Copy link
Collaborator

lmac-1 commented Jan 28, 2026

Sorry for the to-ing and fro-ing on this one. I need to organise some things before my flight so won't be able to review this properly. I thought I had time but time is quite tight to pack and sort stuff. @doc-han are you able to review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Step events aren't appearing on canvas

4 participants