Skip to content
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
shiba4life merged 1 commit into
mainfrom
kanban/ebdfd-drop-unused-schema-error-messages
May 12, 2026
Merged

refactor(constants): drop 11 unused SCHEMA_ERROR_MESSAGES keys + dead import#1012
shiba4life merged 1 commit into
mainfrom
kanban/ebdfd-drop-unused-schema-error-messages

Conversation

@shiba4life

Copy link
Copy Markdown
Collaborator

Summary

Of the 16 keys defined in SCHEMA_ERROR_MESSAGES (src/server/static-react/src/constants/redux.ts), only 5 are referenced anywhere in src/. PR #1011 explicitly flagged redux.ts:118 as orphan-suspect but left it; this finishes that cleanup.

Kept (5 used keys):

  • FETCH_FAILEDstore/schemaSlice.ts:351
  • APPROVE_FAILEDstore/schemaSlice.ts:212
  • BLOCK_FAILEDstore/schemaSlice.ts:219
  • UNLOAD_FAILEDstore/schemaSlice.ts:226
  • LOAD_FAILEDstore/schemaSlice.ts:233

Dropped (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 with git grep "SCHEMA_ERROR_MESSAGES\.<KEY>" → 0 hits.

Also drops the now-meaningless section-divider comments and a dead SCHEMA_ERROR_MESSAGES import in store/schemaSliceHelpers.ts (only SCHEMA_OPERATION_REQUIREMENTS from 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 — passes
  • npm test (vitest) — 65 files / 788 tests pass
  • git grep "SCHEMA_ERROR_MESSAGES" src/server/static-react/src — only the definition + 5 usages remain
  • CI green

… 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>
@shiba4life
shiba4life enabled auto-merge May 12, 2026 02:30
@shiba4life
shiba4life added this pull request to the merge queue May 12, 2026
Merged via the queue into main with commit e28a9d1 May 12, 2026
12 checks passed
@shiba4life
shiba4life deleted the kanban/ebdfd-drop-unused-schema-error-messages branch May 12, 2026 02:33
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