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

refactor(constants/ui): drop dead SidebarItem + SIDEBAR_ITEMS - #1017

Merged
shiba4life merged 1 commit into
mainfrom
drop-dead-sidebar-constants
May 12, 2026
Merged

refactor(constants/ui): drop dead SidebarItem + SIDEBAR_ITEMS#1017
shiba4life merged 1 commit into
mainfrom
drop-dead-sidebar-constants

Conversation

@shiba4life

Copy link
Copy Markdown
Collaborator

Summary

Pure deletion of two dead exports from src/server/static-react/src/constants/ui.ts. Both have zero importers anywhere in the frontend tree — Sidebar.tsx defines its own local SidebarItemDef interface and SIDEBAR_ITEMS constant and never imports from constants/ui.

  • export interface SidebarItem (was ui.ts:20-25)
  • export const SIDEBAR_ITEMS + its misleading "used by Sidebar component" comment (was ui.ts:62-72)

Continues the dead-export audit from #1014 (constants/api.ts consts), #1015 (constants/ui.ts other dead consts), and #1016 (SchemaState type aliases).

Net diff: 1 file, 19 deletions, 0 insertions.

Test plan

  • git grep -nE "import .*\b(SIDEBAR_ITEMS|SidebarItem)\b" -- src/server/static-react/src → 0 hits (confirmed pre- and post-edit)
  • src/server/static-react/src/components/Sidebar.tsx untouched; local SidebarItemDef (line 17) and local SIDEBAR_ITEMS (line 26) intact
  • npm run typecheck (tsc --noEmit) — passes
  • npm test (vitest) — 65 files / 788 tests pass; constants.test.ts has no assertions on the deleted exports
  • npm run lint — the only error (schemasLoading unused in QueryForm.tsx:45) pre-exists on origin/main and is unrelated to this diff

Out of scope

  • The unused export { SIDEBAR_ITEMS } re-export at components/Sidebar.tsx:121 (separate task; needs its own verification pass)
  • Consolidating Sidebar.tsx's local SidebarItemDef into a shared module (re-architecture, not dead-code removal)

Both have zero importers. Sidebar.tsx defines its own local
SidebarItemDef interface and SIDEBAR_ITEMS constant, never importing
from constants/ui. Continues the dead-export audit from #1014, #1015,
and #1016.

- Delete `export interface SidebarItem` (was ui.ts:20-25)
- Delete `export const SIDEBAR_ITEMS` (was ui.ts:62-72) plus its
  misleading comment claiming it was used by the Sidebar component

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@shiba4life
shiba4life enabled auto-merge May 12, 2026 07:18
@shiba4life
shiba4life added this pull request to the merge queue May 12, 2026
Merged via the queue into main with commit 0127139 May 12, 2026
12 checks passed
@shiba4life
shiba4life deleted the drop-dead-sidebar-constants branch May 12, 2026 07:20
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>
github-merge-queue Bot pushed a commit that referenced this pull request May 13, 2026
…1027)

ts-unused-exports flagged UPGRADE_POLL_INTERVAL_MS, UPGRADE_POLL_MAX_MS,
and CANCELLED_BANNER_MS in CloudMigrationSettings.tsx. All four call
sites are inside the same file; the colocated test file does not import
them. Drop the `export` keyword on the three const declarations.

Behavior-preserving — pure dead-export sweep. Continues the cleanup
from #1014/#1015/#1017/#1018/#1022/#1023/#1024/#1025/#1026.
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