Skip to content

Fix helper venv and gamepad discovery#39

Merged
Staphylococcus merged 2 commits into
mainfrom
fix/recreate-helper-venv
May 17, 2026
Merged

Fix helper venv and gamepad discovery#39
Staphylococcus merged 2 commits into
mainfrom
fix/recreate-helper-venv

Conversation

@Staphylococcus
Copy link
Copy Markdown
Owner

Summary

  • recreate the Python helper virtualenv during install so OS Python upgrades do not leave bscpylgtv installed under an old interpreter version
  • filter gamepad discovery with udev metadata before opening evdev nodes, so known keyboard/mouse/power-button devices are skipped while joystick candidates still report real permission failures
  • add DualSense-like discovery coverage for controllers that expose touch and motion metadata alongside joystick input

Validation

  • bash -n install.sh uninstall.sh configure.sh bin/LG_Buddy_Common scripts/build-release-bundle.sh scripts/test-release-bundle.sh scripts/publish-release-assets.sh
  • cargo fmt --all --check
  • cargo test -p lg-buddy session::gamepad::devices --lib
  • cargo test -p lg-buddy --lib
  • release bundle smoke test with --skip-pip-install during local diagnosis

@Staphylococcus Staphylococcus marked this pull request as ready for review May 15, 2026 14:37
Copilot AI review requested due to automatic review settings May 15, 2026 14:37
Copy link
Copy Markdown

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 improves installation robustness and gamepad discovery reliability by ensuring the Python helper virtualenv is recreated on install (avoiding breakage after OS Python upgrades) and by filtering input devices using udev metadata before attempting evdev inspection.

Changes:

  • Recreate the helper Python virtualenv during install using python3 -m venv --clear.
  • Add a release-bundle smoke-test assertion that stale venv contents are cleared during install.
  • Introduce udev-based pre-filtering for /dev/input/event* nodes and add test coverage for joystick/mouse/keyboard classification and DualSense-like devices.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
scripts/test-release-bundle.sh Adds a smoke-test marker to verify install clears stale venv contents.
install.sh Recreates the Python helper venv with --clear to avoid stale interpreter-specific site-packages.
crates/lg-buddy/src/session/gamepad/devices.rs Adds udev metadata parsing/classification to skip known non-gamepad devices before evdev open; expands tests.

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

Comment thread crates/lg-buddy/src/session/gamepad/devices.rs
@Staphylococcus Staphylococcus merged commit bc630e0 into main May 17, 2026
8 checks passed
@Staphylococcus Staphylococcus deleted the fix/recreate-helper-venv branch May 17, 2026 02:20
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