kunwp1 opened a new pull request, #5285: URL: https://github.com/apache/texera/pull/5285
## Problem When restoring a previous workflow version that shows a **red change line** (the bracket highlight drawn around the neighbors of deleted operators), the red line remains visible after the version is restored. Versions whose diff only contains green/orange operator highlights work fine. Fixes #3043 Fixes #3828 ## Root cause `highlightOpVersionDiff()` applies three kinds of highlight when previewing a version: - orange boundary **fill** on modified operators - green boundary **fill** on added operators - **red bracket strokes** (`path.left-boundary/stroke` / `path.right-boundary/stroke`) on the neighbors of *deleted* operators `unhighlightOpVersionDiff()` only reset the boundary fills — it never reset the bracket strokes. `closeParticularVersionDisplay()` masked this because it calls `reloadWorkflow()`, 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. ## Fix Made `unhighlightOpVersionDiff()` symmetric with `highlightOpVersionDiff()`: it now also resets the deleted-operators' neighbor brackets back to the default transparent `rgba(0,0,0,0)`. ## Tests - Added a unit test (written failing first, then made to pass) verifying `unhighlightOpVersionDiff` clears the left/right brackets around neighbors of deleted operators. - Full `workflow-version.service.spec.ts` suite passes (29/29). - Manually verified in the UI that the red change line clears after restoring. --- *This change was developed with AI assistance (Claude Code).* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
