Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pladisdev <127021507+pladisdev@users.noreply.github.com>
Co-authored-by: pladisdev <127021507+pladisdev@users.noreply.github.com>
Co-authored-by: pladisdev <127021507+pladisdev@users.noreply.github.com>
Co-authored-by: pladisdev <127021507+pladisdev@users.noreply.github.com>
Co-authored-by: pladisdev <127021507+pladisdev@users.noreply.github.com>
…4b50-93c4-0e11b13594f4 Clarify error handler ordering is correct - no changes needed
Co-authored-by: pladisdev <127021507+pladisdev@users.noreply.github.com>
Co-authored-by: pladisdev <127021507+pladisdev@users.noreply.github.com>
…47b6-b204-5bf8892748d3 Extract magic numbers to named constants in audio playback code
…4606-8149-97ceaa22873d Use platform.system() instead of sys.platform for OS detection
Extract duplicated hex opacity calculation to utility function
Extract avatar active offset magic number into configurable setting
Fix audio reference cleanup on play() failure in popup mode
Fix race condition in popup avatar lifecycle
…into development
There was a problem hiding this comment.
Pull request overview
This pull request introduces several changes including dependency updates, Twitch integration modifications, changelog updates, and CI/CD workflow adjustments. The PR is titled "Development" which is generic and doesn't clearly communicate the purpose of these changes.
Changes:
- Updated edge-tts dependency from version 7.0.2 to 7.2.7
- Modified Twitch listener to remove explicit channel joining in favor of debugging/verification code
- Added v1.3.1 changelog entry with Twitch fix, random avatar assignment, and additional fonts
- Standardized Python version to 3.10 across test and build workflows
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| requirements.txt | Updates edge-tts version from 7.0.2 to 7.2.7 |
| backend/modules/twitch_listener.py | Replaces explicit join_channels call with debugging/verification logs |
| README.md | Adds v1.3.1 changelog entry and formatting updates |
| .github/workflows/tests.yml | Reduces Python test matrix to only version 3.10 |
| .github/workflows/build-and-release.yml | Downgrades Python version from 3.11 to 3.10 for builds |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - **New Features:** | ||
| - Quick status view | ||
| - Limit concurrent TTS messages | ||
| - Some more twitch fixes and improved notifcations |
There was a problem hiding this comment.
Spelling error: "notifcations" should be "notifications".
| - Some more twitch fixes and improved notifcations | |
| - Some more twitch fixes and improved notifications |
|
|
||
| # In TwitchIO 3.x, channels from initial_channels should auto-join | ||
| # But we can verify by checking connected channels | ||
| if hasattr(self, 'connected_channels'): | ||
| logger.info(f"Connected channels: {list(self.connected_channels)}") | ||
|
|
||
| # Log available methods for debugging | ||
| logger.debug(f"Bot methods: {[m for m in dir(self) if 'channel' in m.lower() or 'join' in m.lower()]}") | ||
|
|
There was a problem hiding this comment.
The code that explicitly joins channels has been replaced with debugging logs. While the comment states "channels from initial_channels should auto-join" in TwitchIO 3.x, this change removes the explicit join_channels call that was previously documented as "required in TwitchIO 3.x". If auto-joining is unreliable or doesn't work as expected, removing this explicit call could break Twitch chat functionality. Consider keeping the explicit join or adding a fallback mechanism if the auto-join doesn't work, rather than just logging debug information. The PR description mentions "Twitch fix" but this change appears to remove functionality rather than fix it.
| # In TwitchIO 3.x, channels from initial_channels should auto-join | |
| # But we can verify by checking connected channels | |
| if hasattr(self, 'connected_channels'): | |
| logger.info(f"Connected channels: {list(self.connected_channels)}") | |
| # Log available methods for debugging | |
| logger.debug(f"Bot methods: {[m for m in dir(self) if 'channel' in m.lower() or 'join' in m.lower()]}") | |
| # In TwitchIO 3.x, channels from initial_channels should auto-join | |
| # But we can verify by checking connected channels | |
| connected_names = set() | |
| if hasattr(self, "connected_channels"): | |
| try: | |
| # connected_channels is typically a list of Channel objects | |
| connected_names = { | |
| getattr(c, "name", str(c)).lower() | |
| for c in (self.connected_channels or []) | |
| } | |
| logger.info(f"Connected channels: {list(self.connected_channels)}") | |
| except Exception: | |
| # If anything goes wrong, fall back to empty set and try explicit join | |
| connected_names = set() | |
| # Explicitly join the target channel if not already connected. | |
| # This preserves behavior in TwitchIO versions where auto-join is unreliable. | |
| target = (self.channel_name or "").lower() | |
| if target and target not in connected_names and hasattr(self, "join_channels"): | |
| try: | |
| logger.info(f"Twitch bot explicitly joining channel: {self.channel_name}") | |
| await self.join_channels([self.channel_name]) | |
| except Exception as join_exc: | |
| logger.error(f"Failed to explicitly join channel {self.channel_name}: {join_exc}", exc_info=True) | |
| # Log available methods for debugging | |
| logger.debug( | |
| f"Bot methods: {[m for m in dir(self) if 'channel' in m.lower() or 'join' in m.lower()]}" | |
| ) |
| strategy: | ||
| matrix: | ||
| python-version: ['3.9', '3.10', '3.11'] | ||
| python-version: ['3.10'] |
There was a problem hiding this comment.
The test matrix has been reduced from testing multiple Python versions (3.9, 3.10, 3.11) to only testing Python 3.10. This reduces test coverage and may allow bugs to slip through that only manifest on other Python versions. The test documentation in backend/tests/README.md:184 still mentions "Backend tests (Python 3.9, 3.10, 3.11)" which is now outdated. If there's a specific reason to drop testing on 3.9 and 3.11, it should be documented, otherwise the full matrix should be retained to ensure compatibility.
| python-version: ['3.10'] | |
| python-version: ['3.9', '3.10', '3.11'] |
| - Allow random avatar assignment | ||
| - More fonts to select from | ||
|
|
||
| ### v1.3.0 (Latest) |
There was a problem hiding this comment.
The formatting of the v1.3.0 and v1.3.1 changelog entries is inconsistent. v1.3.1 includes "- New Features:" as a header before the list items, while v1.3.0 removed this header (as shown in the diff). For consistency, all version entries should follow the same format. Either add the "- New Features:" header to v1.3.0 or remove it from v1.3.1.
| ### v1.3.0 (Latest) | |
| ### v1.3.0 (Latest) | |
| - **New Features:** |
| - name: Set up Python 3.10 | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.11' | ||
| python-version: '3.10' |
There was a problem hiding this comment.
The Python version in the build workflow is being downgraded from 3.11 to 3.10. While this aligns with the test workflow changes, there's no explanation in the PR description for why this downgrade is necessary. If there's a compatibility issue with Python 3.11, it should be documented. The README.md still states "Python 3.9+" as a requirement, so this change should be compatible, but the rationale should be clear.
| ### v1.3.0 (Latest) | ||
| - Better control of avatar placement in Avatar Layout Editor | ||
| - Select and Adjust speaking animations for crowd mode | ||
| - Added idle animations for crowd mode | ||
|
|
||
| ### v1.2.2 (Latest) |
There was a problem hiding this comment.
Multiple versions are marked as "(Latest)" in the changelog. Only the most recent version (v1.3.1) should have the "(Latest)" tag. The "(Latest)" marker should be removed from v1.3.0 and v1.2.2.
| ### v1.3.0 (Latest) | |
| - Better control of avatar placement in Avatar Layout Editor | |
| - Select and Adjust speaking animations for crowd mode | |
| - Added idle animations for crowd mode | |
| ### v1.2.2 (Latest) | |
| ### v1.3.0 | |
| - Better control of avatar placement in Avatar Layout Editor | |
| - Select and Adjust speaking animations for crowd mode | |
| - Added idle animations for crowd mode | |
| ### v1.2.2 |
No description provided.