Skip to content

Conversation

@pladisdev
Copy link
Owner

No description provided.

pladisdev and others added 30 commits November 2, 2025 09:42
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
Copilot AI review requested due to automatic review settings November 25, 2025 22:38
@pladisdev pladisdev merged commit cf75472 into main Nov 25, 2025
6 checks passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR appears to be a development branch merge that includes two main changes: (1) modifying the Twitch bot's channel joining behavior to rely on TwitchIO's automatic channel joining instead of explicit join_channels() calls, and (2) standardizing CI/CD workflows to use Python 3.10 exclusively.

Key Changes:

  • Removed explicit join_channels() call in event_ready(), relying instead on TwitchIO 3.x's automatic joining behavior from initial_channels
  • Added debug logging to verify connected channels and available bot methods
  • Reduced Python version testing matrix from [3.9, 3.10, 3.11] to only [3.10] in test workflows
  • Downgraded build/release workflows from Python 3.11 to Python 3.10

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
backend/modules/twitch_listener.py Modified event_ready() to remove explicit channel joining and add debug logging for connected channels and bot methods
.github/workflows/tests.yml Reduced Python test matrix from multiple versions (3.9, 3.10, 3.11) to only Python 3.10
.github/workflows/build-and-release.yml Downgraded Python version from 3.11 to 3.10 in both build and release jobs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

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()]}")
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This debug logging statement appears to be temporary debugging code and should be removed before merging. Logging all methods with 'channel' or 'join' in their names could expose unnecessary internal implementation details and adds no value in production. Consider removing this line or moving it to a more targeted test/debugging context.

Suggested change
logger.debug(f"Bot methods: {[m for m in dir(self) if 'channel' in m.lower() or 'join' in m.lower()]}")

Copilot uses AI. Check for mistakes.
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.10']
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing Python 3.9 and 3.11 from the test matrix reduces test coverage across supported Python versions. The README.md states the project requires "Python 3.9+" (line 130), but this change only tests Python 3.10. Consider either:

  1. Keeping the original matrix to test across all supported versions (3.9, 3.10, 3.11), or
  2. Updating the README.md to reflect the actual supported Python version if only 3.10 is supported.

This ensures consistency between documentation and CI testing.

Copilot uses AI. Check for mistakes.
Comment on lines +26 to +29
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.10'
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change downgrades the Python version from 3.11 to 3.10, which is inconsistent with the project's stated requirements. The README.md specifies "Python 3.9+" (line 130). If Python 3.10 is specifically required for the build process, the documentation should be updated to clarify this. Otherwise, consider using Python 3.11 to align with the latest stable version and ensure forward compatibility.

Copilot uses AI. Check for mistakes.
Comment on lines +415 to +418
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.10'
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change downgrades the Python version from 3.11 to 3.10, which is inconsistent with the project's stated requirements. The README.md specifies "Python 3.9+" (line 130). If Python 3.10 is specifically required for the build process, the documentation should be updated to clarify this. Otherwise, consider using Python 3.11 to align with the latest stable version and ensure forward compatibility.

Copilot uses AI. Check for mistakes.
Comment on lines +335 to +342
# 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()]}")

Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The modified event_ready method now relies on TwitchIO's automatic channel joining behavior instead of explicitly calling join_channels(). This behavioral change lacks test coverage. Consider adding a test to verify that:

  1. Channels specified in initial_channels are automatically joined
  2. The connected_channels attribute is properly populated after the bot is ready
  3. The bot can successfully receive messages from the auto-joined channel

This is especially important given the comment mentions this is a TwitchIO 3.x-specific behavior that should be verified.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

✅ Windows Build Successful

Executable: ChatYapper.exe (62.64 MB)
MSI Installer: ChatYapper-1.3.1.msi (61.98 MB)
App Version: 1.3.1
Build ID: build-v1.3.1-2025.11.25-8844929
Commit: 8844929

Build Status

  • ✅ Windows executable & MSI installer
  • 🔄 Linux build (check separate job)
  • 🔄 Docker image (check separate job)

Download the artifacts from the workflow run to test before merging.

Once merged to main, an official release will be created automatically with tag v1.3.1.

@github-actions
Copy link

🐳 Docker Image Built Successfully

Image: ghcr.io/pladisdev/chat-yapper:pr-8844929
Tag: pr-8844929

Test this PR with Docker:

docker pull ghcr.io/pladisdev/chat-yapper:pr-8844929

docker run -d \
  --name chat-yapper-pr \
  -p 8069:8008 \
  -e TWITCH_CLIENT_ID=your_id \
  -e TWITCH_CLIENT_SECRET=your_secret \
  ghcr.io/pladisdev/chat-yapper:pr-8844929

Access at: http://localhost:8069

The Docker image will be published to the GitHub Container Registry when merged to main.

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