Skip to content

feat: Multi-Zone Configuration v2025.8.0 with Quality Improvements#16

Merged
docbobo merged 4 commits intomainfrom
feature/zone-configuration-improvements
Aug 8, 2025
Merged

feat: Multi-Zone Configuration v2025.8.0 with Quality Improvements#16
docbobo merged 4 commits intomainfrom
feature/zone-configuration-improvements

Conversation

@docbobo
Copy link
Copy Markdown
Owner

@docbobo docbobo commented Aug 8, 2025

🎉 Multi-Zone Configuration Feature v2025.8.0

This PR introduces comprehensive Multi-Zone support for Denon/Marantz receivers with additional code quality improvements.

🚀 New Features (by @arthursoares)

Multi-Zone Configuration:

  • Zone Selection: Choose between Main Zone (full control) or Zone 2 (power-only control)
  • Coordinated Power Control: Option to power off both zones simultaneously
  • Enhanced UI: Dropdown controls for zone selection and power-off behavior
  • Zone-Specific Functions: Complete zone management with src/zone-functions.js

Configuration Options:

  • zone: "main" - Controls Main Zone (default, full functionality)
  • zone: "zone2" - Controls Zone 2 (power-only control)
  • powerOffBothZones: true - Powers off both zones when turning off

🔧 Quality Improvements

Code Quality Fixes:

  • Consistent Error Handling: Replaced all console.log with debug() statements
  • Version Synchronization: Updated display_version to match package.json (2025.8.0)
  • Clean Code: Removed TODO comments and improved error messages

Infrastructure & Testing:

  • Comprehensive Test Suite: 64 Jest tests with 100% coverage on zone functions
  • CI/CD Pipeline: GitHub Action for automated Docker builds (multi-platform)
  • Dependency Fix: Updated to official roonlabs/node-roon-api repository
  • Documentation: Complete CLAUDE.md with semantic versioning and feature docs

📊 Testing Results

✅ All 64 tests passing
✅ 100% coverage on zone-functions.js
✅ App startup verified with Roon Core connection
✅ Multi-platform Docker builds working (linux/amd64, linux/arm64)

🏗️ Technical Details

Semantic Versioning: YYYY.MINOR.PATCH

  • 2025.8.0: Minor release for Multi-Zone Configuration feature

Zone Control Architecture:

  • Main Zone: Full volume, mute, input, and power control
  • Zone 2: Power control only (receiver hardware limitation)
  • Coordinated operations: Both zones can be powered off together

Backward Compatibility:

  • ✅ Existing configurations continue working unchanged
  • ✅ Default settings maintain current behavior
  • ✅ No breaking changes to existing API

📚 Documentation

Complete documentation updates in CLAUDE.md including:

  • Multi-Zone configuration options and limitations
  • Semantic versioning scheme explanation
  • Jest testing commands and coverage reports
  • Zone-specific functionality details

🙏 Acknowledgments

Special thanks to @arthursoares for the original Multi-Zone Configuration implementation. This PR integrates their excellent work with additional improvements for production readiness.

Ready for: Production deployment and release as v2025.8.0

arthursoares and others added 4 commits August 8, 2025 11:33
Add comprehensive zone selection and power control functionality:

- Zone selection: Main Zone or Zone 2 control via settings UI
- Configurable power-off behavior: both zones vs selected zone only
- Zone-specific power control functions (getPowerForZone, setPowerForZone, setPowerBothZones)
- Zone2 event handling for real-time power state updates
- Enhanced settings UI with dropdown controls for zone and power options
- Volume control limited to Main Zone (denon-client API limitation)
- Proper zone display names in Roon interface
- Fix for Zone2 remaining on when powering off Main Zone

Multi-Zone Options:
- zone: "main" - Controls Main Zone (default, full functionality)
- zone: "zone2" - Controls Zone 2 (power-only control)
- powerOffBothZones: true - Powers off both zones when turning off

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive GitHub Action workflow for automated Docker builds:

**Core Features:**
- Multi-platform Docker builds (linux/amd64, linux/arm64)
- Feature-specific tagging: feature-zone-config and feature-zone-config-{sha}
- Automated testing with container startup validation
- Optimized workflow: Build → Test → Push (prevents registry failures)

**Workflow Improvements:**
- Local build with push: false for safe testing
- Container-ID based testing (more reliable than container names)
- Proper error handling and cleanup in test steps
- Only push to Docker Hub after successful container tests
- Separate PR validation job without registry push

**Build Triggers:**
- Push to feature/zone-configuration-improvements branch
- Manual workflow dispatch with force rebuild option
- Pull request validation (build-only, no push)

**Docker Hub Integration:**
- Uses existing Docker Hub secrets and infrastructure
- Container startup validation checks for 'Setting up sood|Starting sood'
- Comprehensive build logs and Docker Hub URL in output

This resolves the CI/CD failure where container tests tried to pull
non-existent registry images before they were available.
Add comprehensive Jest testing framework with full coverage reporting:

**Test Suite Features:**
- 64 passing tests across 3 test suites
- 100% coverage on zone-functions.js
- Unit tests for zone helper functions (getPowerForZone, setPowerForZone, setPowerBothZones)
- Settings configuration tests with layout validation
- Integration tests covering real-world usage scenarios
- Test coverage: Main Zone control, Zone2 control, dual-zone power off, error handling

**Test Scripts:**
- npm test - Run all tests
- npm run test:watch - Watch mode for development
- npm run test:coverage - Generate coverage reports

**Release Preparation:**
- Update version to 2025.8.0 (Multi-Zone Configuration release)
- Add coverage/ directory to .gitignore
- Update CLAUDE.md with version numbering scheme and Multi-Zone documentation
- Remove coverage files from repository (generated artifacts)

**Documentation Updates:**
- Semantic versioning scheme: YYYY.MINOR.PATCH
- Multi-Zone Configuration feature documentation
- Zone configuration options and limitations
- Test suite usage instructions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
🚨 Critical Issues Fixed:
- Replace all console.log with debug statements for consistent logging
- Update display_version to 2025.8.0 (synchronized with package.json)
- Remove TODO comment and improve error message in connection setup

✅ Testing Verification:
- All 64 Jest tests passing
- App startup verified with Roon Core connection
- Multi-Zone functionality preserved and validated

**Consistent Error Handling:**
- setup_denon_connection: console.log(error) → debug("Connection error: %O", error)
- set_volume: console.log(error) → debug("set_volume: Failed with error: %O", error)
- set_mute: console.log(error) → debug("set_mute: Failed with error: %O", error)
- set_standby: console.log(error) → debug("set_standby: Failed with error: %O", error)

**Version Synchronization:**
- display_version: "2025.1.2" → "2025.8.0" (matches package.json)
- Ensures consistent version information across Roon interface

Improves error handling consistency and keeps version information synchronized
throughout the extension for better maintainability and debugging.
@docbobo docbobo force-pushed the feature/zone-configuration-improvements branch from 4d1488d to d351d86 Compare August 8, 2025 09:38
@docbobo docbobo merged commit 99ea7cd into main Aug 8, 2025
2 checks passed
@docbobo docbobo deleted the feature/zone-configuration-improvements branch August 8, 2025 09:41
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