Skip to content

chore(rename): flag AntD compat shim as deprecated#8

Merged
Agions merged 1 commit into
mainfrom
chore/dead-code-round-3
Jun 4, 2026
Merged

chore(rename): flag AntD compat shim as deprecated#8
Agions merged 1 commit into
mainfrom
chore/dead-code-round-3

Conversation

@Agions
Copy link
Copy Markdown
Owner

@Agions Agions commented Jun 4, 2026

Summary

Rename src/shared/components/ui/ui-components.tsxantd-compat-deprecated.tsx to
flag the file as deprecated (it is the AntD-compatibility shim layer, not a generic
UI module). Update the backward-compat shim at src/components/ui/ui-components.tsx
to follow the new path.

Motivation

The name ui-components.tsx was misleading — it sounded like a generic UI module
but in practice it was a thin AntD-compat layer wrapping shadcn/ui primitives with
fake AntD API names (LegacySelect, AntdCard, ShadcnText aliased as Text, etc.).
The AntD Form bridge was already removed in PR #7 (#50b185e), leaving the file as a
historical artifact.

Renaming to antd-compat-deprecated.tsx makes the deprecation status visible in:

  • import statements (file path itself signals "do not use this")
  • file listings / directory tree
  • editor file pickers

The new header doc lists the correct shadcn/ui import paths for every component
this file re-exports, so future contributors don't have to guess.

Changes

  1. Renamed: src/shared/components/ui/ui-components.tsxantd-compat-deprecated.tsx

    • Added prominent @deprecated JSDoc block at top with full migration guide
      (mapping every re-export to its shadcn/ui canonical path)
    • Body of file unchanged (455 lines of re-exports preserved for backward compat)
  2. Updated shim: src/components/ui/ui-components.tsx

    • Re-export path updated to new file location
    • Added @deprecated cross-reference to the renamed file

Why not delete the file?

7 callers still import from this file through the backward-compat shim:

  • src/shared/components/business/CompositionStudio/index.tsx
  • src/shared/components/business/CompositionStudio/FrameEditForm.tsx
  • src/shared/components/business/CompositionStudio/GlobalSettingsForm.tsx
  • src/features/cost/components/CostPanel.tsx
  • src/features/script/components/ScriptGenerator.tsx
  • src/features/audio/components/AudioEditorPanel.tsx
  • src/pages/project-detail/ProjectDetailPage.tsx

Migrating them to direct shadcn imports is a follow-up PR (a Select signature
change onChangeonValueChange plus removal of the shim + this file).
This PR keeps the rename atomic and zero-risk.

Verification

  • npx tsc --noEmit0 errors
  • npm run lint -- --quiet0 errors
  • npm test -- --runInBand1596 pass / 4 skip / 0 fail (90 suites)
  • npm run buildOK, bundle size unchanged

Risk

None. Pure rename + docstring update. All 7 callers continue to work
through the updated shim.

Rename src/shared/components/ui/ui-components.tsx →
src/shared/components/ui/antd-compat-deprecated.tsx to reflect that
this file is the AntD-compatibility shim layer (not a generic UI module)
and is deprecated for new code.

The AntD Form bridge was already removed in PR #7 (commit 50b185e),
leaving this file as a historical artifact. The new name makes the
deprecation status visible in import statements, file listings, and
editor pickers.

Added a prominent @deprecated JSDoc block at the top with a full
migration guide mapping every re-export to its canonical shadcn/ui path.

Updated the backward-compat shim at src/components/ui/ui-components.tsx
to follow the new file location. All 7 existing callers continue to
work through the shim (zero-risk rename, no caller touched).

Verification: tsc 0 / lint 0 / 1596 tests pass / build OK.
@Agions Agions merged commit dcc1af1 into main Jun 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant