v0.3.1 — fix freeze UI dû au polling PZ synchrone#1
Merged
Conversation
Le poll PZ (tasklist toutes les 15 s) tournait sur le main thread tkinter. Sur les PC où tasklist est lent (antivirus, beaucoup de process), l'UI freezait plusieurs secondes à chaque tick. is_pz_running() est maintenant exécuté dans un thread daemon ; le résultat est marshalé sur le main thread via self.after(0, ...). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_poll_pz()exécutaitis_pz_running()→subprocess.run(["tasklist", ...])de manière synchrone sur le main thread tkinter. Sur certains PC (antivirus actif qui inspecte le call, beaucoup de process),tasklistpeut prendre 5-30 secondes, ce qui bloquait l'UI à chaque tick (toutes les 15 s). Symptôme remonté en early testing : « l'app freeze à chaque clic ».threading.Thread(daemon=True). Le résultat est marshalé sur le main thread viaself.after(0, self._handle_pz_poll_result, running). Logique métier (transition running → stopped, prompt push, footer status) inchangée — juste déportée dans une méthode séparée.0.3.0→0.3.1. CHANGELOG + release notes ajoutés. Placeholder de version dans le bug report template mis à jour.Fichiers modifiés
src/pzsavesync/gui.py—import threading, refonte_poll_pz(), nouvelle méthode_handle_pz_poll_result(), bumpAPP_VERSIONCHANGELOG.md— entrée[0.3.1]docs/release_notes_v0.3.1.md— nouveau fichier (utilisé parrelease.yml).github/ISSUE_TEMPLATE/bug_report.yml— placeholder versionTest plan
py_compile src/pzsavesync/gui.py→ OKpytest tests/→ 45 passed en 1.40s🎮 PZ détectés'affiche toujours quand PZ tourne.exefinalNotes pour le reviewer
v0.3.1est créé en local mais pas encore pushé : à pousser après merge de cette PR pour déclencherrelease.ymlproprement sur le commit de merge..exe. Config / profils / historique préservés.🤖 Generated with Claude Code