refactor(frontend): remove two pieces of unreachable code - #7512
refactor(frontend): remove two pieces of unreachable code#7512Raja-Hamid wants to merge 2 commits into
Conversation
Both branches were shown by mutation testing to have no observable effect: each mutation survived while the surrounding behaviour was under test. - hugging-face-image-upload: the "Selected image" fallback rendered inside *ngIf="previewSrc", which is non-empty only when hasImage is true, and displayFileName already returns "Uploaded image" in exactly that case, so the right-hand side of the || could never be evaluated. - drag-drop: the !jointLink guard was subsumed by the !linkView guard that follows it, since paper.findViewByModel(undefined) returns undefined rather than throwing. Regression tests pin both behaviours -- the rendered preview label, and skipping a link that exists in the Texera graph but has no model in the JointJS paper -- and stay green across the removals. Closes apache#7459
|
👋 Thanks for opening this pull request, @Raja-Hamid! It looks like the pull request description doesn't quite follow our template yet:
Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed. You can find the template prompts by editing the description, or see CONTRIBUTING.md for the full contribution flow. |
Automated Reviewer SuggestionsBased on the
|
|
Hey @aglinxinyuan, Need your review on this. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7512 +/- ##
============================================
+ Coverage 86.38% 86.40% +0.01%
Complexity 4211 4211
============================================
Files 1169 1169
Lines 46750 46748 -2
Branches 5203 5201 -2
============================================
+ Hits 40387 40391 +4
+ Misses 4641 4635 -6
Partials 1722 1722
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
@Raja-Hamid please address this comment. |
What changes were proposed in this PR?
Removes two pieces of unreachable code, each surfaced by a surviving mutation — i.e. each was demonstrated to have no observable effect, not merely suspected. No user-facing behavior changes, hence
refactor.1.
hugging-face-image-upload.component.html— an unreachable fallback