Skip to content
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
shiba4life merged 1 commit into
mainfrom
kanban/45a12-drop-dead-schema-action-types
May 12, 2026
Merged

refactor(constants): drop 8 dead SCHEMA_ACTION_TYPES keys + unused SchemaActionType export#1013
shiba4life merged 1 commit into
mainfrom
kanban/45a12-drop-dead-schema-action-types

Conversation

@shiba4life

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #1012, which intentionally left this audit out of scope. The 8 synchronous keys in SCHEMA_ACTION_TYPES and the SchemaActionType derived type had zero references — the reducers live in createSlice({ 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_SCHEMA
  • UPDATE_SCHEMA_STATUS
  • SET_LOADING
  • SET_ERROR
  • CLEAR_ERROR
  • CLEAR_OPERATION_ERROR
  • INVALIDATE_CACHE
  • RESET_SCHEMAS

Also removed: export type SchemaActionType (only ref was its own declaration).

Kept: the 5 async-thunk keys still referenced from store/schemaSlice.ts and SCHEMA_OPERATION_REQUIREMENTS in 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 typecheck passes
  • npm 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/src returns zero hits

…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.
@shiba4life
shiba4life enabled auto-merge May 12, 2026 03:14
@shiba4life
shiba4life added this pull request to the merge queue May 12, 2026
Merged via the queue into main with commit 00c0be4 May 12, 2026
12 checks passed
@shiba4life
shiba4life deleted the kanban/45a12-drop-dead-schema-action-types branch May 12, 2026 03:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant