Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.

refactor(constants): drop 2 dead SchemaState type aliases - #1016

Merged
shiba4life merged 1 commit into
mainfrom
kanban/a48f3-dead-schemastate
May 12, 2026
Merged

refactor(constants): drop 2 dead SchemaState type aliases#1016
shiba4life merged 1 commit into
mainfrom
kanban/a48f3-dead-schemastate

Conversation

@shiba4life

Copy link
Copy Markdown
Collaborator

Summary

Pure-deletion of two zero-consumer SchemaState type aliases in constants/. Continues the dead-export audit from #1014 and #1015.

Both aliases are dead — verified at base 9f65e5b:

$ git grep -nE "import .*SchemaState.* from ['\"](.+)/constants/(api|schemas)" -- src/server/static-react/
(0 hits)

The canonical SchemaState type lives in src/types/schema.ts:38, which is what src/api/clients/schemaClient.ts:7 imports.

Changes

  • src/server/static-react/src/constants/api.ts (was lines 152–153) — banner comment + dead export type SchemaState = (typeof SCHEMA_STATES)[keyof typeof SCHEMA_STATES];. The SCHEMA_STATES value re-export on lines 134–136 stays untouched (consumed by mutationClient.ts, schemaClient.ts, api/index.ts).
  • src/server/static-react/src/constants/schemas.ts (was line 14) — dead alias of the same shape. The SCHEMA_STATES const and RANGE_SCHEMA_CONFIG stay untouched.

Net: 2 files, 6 deletions, 0 additions.

Verify

  • npm run typecheck
  • npm test ✅ (788 / 788)
  • npm run lint — 1 pre-existing error in QueryForm.tsx, not introduced here

Test plan

  • Typecheck passes
  • Vitest suite green
  • git grep -nE "^export type SchemaState =" -- src/server/static-react/src/constants/ returns 0 hits
  • SCHEMA_STATES / RANGE_SCHEMA_CONFIG still live (grep + typecheck)

Both aliases are zero-consumer — verified by `git grep` against
origin/main 9f65e5b. The canonical `SchemaState` type lives in
`src/types/schema.ts:38`, which is what `schemaClient.ts:7`
imports. The two deleted aliases were duplicate re-derivations
nobody imported from `constants/*`.

- constants/api.ts:152-153 — banner comment + dead alias (the
  `SCHEMA_STATES` value re-export on lines 134-136 stays live).
- constants/schemas.ts:14 — dead alias (the `SCHEMA_STATES` value
  and `RANGE_SCHEMA_CONFIG` stay live).

Follow-up to the constants/ cleanup pattern in #1014 and #1015.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@shiba4life
shiba4life enabled auto-merge May 12, 2026 07:07
@shiba4life
shiba4life added this pull request to the merge queue May 12, 2026
Merged via the queue into main with commit 006bd27 May 12, 2026
12 checks passed
@shiba4life
shiba4life deleted the kanban/a48f3-dead-schemastate branch May 12, 2026 07:09
github-merge-queue Bot pushed a commit that referenced this pull request May 12, 2026
SchemaCacheMeta and DefaultSchemaState are used only inside redux.ts
(as the type of the `cache` field and the annotation on DEFAULT_SCHEMA_STATE,
respectively); the constants barrel doesn't re-export them.

Continues the dead-export audit pattern from PRs #1014, #1015, #1016, #1017,
and #1018. Interfaces are preserved as file-local typing.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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