fix(ORA): Alt+Tab au lieu de windowminimize pour le recovery overlay
Some checks failed
security-audit / Bandit (scan statique) (push) Successful in 14s
security-audit / pip-audit (CVE dépendances) (push) Successful in 12s
security-audit / Scan secrets (grep) (push) Successful in 8s
tests / Lint (ruff + black) (push) Successful in 14s
tests / Tests unitaires (sans GPU) (push) Failing after 15s
tests / Tests sécurité (critique) (push) Has been skipped

windowminimize minimisait en boucle toutes les fenêtres (VM incluse).
Alt+Tab bascule juste le focus sans rien fermer/minimiser.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dom
2026-04-22 17:09:38 +02:00
parent d71d5df4a8
commit 26804eb123

View File

@@ -918,16 +918,16 @@ Règles:
print(f"✅ [ORA/recovery/overlay] Dialogue fermé")
time.sleep(0.5)
else:
print(f"⚠️ [ORA/recovery/overlay] Pattern non géré, minimisation fenêtre")
subprocess.run(['xdotool', 'getactivewindow', 'windowminimize'],
capture_output=True, timeout=2)
time.sleep(0.5)
print(f"⚠️ [ORA/recovery/overlay] Pattern non géré, essai Alt+Tab")
if PYAUTOGUI_AVAILABLE:
pyautogui.hotkey('alt', 'tab')
time.sleep(1.0)
else:
# Pas de dialogue connu → fenêtre quelconque devant → minimiser
print(f"🔧 [ORA/recovery/overlay] Aucun dialogue connu — minimisation de la fenêtre active")
subprocess.run(['xdotool', 'getactivewindow', 'windowminimize'],
capture_output=True, timeout=2)
time.sleep(0.5)
# Pas de dialogue connu → fenêtre devant → Alt+Tab pour basculer
print(f"🔧 [ORA/recovery/overlay] Fenêtre devant — Alt+Tab pour basculer")
if PYAUTOGUI_AVAILABLE:
pyautogui.hotkey('alt', 'tab')
time.sleep(1.0)
# --- Étape 3 : Retry l'action originale ---
act_ok = self.act(decision, step_params)