Skip to content

chore: Phase 2 dead code removal — unused components, dead exports, a…#37

Merged
AutomatosAI merged 1 commit intomainfrom
codebase-health/phase-2-dead-code
Apr 9, 2026
Merged

chore: Phase 2 dead code removal — unused components, dead exports, a…#37
AutomatosAI merged 1 commit intomainfrom
codebase-health/phase-2-dead-code

Conversation

@AutomatosAI
Copy link
Copy Markdown
Owner

@AutomatosAI AutomatosAI commented Apr 9, 2026

…rchived scripts

  • Delete 14 unused shadcn/ui components (hover-card, input-otp, carousel, etc.)
  • Delete orphan DashboardSidebar and TenantDashboardSidebar (never imported)
  • Delete disabled sync-products route
  • Remove 4 dead exports from doctor-green-api.ts (verifyNFT, getClientByNFT, fetchClientOrders, addToCart)
  • Archive 20 one-off debug/fix/test/check scripts to scripts/_archive/
  • Kept components/home/, navigation, footer, mock-data, template-registry (still imported as fallbacks)

Summary by CodeRabbit

  • Refactor
    • Removed unused UI components and deprecated internal API functions to streamline the application.
    • Cleaned up obsolete product synchronization features and redundant navigation components.
    • Improved codebase maintainability and reduced technical debt through systematic removal of legacy code.

…rchived scripts

- Delete 14 unused shadcn/ui components (hover-card, input-otp, carousel, etc.)
- Delete orphan DashboardSidebar and TenantDashboardSidebar (never imported)
- Delete disabled sync-products route
- Remove 4 dead exports from doctor-green-api.ts (verifyNFT, getClientByNFT, fetchClientOrders, addToCart)
- Archive 20 one-off debug/fix/test/check scripts to scripts/_archive/
- Kept components/home/, navigation, footer, mock-data, template-registry (still imported as fallbacks)
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9603f18b-a0b6-4345-9e26-7defddc4a5d7

📥 Commits

Reviewing files that changed from the base of the PR and between 40cf219 and 57bd93e.

📒 Files selected for processing (38)
  • nextjs_space/app/api/doctor-green/sync-products.disabled/route.ts
  • nextjs_space/components/admin/DashboardSidebar.tsx
  • nextjs_space/components/admin/TenantDashboardSidebar.tsx
  • nextjs_space/components/ui/aspect-ratio.tsx
  • nextjs_space/components/ui/avatar.tsx
  • nextjs_space/components/ui/breadcrumb.tsx
  • nextjs_space/components/ui/carousel.tsx
  • nextjs_space/components/ui/collapsible.tsx
  • nextjs_space/components/ui/command.tsx
  • nextjs_space/components/ui/context-menu.tsx
  • nextjs_space/components/ui/drawer.tsx
  • nextjs_space/components/ui/hover-card.tsx
  • nextjs_space/components/ui/input-otp.tsx
  • nextjs_space/components/ui/menubar.tsx
  • nextjs_space/components/ui/navigation-menu.tsx
  • nextjs_space/components/ui/scroll-area.tsx
  • nextjs_space/components/ui/toggle-group.tsx
  • nextjs_space/lib/doctor-green-api.ts
  • nextjs_space/scripts/_archive/check-aws-env.ts
  • nextjs_space/scripts/_archive/check-keys.js
  • nextjs_space/scripts/_archive/check-tenant-simple.ts
  • nextjs_space/scripts/_archive/debug-auth.ts
  • nextjs_space/scripts/_archive/debug-cart.ts
  • nextjs_space/scripts/_archive/debug-drgreen-raw.ts
  • nextjs_space/scripts/_archive/debug-kyc-auth.ts
  • nextjs_space/scripts/_archive/debug-kyc-deep.ts
  • nextjs_space/scripts/_archive/debug-kyc-status.ts
  • nextjs_space/scripts/_archive/debug_tenants.ts
  • nextjs_space/scripts/_archive/debug_user.ts
  • nextjs_space/scripts/_archive/find-product.ts
  • nextjs_space/scripts/_archive/find-tenant.ts
  • nextjs_space/scripts/_archive/fix-kyc-email.ts
  • nextjs_space/scripts/_archive/fix_missing_user.ts
  • nextjs_space/scripts/_archive/populate-cart.ts
  • nextjs_space/scripts/_archive/repair-orphaned-clerk-tenants.ts
  • nextjs_space/scripts/_archive/revert-tenant-country.ts
  • nextjs_space/scripts/_archive/test-drgreen-auth.ts
  • nextjs_space/scripts/_archive/test-drgreen-products.ts
