Repository navigation
refactor(frontend): drop unused utils and obsolete types - #9256
Merged
aglinxinyuan merged 1 commit intoNov 2, 2026
Merged
Conversation
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 #9256 +/- ##
============================================
- Coverage 92.17% 92.17% -0.01%
Complexity 5043 5043
============================================
Files 1287 1287
Lines 55799 55788 -11
Branches 7144 7140 -4
============================================
- Hits 51434 51423 -11
Misses 2598 2598
Partials 1767 1767
*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:
|
Closed
1 task done
renovate-bot
pushed a commit
to renovate-bot/apache-_-texera
that referenced
this pull request
Nov 16, 2026
…#9435) ### What changes were proposed in this PR? Clean up dead methods and helpers that remain unused in the latest upstream `main` and were only referenced by their own specs, as tracked in apache#9195: 1. **`UserConfigService.getDict()`** in `frontend/src/app/common/service/user/config/user-config.service.ts`: - Removed the unread dictionary getter. - Refactored `user-config.service.spec.ts` to preserve complete behavioral coverage across fetch, set, delete, login, and logout using observable behavior and public interfaces (verifying that `delete()` issues an HTTP DELETE request only when the target key is present in the local cache). 2. **`GuiConfigService.source()`** in `frontend/src/app/common/service/gui-config.service.ts`: - Removed uncalled `source(name: ConfigSource)` which was superseded by memoized configuration getters (`env`). - Removed corresponding unit tests in `gui-config.service.spec.ts`. 3. **`assert()`** in `frontend/src/app/common/util/assert.ts`: - Removed uncalled `assert()` function (`asType` and `isType` type guards remain). - Removed corresponding unit tests in `assert.spec.ts`. *(Note: Per maintainer confirmation on apache#9195, `dictionaryChangedSubject` landed earlier in apache#8817 and `localRemoveObject`/`sessionRemoveObject` landed earlier in apache#9256; those completed changes are untouched.)* ### Any related issues, documentation, discussions? Closes apache#9195 ### How was this PR tested? All changes were thoroughly tested locally via the repository-standard test runner: 1. **Affected Spec Files:** - `yarn ng test --watch=false --include=src/app/common/util/assert.spec.ts` (6/6 passed) - `yarn ng test --watch=false --include=src/app/common/service/gui-config.service.spec.ts` (12/12 passed) - `yarn ng test --watch=false --include=src/app/common/service/user/config/user-config.service.spec.ts` (20/20 passed) 2. **Dependent / Downstream Spec Files:** - `yarn ng test --watch=false --include=src/app/workspace/service/preset/preset.service.spec.ts` (48/48 passed) 3. **Common Suite:** - `yarn ng test --watch=false --include="src/app/common/**/*.spec.ts"` (876/876 passed across 55 test files) 4. **Code Quality, Type-Checking, and Build:** - `yarn tsc --noEmit` (Passed with 0 errors) - `yarn tsc -p src/tsconfig.app.json --noEmit && yarn tsc -p src/tsconfig.spec.json --noEmit` (Passed with 0 errors) - `yarn format:ci` (Passed cleanly) - `yarn lint` (Passed with 0 errors) - `yarn build` (Production frontend build succeeded) - `git diff --check` (Clean) ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Antigravity IDE (Gemini 3.8 Flash)
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?
Removes unreferenced utility functions, dead assertions, and obsolete websocket types in rontend:
onNull (-101 lines prod + spec) with zero callers across the repository.
+3/-232 lines across 7 files. Pure refactoring with no behavior change.
Any related issues, documentation, discussions?
Closes #9255.
How was this PR tested?
�ash yarn prettier --check src/app/common/util/storage.ts src/app/common/util/storage.spec.ts src/app/common/util/assert.ts src/app/common/util/assert.spec.ts src/app/common/service/workflow-persist/stub-workflow-persist.service.ts src/app/workspace/types/workflow-websocket.interface.ts�ash yarn ng test --watch=false --include=src/app/common/util/storage.spec.ts --include=src/app/common/util/assert.spec.tsWas this PR authored or co-authored using generative AI tooling?
Generated-by: Antigravity 2.0