fix: clear red change-line brackets when restoring a workflow version#5285
Open
kunwp1 wants to merge 2 commits into
Open
fix: clear red change-line brackets when restoring a workflow version#5285kunwp1 wants to merge 2 commits into
kunwp1 wants to merge 2 commits into
Conversation
highlightOpVersionDiff draws red brackets on the neighbors of deleted operators, but unhighlightOpVersionDiff only reset the boundary fills of added/modified operators and never the bracket strokes. On close the brackets vanished because reloadWorkflow rebuilds the paper, but revertToVersion does not reload, so the red change line persisted after restore. Reset the deleted-neighbor brackets to transparent so they are cleared on restore as well. Fixes apache#3043 Fixes apache#3828
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5285 +/- ##
============================================
+ Coverage 49.09% 49.10% +0.01%
Complexity 2372 2372
============================================
Files 1051 1051
Lines 40344 40349 +5
Branches 4277 4281 +4
============================================
+ Hits 19805 19812 +7
+ Misses 19379 19376 -3
- Partials 1160 1161 +1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
/request-review @aglinxinyuan Can you review this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
When restoring a previous workflow version that displays a red change line (the bracket highlight drawn around the neighbors of deleted operators), the red line stayed visible after the version was restored. Versions whose diff only contained green/orange operator highlights cleared correctly.
Why it's a bug:
highlightOpVersionDiff()applies three kinds of highlight when previewing a version:path.left-boundary/stroke/path.right-boundary/stroke) on the neighbors of deleted operatorsunhighlightOpVersionDiff()only reset the boundary fills — it never reset the bracket strokes.closeParticularVersionDisplay()masked the issue because it callsreloadWorkflow(), which rebuilds the JointJS paper elements and incidentally wipes the leftover brackets.revertToVersion()does not reload the paper, so the orphaned red brackets persisted after restore.This PR makes
unhighlightOpVersionDiff()symmetric withhighlightOpVersionDiff(): it now also resets the deleted-operators' neighbor brackets back to the default transparentrgba(0,0,0,0), so the red change line is cleared on restore.Any related issues, documentation, discussions?
Fixes #3043
Fixes #3828
How was this PR tested?
Screen.Recording.2026-05-28.at.6.05.58.PM.mov
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.7)