ποΈ Delete unused service wrappers & simplify createServices#134
Conversation
Code Review: Delete unused service wrappers & simplify createServicesThis is an excellent refactoring that significantly improves code quality and maintainability. The PR successfully achieves its goal of removing wrapper classes and promoting functional programming patterns. β Strengths1. Architectural Improvements
2. Code Quality
3. Testing
π‘ Observations & Minor Suggestions1. Package.json changes 2. package-lock.json peer dependencies 3. Dependency injection pattern consistency 4. Error handling in operations output.error(`Failed to generate static report: ${error.message}`);
throw error; // Or new VizzlyError(...) if you want custom error types5. BuildManager class removal π Securityβ
XSS Protection: The β No new security concerns identified in this refactor. β‘ PerformanceThe refactor is performance-neutral or slightly positive:
π― Test CoverageExcellent coverage of new code:
Deleted test files properly cleaned up:
π DocumentationThe PR description is clear and follows the CLAUDE.md guidelines:
One suggestion: Update CLAUDE.md's "Common Development Patterns" section to document the new functional patterns (pure functions in β¨ SummaryThis is a high-quality refactor that:
Recommendation: APPROVE with the minor verification items noted above (peer dependencies, BuildManager call sites). Great work on part 3 of the functional decomposition refactor! π |
b340169 to
b11b71b
Compare
Deleted thin wrapper classes (only used by createServices): - api-service.js, auth-service.js, config-service.js, project-service.js - tdd-service.js re-export (now imports from tdd/ directly) - BuildManager class (kept pure functions) - html-report-generator.js and report-generator/ assets Simplified createServices() to only create: - testRunner (EventEmitter for plugin API) - serverManager (plugin API) Updated test imports to use functional modules directly. Added report-generator/ module with functional operations.
a4bf797 to
97081e9
Compare
Summary
Deleted thin wrapper classes (only used by createServices):
api-service.js,auth-service.js,config-service.js,project-service.jstdd-service.jsre-export (now imports fromtdd/directly)BuildManagerclass (kept pure functions)html-report-generator.jsandreport-generator/assetsSimplified
createServices()to only create:testRunner(EventEmitter for plugin API)serverManager(plugin API)Added:
report-generator/module with functional operationstests/helpers/Stats
Migration path (future)
The
testRunnerandserverManagerclasses remain for plugin API backwards compatibility. Future work:Test plan
Part 3 of 3 for functional decomposition refactor (VIZ-128)
Depends on #133