Repository navigation
refactor(frontend): remove unused imports, modules, and state - #9538
aglinxinyuan wants to merge 3 commits into
Conversation
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9538 +/- ##
============================================
- Coverage 91.56% 91.56% -0.01%
Complexity 5157 5157
============================================
Files 1300 1300
Lines 58092 58065 -27
Branches 7615 7614 -1
============================================
- Hits 53194 53169 -25
+ Misses 2959 2957 -2
Partials 1939 1939
*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:
|
bobbai00
left a comment
There was a problem hiding this comment.
🟡 0 must-fix · 1 advisory · 1 polish: behavior-preserving cleanup; every removal checks out, with two optional nits.
Simplifications (1)
port-property-edit-frame.component.ts:28: the sibling operator property editor keeps the same redundantFormsModule(advisory, see inline)
Polish: 1 quick touch-up (see inline comments).
Verification trace
Each removal was checked for readers in templates, specs and other files at the head commit, with extra care for the standalone module imports, where a lost directive fails silently instead of breaking the build. FormsModule adds only NgModel, NgModelGroup and NgForm over ReactiveFormsModule; every <form> in the five affected templates has [formGroup], which the NgForm selector excludes, and none uses ngModel. hub-search-result.component.html has no tooltip. In the Jupyter panel, the only thing NzButtonModule still matched was ng-zorro's transition-patch directive on the two nz-icon elements, a no-op there because those icons have no CSS transition.
What changes were proposed in this PR?
Remove unused imports, redundant standalone module imports, dead helper/stub methods, unmatched SCSS rules, unused template refs, and unread component/service fields across the Angular frontend with no observable UI or runtime behavior change:
GuiConfigServiceinjection inAuthGuardService, unusedHttpClientinjection andAppSettingsimport inUserService, unusedInputimport inRegistrationRequestModalComponent, and deadcheckAffiliation/updateAffiliationmethods onStubUserService.#searchInputtemplate references inSearchBarComponent,UserDatasetComponent, andUserModelComponent, unmatched.nz-input-group/.nz-prefix-iconSCSS rules inSearchBarComponent, unusedgetUid()andUserServiceinjection inSearchResultsComponent(with itsgetUid-only unit tests), unreadisLogin/currentUidstate andUserServicesubscription inUserComputingUnitComponent(with its paired unit test), unreadisLogininLandingPageComponent(retainingcurrentUidand its assertions), unreadmapinMiniMapComponent, unreadcoeditorStatesinCoeditorPresenceService, unreadviewPort@ViewChildinConsoleFrameComponent, unusedDICT_PREFIXandofimport inPresetService, and spec-onlygetPathsUnderOrEqualDatasetFileNode(with its unit tests).FormsModulestandalone imports alongsideReactiveFormsModuleinAdminGmailComponent(and its spec),DatasetFileSelectorComponent,DatasetVersionSelectorComponent,SettingsComponent,PortPropertyEditFrameComponent, andOperatorPropertyEditFrameComponent, unusedNzTooltipModuleinHubSearchResultComponent, unusedNzButtonModuleinJupyterNotebookPanelComponent, and duplicate module imports inWarehouseActionsService,UserDatasetFileRendererComponent, andUiUdfParametersParserService.Any related issues, documentation, discussions?
Closes #9537.
How was this PR tested?
Ran in
frontend/on5202d9582b(Node 24,node .yarn/releases/yarn-4.14.1.cjs install --immutable --inline-builds):format:ci(prettier-eslint --list-differentandeslint ./src): passed.tsc --noEmit(src/tsconfig.app.jsonandsrc/tsconfig.spec.json): passed.build(production Angular AOT build): passed.test(Vitest):255suites passed (7,379passed,0failed,1pre-existing skipped in untouchedoperator-property-edit-frame.component.spec.ts).Was this PR authored or co-authored using generative AI tooling?
Generated-by: Antigravity (Gemini 4 Neon), Claude Code (Claude Opus 5.5)