Release Notes - v1.1.1-rc15
๐ Major Improvements
Architecture Refactoring
This release introduces a comprehensive architectural refactoring that significantly improves code maintainability, testability, and scalability.
New Service Layer
- AreaManagementService: Centralized room and area management
- AuthenticationService: Dedicated authentication handling with improved error recovery
- ClientManager: Unified client connection management
- MessageRoutingService: Streamlined message routing and command execution
- ConnectionService: Enhanced connection lifecycle management
- DeviceManagementService: Centralized device state and operations
- PollingService: Efficient device status polling
- ServiceContainer: Dependency injection for better modularity
Domain-Driven Design (DDD)
Introduced domain layer with properly structured entities and value objects:
- Entities:
VacuumDevice,CleaningSession,CleaningRoutine,RoomEntity - Value Objects:
BatteryStatus,CleaningArea,Coordinates,DeviceIdentifier
Improved Error Handling
- Structured error hierarchy with specific error types
- Better error messages and recovery strategies
- Error classes:
AuthenticationError,CommunicationError,ConfigurationError,DeviceError,ValidationError
๐ Bug Fixes
Critical Fixes
-
Protocol 4/5 Message Handling โ : Fixed timeout issues when fetching room/map information from Roborock devices
- Root cause: Messages with protocol 4 (general_request) had data stored in key 102, but listener only checked protocol-specific keys
- Solution: Updated
SyncMessageListenerto check key 102 first, then fallback to protocol-specific keys - Impact: Rooms are now successfully retrieved (Kitchen, Study, Living room, Bedroom, etc.)
-
Cross-Platform Compatibility โ : Fixed case-sensitive file name issues causing test failures on Linux CI
- Corrected service file names:
AreaManagementService.tsโareaManagementService.ts, etc. - Ensures consistent builds across macOS (case-insensitive) and Linux (case-sensitive) systems
- Corrected service file names:
Code Quality
- Fixed typos:
initalData.tsโinitialData.ts - Removed unused variables and imports
- Improved TypeScript type safety in tests
๐ง Technical Improvements
Communication Layer Enhancements
- Added protocol-specific serializers:
L01Serializer,A01Serializer,B01Serializer,V01Serializer - Implemented factory patterns:
MessageBodyBuilderFactory,MessageProcessorFactory - Enhanced message deserialization with better protocol version handling
Constants & Configuration
- Extracted magic numbers to dedicated constant files
- Improved code readability with named constants for battery levels, timeouts, device IDs, etc.
Code Reduction
- Refactored
roborockService.ts: Reduced by 752 lines through proper separation of concerns - Consolidated test files: Removed redundant tests, improved test organization
- Net code improvement: +9,186 lines (including comprehensive tests and documentation)
๐ Documentation
- Added comprehensive
CODE_STRUCTURE.mddocumenting the new architecture - Enhanced inline code documentation
- Improved test coverage with detailed test scenarios
๐งช Testing
- Added 3000+ lines of comprehensive unit tests
- Test coverage for all new services and error handlers
- Integration test scenarios for real-world workflows
- All 846 tests passing โ
๐ Breaking Changes
None - This release maintains backward compatibility while introducing new architectural patterns.
๐ฆ Migration Notes
No migration required. The refactoring is internal and does not affect plugin configuration or behavior.
๐ Acknowledgments
This release represents a significant step forward in code quality and maintainability, setting the foundation for future features and improvements.
Full Changelog: https://github.com/[your-repo]/compare/v1.1.1-rc14...v1.1.1-rc15