Fix intermittent flicker after run from canvas, close run panel#4628
Fix intermittent flicker after run from canvas, close run panel#4628midigofrank merged 4 commits intomainfrom
Conversation
| // 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) |
There was a problem hiding this comment.
@doc-han , @midigofrank , this seems to be the core of it. are there side effects we should watch out for here?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
didn't find any issues on the run viewer in the job editor
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
| // 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]); | ||
|
|
There was a problem hiding this comment.
This introduces a new weird behaviour where the run panel gets closed immediately after a run
There was a problem hiding this comment.
that's intentional
There was a problem hiding this comment.
Aaah, okay. Didn't see this message
midigofrank
left a comment
There was a problem hiding this comment.
@taylordowns2000 why are we closing the run panel after the run finishes? This is taking the user one step back, even on retry
midigofrank
left a comment
There was a problem hiding this comment.
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
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
AI Usage
Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):
You can read more details in our
Responsible AI Policy
Pre-submission checklist
/reviewwith Claude Code)
(e.g.,
:owner,:admin,:editor,:viewer)