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:
components/chart.component.ts- Comprehensive chart component (valuable)components/metric-card.component.ts- Metric display card (valuable)components/index.ts- Barrel exportREADME.md- Documentation of preserved componentstest-file.txt- Test file
Status: ⏳ Pending Review
Decision Required:
- ✅ KEEP: Chart and Metric Card components are well-built, modern Angular 20 code
- ✅ RELOCATE: Move to
libs/shared-ui/or create newlibs/charts/andlibs/metrics/ - ❌ DELETE: The folder structure after relocation
Action Plan:
- Create
libs/charts/library for chart component - Create
libs/metrics/library for metric card - Move components with proper exports
- Update imports if any exist
- Delete
deprecated/folder - 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:
- Remove commented uxTestRoutes (lines 19-25)
- Remove commented fallback route (lines 302-305)
- Verify app compiles after removal
- Run linter to confirm no issues
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:
- List all files in storage-deprecated/
- Check if any components are imported/used
- Review storage-deprecated routes file
- Determine if documentation should be preserved
- Create decision document for storage removal
Action Plan:
- If not used: Delete entire folder
- If documentation valuable: Archive docs to
docs/english/GoGrab-Space/storage-system/legacy/ - Update any references
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:
EditorModuleContractmodule-system/EditorModuleContractsingularity-lib/
Status: ⏳ Pending Code Search
Action Required:
- Search actual TypeScript files (not markdown)
- Find real EditorModuleContract interface usage
- Identify all implementations
- Plan migration to BrowserModuleContract
Command to run:
# Search only TypeScript files
grep -r "EditorModuleContract" libs/ apps/ modules/ --include="*.ts" --exclude-dir=node_modules
Expected Work:
- Update user-management module
- Replace interface definition if exists
- Update all imports
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)
- ✅ Remove commented routes from app.routes.ts
- ⚠️ Investigate and handle EditorModuleContract
- ⚠️ Investigate storage-deprecated folder
Medium Priority (Week 1-2)
- ✅ Relocate deprecated/ components to proper libraries
- ✅ Delete deprecated/ folder after relocation
Low Priority (As Discovered)
- ✅ Remove any other commented code
- ✅ 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:
- Code compiles
- No linter errors
- App starts successfully
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:
- Components build successfully in new libraries
- Exports work correctly
- No import errors
- Tests pass
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:
- If imported anywhere: Review usage, plan migration
- If not imported: Safe to delete
- If documentation valuable: Archive first
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:
- Document all usages
- Plan migration to BrowserModuleContract
- Update user-management module first (example)
- Update remaining modules
- Remove interface definition
- Remove from exports
Verification Checklist
After all removals:
Build Verification
-
npx nx lint gograb-space- No errors -
npx nx build gograb-space --configuration=development- Successful -
npx nx test gograb-space- All tests pass - App starts at
http://localhost:5200
Runtime Verification
- Dashboard loads
- Editor loads
- Space Map loads
- Singularity loads
- Modularity loads
- No console errors
Code Quality
- No commented-out code in key files
- No deprecated imports
- All imports resolve
- No unused variables
Documentation Updates
After removal:
- Update progress-tracking.md
- Mark tasks complete in phase-0-cleanup.md
- Document what was removed and why
- Update architecture docs if needed
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:
- ✅ Zero commented-out code in key files
- ✅ Deprecated folder removed
- ✅ Storage deprecated removed
- ✅ All builds pass
- ✅ All tests pass
- ✅ App runs without errors
- ✅ Documentation updated
Status: 🎯 Audit Complete - Ready for Implementation
Next Step: Execute removal plan
Owner: Platform Team
Last Updated: November 1, 2025