💤 Files with no reviewable changes (18)
  • nextjs_space/components/ui/aspect-ratio.tsx
  • nextjs_space/components/ui/hover-card.tsx
  • nextjs_space/components/ui/avatar.tsx
  • nextjs_space/components/admin/TenantDashboardSidebar.tsx
  • nextjs_space/components/ui/carousel.tsx
  • nextjs_space/components/ui/drawer.tsx
  • nextjs_space/components/ui/collapsible.tsx
  • nextjs_space/components/admin/DashboardSidebar.tsx
  • nextjs_space/app/api/doctor-green/sync-products.disabled/route.ts
  • nextjs_space/components/ui/input-otp.tsx
  • nextjs_space/lib/doctor-green-api.ts
  • nextjs_space/components/ui/context-menu.tsx
  • nextjs_space/components/ui/scroll-area.tsx
  • nextjs_space/components/ui/navigation-menu.tsx
  • nextjs_space/components/ui/breadcrumb.tsx
  • nextjs_space/components/ui/menubar.tsx
  • nextjs_space/components/ui/command.tsx
  • nextjs_space/components/ui/toggle-group.tsx

📝 Walkthrough

Walkthrough

This PR removes unused code artifacts including a Doctor Green product sync API route, multiple UI component utilities from the component library, two admin dashboard sidebar components, and several Doctor Green API helper functions.

Changes

Cohort / File(s) Summary
Doctor Green Integration
nextjs_space/app/api/doctor-green/sync-products.disabled/route.ts, nextjs_space/lib/doctor-green-api.ts
Removed POST route handler for syncing Doctor Green products and deleted unused API helper functions (verifyNFT, getClientByNFT, fetchClientOrders, addToCart).
Admin Dashboard Components
nextjs_space/components/admin/DashboardSidebar.tsx, nextjs_space/components/admin/TenantDashboardSidebar.tsx
Removed collapsible sidebar navigation components used in super-admin and tenant-level admin dashboards with logout and role-based menu functionality.
UI Component Library
nextjs_space/components/ui/aspect-ratio.tsx, nextjs_space/components/ui/avatar.tsx, nextjs_space/components/ui/breadcrumb.tsx, nextjs_space/components/ui/carousel.tsx, nextjs_space/components/ui/collapsible.tsx, nextjs_space/components/ui/command.tsx, nextjs_space/components/ui/context-menu.tsx, nextjs_space/components/ui/drawer.tsx, nextjs_space/components/ui/hover-card.tsx, nextjs_space/components/ui/input-otp.tsx, nextjs_space/components/ui/menubar.tsx, nextjs_space/components/ui/navigation-menu.tsx, nextjs_space/components/ui/scroll-area.tsx, nextjs_space/components/ui/toggle-group.tsx
Removed Radix UI and third-party library wrapper components including navigation, menu, form input, and layout primitives (14 UI component files totaling ~1,330 lines).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

codex

Poem

🐰 Hop, hop, away go the forgotten friends—
UI wrappers and API calls that met their ends.
With a spring in our step and a tidy design,
The codebase now gleams, more focused and fine!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main change: removing dead code including unused components, dead exports, and disabled/archived scripts as part of a cleanup initiative.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codebase-health/phase-2-dead-code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@AutomatosAI AutomatosAI merged commit 8222beb into main Apr 9, 2026
2 checks passed
@AutomatosAI AutomatosAI deleted the codebase-health/phase-2-dead-code branch April 16, 2026 20:37
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.

2 participants