Repository navigation
refactor(frontend): clean up unused config and assert helpers - #9435
Conversation
Remove unused methods and helpers that remain only referenced by their own specs: - UserConfigService.getDict() - GuiConfigService.source() - assert() in assert.ts Preserve behavioral test coverage in user-config.service.spec.ts across fetch, set, delete, login, and logout by testing observable behavior through public interfaces (specifically, that delete() only dispatches HTTP DELETE requests when the target key is present in the local cache). Closes apache#9195
|
👋 Thanks for your first contribution to Texera, @sunny-kavixo! If you're looking for a good place to start, browse issues labeled You can drive common housekeeping yourself by commenting one of these commands on its own line:
Each command must match exactly: |
Automated Reviewer SuggestionsBased on the
|
|
/request-review @aglinxinyuan |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9435 +/- ##
============================================
- Coverage 91.78% 91.78% -0.01%
Complexity 5023 5023
============================================
Files 1283 1283
Lines 56875 56871 -4
Branches 7442 7440 -2
============================================
- Hits 52205 52201 -4
Misses 2800 2800
Partials 1870 1870
*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:
|
What changes were proposed in this PR?
Clean up dead methods and helpers that remain unused in the latest upstream
mainand were only referenced by their own specs, as tracked in #9195:UserConfigService.getDict()infrontend/src/app/common/service/user/config/user-config.service.ts:user-config.service.spec.tsto preserve complete behavioral coverage across fetch, set, delete, login, and logout using observable behavior and public interfaces (verifying thatdelete()issues an HTTP DELETE request only when the target key is present in the local cache).GuiConfigService.source()infrontend/src/app/common/service/gui-config.service.ts:source(name: ConfigSource)which was superseded by memoized configuration getters (env).gui-config.service.spec.ts.assert()infrontend/src/app/common/util/assert.ts:assert()function (asTypeandisTypetype guards remain).assert.spec.ts.(Note: Per maintainer confirmation on #9195,
dictionaryChangedSubjectlanded earlier in #8817 andlocalRemoveObject/sessionRemoveObjectlanded earlier in #9256; those completed changes are untouched.)Any related issues, documentation, discussions?
Closes #9195
How was this PR tested?
All changes were thoroughly tested locally via the repository-standard test runner:
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)yarn ng test --watch=false --include=src/app/workspace/service/preset/preset.service.spec.ts(48/48 passed)yarn ng test --watch=false --include="src/app/common/**/*.spec.ts"(876/876 passed across 55 test files)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)