Deprecated Code Removal Checklist

Complete list of deprecated code identified and removal status

Deprecated Code Removal Checklist

Phase: Phase 0 - Cleanup & Foundation
Started: November 1, 2025
Status: 🎯 Audit Complete, Removal In Progress


Executive Summary

Total Items Identified: 5 categories
Items Removed: 0/5
Estimated Time: 4-6 hours
Risk Level: Medium


Critical Findings

1. Deprecated Folder ⚠️ REVIEW REQUIRED

Location: editor/deprecated/

Contents:

Status: ⏳ Pending Review

Decision Required:

Action Plan:

  1. Create libs/charts/ library for chart component
  2. Create libs/metrics/ library for metric card
  3. Move components with proper exports
  4. Update imports if any exist
  5. Delete deprecated/ folder
  6. Test components in new locations

Reasoning: These are NOT deprecated components - they are valuable, well-written Angular 20 components that were preserved when unified-dashboard was removed. They should be integrated into the monorepo, not deleted.


2. Commented-Out Routes ✅ SAFE TO REMOVE

Location: editor/apps/gograb-space/src/app/app.routes.ts

Lines to Remove:

// Lines 19-25: Commented uxTestRoutes
// const uxTestRoutes: Routes = [
//   {
//     path: '',
//     loadComponent: () => import('./ux-test-wrapper/ux-test-wrapper.component').then(m => m.UxTestWrapperComponent),
//     children: UxTestRoutes,
//   }
// ];

// Line 302-305: Commented fallback route
// {
//   path: '**',
//   redirectTo: '/landing'
// }

Status: ⏳ Pending Removal

Risk: Low - These are commented out and not actively used

Action:

Reasoning: Commented-out code adds noise and confusion. If these routes are needed in the future, they can be recovered from git history.


3. Storage Deprecated Folder ⚠️ INVESTIGATE REQUIRED

Location: apps/gograb-space/src/app/components/storage/storage-deprecated/

Status: ⏳ Pending Investigation

Next Steps:

  1. List all files in storage-deprecated/
  2. Check if any components are imported/used
  3. Review storage-deprecated routes file
  4. Determine if documentation should be preserved
  5. Create decision document for storage removal

Action Plan:


4. EditorModuleContract References ⚠️ HIGH PRIORITY

Location: modules/README.md and modules/index.md

Findings: These are documentation files, not code files. The strings "EditorModuleContract" appear but are actually file paths like:

Status: ⏳ Pending Code Search

Action Required:

Command to run:

# Search only TypeScript files
grep -r "EditorModuleContract" libs/ apps/ modules/ --include="*.ts" --exclude-dir=node_modules

Expected Work:


5. @deprecated Decorators

Location: TBD

Search Results: No @deprecated decorators found in initial search

Status: ✅ None Found

Note: The grep search returned exit code 2 (no matches), which is expected if there are no @deprecated decorators in the codebase.


Removal Priority

High Priority (Week 1)

  1. ✅ Remove commented routes from app.routes.ts
  2. ⚠️ Investigate and handle EditorModuleContract
  3. ⚠️ Investigate storage-deprecated folder

Medium Priority (Week 1-2)

  1. ✅ Relocate deprecated/ components to proper libraries
  2. ✅ Delete deprecated/ folder after relocation

Low Priority (As Discovered)

  1. ✅ Remove any other commented code
  2. ✅ Remove unused imports

Detailed Action Items

Item 1: Commented Routes Removal

File: apps/gograb-space/src/app/app.routes.ts Lines: 19-25, 302-305 Effort: 5 minutes Risk: Low

Steps:

# 1. Open file
# 2. Remove lines 19-25
# 3. Remove lines 302-305
# 4. Save
# 5. Test: npx nx lint gograb-space
# 6. Test: npx nx build gograb-space --configuration=development

Success Criteria:


Item 2: Deprecated Folder Relocation

Source: deprecated/components/ Target: libs/charts/ and libs/metrics/ Effort: 2-3 hours Risk: Medium

Steps:

# 1. Create new libraries
npx nx g @nx/angular:lib charts --directory=libs --standalone
npx nx g @nx/angular:lib metrics --directory=libs --standalone

# 2. Move chart component
cp deprecated/components/chart.component.ts libs/charts/src/lib/
# Update imports and exports

# 3. Move metric card component
cp deprecated/components/metric-card.component.ts libs/metrics/src/lib/
# Update imports and exports

# 4. Update barrel exports
# Add to libs/charts/src/index.ts
# Add to libs/metrics/src/index.ts

# 5. Test components
npx nx test charts
npx nx test metrics

# 6. Delete deprecated folder
rm -rf deprecated/

Success Criteria:


Item 3: Storage Deprecated Investigation

Location: apps/gograb-space/src/app/components/storage/storage-deprecated/ Effort: 1-2 hours Risk: Medium

Investigation Steps:

# 1. List all files
find apps/gograb-space/src/app/components/storage/storage-deprecated -type f

# 2. Check for imports
grep -r "storage-deprecated" apps/ libs/ --include="*.ts"

# 3. Review routes
cat apps/gograb-space/src/app/components/storage/storage-deprecated/storage.routes.ts

# 4. Check if actively used

Decision Criteria:


Item 4: EditorModuleContract Search

Search: TypeScript files only Effort: 2-3 hours Risk: High

Search Commands:

# Search TypeScript files
grep -r "EditorModuleContract" libs/ apps/ modules/ --include="*.ts" --exclude-dir=node_modules

# Search for interface definition
grep -r "interface EditorModuleContract" libs/ --include="*.ts"

# Search for implementations
grep -r "implements EditorModuleContract" libs/ apps/ modules/ --include="*.ts"

# Search for imports
grep -r "import.*EditorModuleContract" libs/ apps/ modules/ --include="*.ts"

If Found:

  1. Document all usages
  2. Plan migration to BrowserModuleContract
  3. Update user-management module first (example)
  4. Update remaining modules
  5. Remove interface definition
  6. Remove from exports

Verification Checklist

After all removals:

Build Verification

Runtime Verification

Code Quality


Documentation Updates

After removal:


Git Strategy

Commit Strategy

Each removal should be a separate commit:

# Commit 1: Remove commented routes
git add apps/gograb-space/src/app/app.routes.ts
git commit -m "chore: remove commented-out routes from app.routes.ts"

# Commit 2: Relocate chart component
git add libs/charts/
git commit -m "feat: move chart component to libs/charts"

# Commit 3: Relocate metric card component
git add libs/metrics/
git commit -m "feat: move metric card component to libs/metrics"

# Commit 4: Remove deprecated folder
git rm -rf deprecated/
git commit -m "chore: remove deprecated folder after component relocation"

# Commit 5: Remove storage deprecated
git rm -rf apps/gograb-space/src/app/components/storage/storage-deprecated/
git commit -m "chore: remove storage-deprecated folder"

Risk Mitigation

Backup Strategy

Before any deletion:

# Create backup branch
git checkout -b backup/pre-cleanup-$(date +%Y%m%d)
git push origin backup/pre-cleanup-$(date +%Y%m%d)

# Return to work branch
git checkout lambo-builder

Rollback Plan

If issues arise:

# Revert specific commit
git revert <commit-hash>

# Or reset to before cleanup
git reset --hard <commit-before-cleanup>

Success Metrics

Phase 0 complete when:


Status: 🎯 Audit Complete - Ready for Implementation
Next Step: Execute removal plan
Owner: Platform Team
Last Updated: November 1, 2025