The GitHub Actions job "Required Checks" on texera.git/main has failed. Run started by GitHub user github-merge-queue[bot] (triggered by github-merge-queue[bot]).
Head commit for run: 7daf8d78415d5f40fc017678738ce57b137065c5 / Prateek Ganigi <[email protected]> refactor(frontend): make redundant operator border repaints a no-op (#6927) ### What changes were proposed in this PR? When an operator is added, its border was painted by two paths - the operator-add restore and the validation pass, producing the same color. Harmless, but a redundant repaint. This PR adds a guarded border setter (`paintOperatorBorder`) in `JointUIService` that writes `rect.body/stroke` only when the color actually changes. Both `changeOperatorColor` and `changeOperatorState` route their border write through it, so a repaint with the color the border already has becomes a no-op, effectively "painted once" - including on the navigation-return (reload) path. **Deviation from the approach suggested on the issue:** the issue suggested dropping the `applyOperatorBorder` call from the operator-add handler and letting the validation pass set the border. I kept that call and used the guard instead, because `changeOperatorStatistics` already paints the border via `changeOperatorState` *without* checking validity. Dropping `applyOperatorBorder` would make an invalid operator with a cached "completed" status rely on the validation pass firing afterward to correct green→red, reintroducing the order-dependent border fragility that #5146 removed (and it would break in the edge case where `setDynamicSchema` skips its emit because the schema is unchanged). The guard reaches the same no-redundant-repaint goal while keeping the border validity-correct regardless of event timing. ### Any related issues, documentation, discussions? Part of #5726 ### How was this PR tested? Unit tests: - `JointUIService`: the guarded setter skips the write when the border is already the requested color, and writes when it differs. - `WorkflowEditorComponent`: added a navigation-return test for a cached **Running** operator (orange), alongside the existing completed (green), default (gray), invalid (red), and invalid-over-cached-priority cases. - Full frontend suite: 3739 passing. Manual (navigated away from a running workflow and back), border restored correctly for: - Completed operators → green - Running operators → orange - Invalid operators → red - Valid, not run → default gray ### Was this PR authored or co-authored using generative AI tooling? This PR was co-authored using Claude Code (Anthropic Claude Opus 4.7) in compliance with ASF. Report URL: https://github.com/apache/texera/actions/runs/31630884042 With regards, GitHub Actions via GitBox
