[Medium] [Task] Remove unused/orphaned components #322
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Several components are exported but never imported or rendered anywhere in the codebase — pure dead code.
Confirmed orphans:
UpgradeDialog.tsx(src/components/game/UpgradeDialog.tsx)game/index.tsbarrel but never imported/rendered anywhereActivityLog.tsx(src/components/game/tabs/ActivityLog.tsx)tabs/index.tsActivityLogPanelin the LeftPanel (which wraps it)EquipmentItem.tsx(src/components/game/LootInventory/EquipmentItem.tsx)EssenceItem.tsx(src/components/game/LootInventory/EssenceItem.tsx)MaterialItem.tsx(src/components/game/LootInventory/MaterialItem.tsx)shields.ts(src/lib/game/data/equipment/shields.ts)SHIELD_EQUIPMENTrecordequipment-types-data.tsandequipment/index.ts)Plan
Delete all six files listed above. No other code references them.
Verification
After deletion, run the build to confirm nothing breaks:
Removed all 6 orphaned files:
UpgradeDialog.tsx— exported from barrel but never imported/renderedActivityLog.tsx(tab version) — not registered in tab bar, not exported from tabs barrelEquipmentItem.tsx— only self-referenced within its own fileEssenceItem.tsx— only self-referenced within its own fileMaterialItem.tsx— only self-referenced within its own fileshields.ts— exports empty record, not imported anywhereAlso cleaned up barrel exports in
game/index.ts:UpgradeDialogexportAttunementStatusexport (orphaned by #323)Also fixed a TypeScript type error in
combat-tick.tswhereusePrestigeStoretype was missingdefeatedGuardiansproperty (introduced by #330 changes).All 1090 tests pass.
npx tsc --noEmitshows no new errors.