Skip to content

Fix intermittent flicker after run from canvas, close run panel#4628

Merged
midigofrank merged 4 commits intomainfrom
after-run-click-canvas
Apr 16, 2026
Merged

Fix intermittent flicker after run from canvas, close run panel#4628
midigofrank merged 4 commits intomainfrom
after-run-click-canvas

Conversation

@taylordowns2000
Copy link
Copy Markdown
Member

@taylordowns2000 taylordowns2000 commented Apr 16, 2026

Description

This PR fixes an intermittent flicker after running from the canvas, and closes the run panel when a run is successfully triggered.

Validation steps

  1. Run lots of runs from the canvas.
  2. Note that the run visualization doesn't flicker or disappear ~10% of the time, as it used to. (Now it should flicker/disappear 0% of the 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 Core Apr 16, 2026
@taylordowns2000 taylordowns2000 marked this pull request as ready for review April 16, 2026 08:11
// This provides a safety net for components that use useRunSteps() without
// useFollowRun() - they won't get real-time step updates, but will get
// refreshed data when the run completes.
// Stale-while-revalidate: If a run has completed (reached final state)
Copy link
Copy Markdown
Member Author

@taylordowns2000 taylordowns2000 Apr 16, 2026

Choose a reason for hiding this comment

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

@doc-han , @midigofrank , this seems to be the core of it. are there side effects we should watch out for here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm thinking of the run view in the job editor. i.e when you run a workflow while in the job editor view. will check that side

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

didn't find any issues on the run viewer in the job editor

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.63%. Comparing base (1d8f156) to head (9e202e3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4628   +/-   ##
=======================================
  Coverage   89.63%   89.63%           
=======================================
  Files         444      444           
  Lines       21558    21558           
=======================================
  Hits        19323    19323           
  Misses       2235     2235           

☔ 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.

Comment on lines +452 to +458
// Close the run panel and clear the URL param so the URL→state sync
// in WorkflowEditor doesn't immediately reopen it.
const closeAfterRun = useCallback(() => {
updateSearchParams({ panel: null });
onClose();
}, [updateSearchParams, onClose]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This introduces a new weird behaviour where the run panel gets closed immediately after a run

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

that's intentional

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Aaah, okay. Didn't see this message

Copy link
Copy Markdown
Collaborator

@midigofrank midigofrank left a comment

Choose a reason for hiding this comment

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

@taylordowns2000 why are we closing the run panel after the run finishes? This is taking the user one step back, even on retry

@github-project-automation github-project-automation Bot moved this from New Issues to In review in Core Apr 16, 2026
Copy link
Copy Markdown
Collaborator

@midigofrank midigofrank left a comment

Choose a reason for hiding this comment

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

All good, didn't know this was intentional: https://github.com/OpenFn/lightning/pull/4628/changes#r3092409022

It's also fine given that this is a new user behavior, previously, it would just redirect to the history page

@midigofrank midigofrank merged commit c5d537f into main Apr 16, 2026
9 checks passed
@midigofrank midigofrank deleted the after-run-click-canvas branch April 16, 2026 10:23
@github-project-automation github-project-automation Bot moved this from In review to Done in Core Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants