This repository was archived by the owner on May 13, 2026. It is now read-only.
refactor(constants): drop 8 dead SCHEMA_ACTION_TYPES keys + unused SchemaActionType export - #1013
Merged
Merged
Conversation
…hemaActionType export The synchronous action-type strings duplicated reducer names that Redux Toolkit's createSlice already auto-generates. None of them were referenced anywhere. Likewise SchemaActionType had no importers. Removed keys: SET_ACTIVE_SCHEMA, UPDATE_SCHEMA_STATUS, SET_LOADING, SET_ERROR, CLEAR_ERROR, CLEAR_OPERATION_ERROR, INVALIDATE_CACHE, RESET_SCHEMAS. Kept the 5 thunk types still referenced from schemaSlice.ts and SCHEMA_OPERATION_REQUIREMENTS. Follow-up explicitly carved out as OUT OF SCOPE in PR #1012.
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
Follow-up to #1012, which intentionally left this audit out of scope. The 8 synchronous keys in
SCHEMA_ACTION_TYPESand theSchemaActionTypederived type had zero references — the reducers live increateSlice({ reducers: { ... } }), where Redux Toolkit auto-generates the matching"schemas/xxx"action-type strings.Removed keys (each verified at zero refs via
git grep -n SCHEMA_ACTION_TYPES\\.<key> src/server/static-react/src):SET_ACTIVE_SCHEMAUPDATE_SCHEMA_STATUSSET_LOADINGSET_ERRORCLEAR_ERRORCLEAR_OPERATION_ERRORINVALIDATE_CACHERESET_SCHEMASAlso removed:
export type SchemaActionType(only ref was its own declaration).Kept: the 5 async-thunk keys still referenced from
store/schemaSlice.tsandSCHEMA_OPERATION_REQUIREMENTSin the same file (FETCH_SCHEMAS,APPROVE_SCHEMA,BLOCK_SCHEMA,UNLOAD_SCHEMA,LOAD_SCHEMA).Net: 1 file changed, 1 insertion, 16 deletions.
Test plan
npm run typecheckpassesnpm test— all 788 vitest tests green (schemaSlice.test.ts imports the reducer methods directly, not the dead constants)git grep "SchemaActionType" src/server/static-react/srcreturns zero hits