Repository navigation
refactor(frontend): remove unused preset wrapper state - #9382
Merged
aglinxinyuan merged 5 commits intoNov 10, 2026
Merged
aglinxinyuan merged 5 commits into
aglinxinyuan merged 5 commits into
Conversation
The wrapper never enables its search filter, and basePreset has no live reader. Keep the existing dropdown refresh, preset actions and initialization validation while removing that unused state and its subscriptions.
Contributor
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9382 +/- ##
============================================
+ Coverage 91.81% 91.87% +0.05%
+ Complexity 5019 4968 -51
============================================
Files 1277 1280 +3
Lines 56369 56037 -332
Branches 7364 7293 -71
============================================
- Hits 51755 51482 -273
+ Misses 2759 2729 -30
+ Partials 1855 1826 -29
*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:
|
kunwp1
approved these changes
Nov 9, 2026
Reject a field without parent.fieldGroup in the init guard, with a message, instead of through the discarded filterPresetFromForm() call. Type searchResults as readonly Preset[] so both refreshes assign the fetched arrays directly, drop the constant nzVisible binding, and remove the spec cases that could no longer fail together with the stub's unused applyPresetStream.
aglinxinyuan
enabled auto-merge
November 10, 2026 02:27
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?
Remove the preset wrapper's write-only base state, unused typing subscription, unreachable search branch, constant menu flag with its
nzVisiblebinding, and unused template index. Opening and save events still refresh the preset list, which is now areadonly Preset[]holding the arrays the service emits rather than copies of them; apply/save/delete behavior is preserved. A field withoutparent.fieldGroupis still rejected at initialization, now by the guard with a message, before the preset fetch subscribes, instead of by aTypeErrorfrom a discardedfilterPresetFromForm()call. +18/−196 lines.The menu flag has never been enabled by production code, and the base state has no live reader. Both were introduced in #1164 on January 13, 2022.
Any related issues, documentation, discussions?
Closes #9379.
How was this PR tested?
From
frontend/:350 passed; one existing skipped case. Removing the
parent.fieldGroupcheck from the guard fails only its initialization test.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Codex (GPT-6), Claude Code (Claude Opus 5.5)