This repository was archived by the owner on May 13, 2026. It is now read-only.
refactor(constants): drop 11 unused SCHEMA_ERROR_MESSAGES keys + dead import - #1012
Merged
Merged
Conversation
… import PR #1011 flagged constants/redux.ts as orphan-suspect. Of 16 keys in SCHEMA_ERROR_MESSAGES, only 5 are actually referenced (FETCH_FAILED, APPROVE_FAILED, BLOCK_FAILED, UNLOAD_FAILED, LOAD_FAILED — all from schemaSlice.ts). The other 11 keys had zero references in src/. The section-divider comments above the removed keys are dropped too since they no longer group anything. schemaSliceHelpers.ts also imported SCHEMA_ERROR_MESSAGES but never used it — only SCHEMA_OPERATION_REQUIREMENTS from the same group is in use. Inline string literals like "Schema not found" / "An unknown error occurred" elsewhere in the tree don't reference the constant, so they are unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Of the 16 keys defined in
SCHEMA_ERROR_MESSAGES(src/server/static-react/src/constants/redux.ts), only 5 are referenced anywhere insrc/. PR #1011 explicitly flaggedredux.ts:118as orphan-suspect but left it; this finishes that cleanup.Kept (5 used keys):
FETCH_FAILED—store/schemaSlice.ts:351APPROVE_FAILED—store/schemaSlice.ts:212BLOCK_FAILED—store/schemaSlice.ts:219UNLOAD_FAILED—store/schemaSlice.ts:226LOAD_FAILED—store/schemaSlice.ts:233Dropped (11 orphans):
NETWORK_ERROR,API_TIMEOUT,UNAUTHORIZED,SCHEMA_NOT_FOUND,INVALID_SCHEMA_STATE,SCHEMA_ALREADY_APPROVED,SCHEMA_ALREADY_BLOCKED,CACHE_INVALIDATION_FAILED,PERSISTENCE_ERROR,UNKNOWN_ERROR,OPERATION_CANCELLED. All verified withgit grep "SCHEMA_ERROR_MESSAGES\.<KEY>"→ 0 hits.Also drops the now-meaningless section-divider comments and a dead
SCHEMA_ERROR_MESSAGESimport instore/schemaSliceHelpers.ts(onlySCHEMA_OPERATION_REQUIREMENTSfrom that import group is actually used).Inline string literals like
"Schema not found"/"An unknown error occurred"that appear in components/tests don't reference the constant, so they're unaffected.Net diff: -23 lines (no new files, no movement).
Test plan
npm run typecheck— passesnpm test(vitest) — 65 files / 788 tests passgit grep "SCHEMA_ERROR_MESSAGES" src/server/static-react/src— only the definition + 5 usages remain