Skip to content

chore: remove unused React components, hooks, and utilities - #192

Merged
elizabetheonoja-art merged 2 commits into
Utility-Protocol:mainfrom
zinodict121:chore/cleanup-unused-code
Aug 22, 2026
Merged

chore: remove unused React components, hooks, and utilities#192
elizabetheonoja-art merged 2 commits into
Utility-Protocol:mainfrom
zinodict121:chore/cleanup-unused-code

Conversation

@zinodict121

Copy link
Copy Markdown
Contributor

Description

This PR addresses the technical debt by removing unused React components, custom hooks, utility functions, and their associated test files.

By running programmatic dead-code analysis across the src/ directory, we were able to safely eliminate orphaned code, reducing the bundle footprint, improving maintainability, and cleaning up the component tree.

Fixes #183

Changes Made

  • Components: Removed obsolete components in src/components/ that were no longer referenced (e.g., VirtualList.tsx, AssetHeatmapLayer.tsx, DashboardPage.tsx).
  • Hooks: Cleaned up unused hooks from src/hooks/ (e.g., useMapCameraSync.ts, useOfflineSync.ts).
  • Utilities: Deleted unreferenced utility functions in src/utils/ and services in src/services/ that had become dead code.
  • Tests: Removed all corresponding unit and e2e test files associated with the deleted code to prevent test suite failures and eliminate unnecessary maintenance.

Total files removed: 147 (99 source files + 48 test files)

Type of change

  • 🧹 Chore (code cleanup and dead-code removal)
  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)

Verification

  • Verified that npm run test passes (excluding pre-existing baseline failures).
  • Ensured that no active code or imports were broken.
  • Code compiles without module resolution errors.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have removed corresponding test files for the deleted code

…d-code

# Conflicts:
#	src/components/common/AriaLiveRegion.tsx
#	src/hooks/useVirtualList.ts
#	tests/hooks/useVirtualList.test.ts
@elizabetheonoja-art
elizabetheonoja-art merged commit 38c1544 into Utility-Protocol:main Aug 22, 2026
4 of 10 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.

Clean Up Unused Components and Utils

2 participants