fix(ORA): moveTo + pause + click + pause + Win+D (séquence validée par Dom)
Some checks failed
security-audit / Bandit (scan statique) (push) Successful in 13s
security-audit / pip-audit (CVE dépendances) (push) Successful in 11s
security-audit / Scan secrets (grep) (push) Successful in 9s
tests / Lint (ruff + black) (push) Successful in 15s
tests / Tests unitaires (sans GPU) (push) Failing after 15s
tests / Tests sécurité (critique) (push) Has been skipped

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dom
2026-04-22 20:06:55 +02:00
parent a718086140
commit 99d2083dea

View File

@@ -926,29 +926,17 @@ Règles:
pyautogui.hotkey('super', 'd') pyautogui.hotkey('super', 'd')
time.sleep(1.0) time.sleep(1.0)
else: else:
# Pas de dialogue connu → fenêtre devant → focus VM + Win+D # Pas de dialogue connu → fenêtre devant → clic focus + Win+D
print(f"🔧 [ORA/recovery/overlay] Fenêtre devant — focus VM + Win+D") print(f"🔧 [ORA/recovery/overlay] Fenêtre devant — clic focus + Win+D")
try: if PYAUTOGUI_AVAILABLE:
# Trouver la fenêtre QEMU/VM et lui donner le focus screen_w, screen_h = pyautogui.size()
result = subprocess.run( pyautogui.moveTo(screen_w // 2, screen_h // 2)
['xdotool', 'search', '--name', 'QEMU'], time.sleep(0.3)
capture_output=True, text=True, timeout=2 pyautogui.click()
) time.sleep(0.5)
vm_windows = result.stdout.strip().split('\n') pyautogui.hotkey('super', 'd')
if vm_windows and vm_windows[0]: time.sleep(1.0)
subprocess.run(['xdotool', 'windowactivate', vm_windows[0]], timeout=2) print(f"✅ [ORA/recovery/overlay] Clic + Win+D envoyé")
time.sleep(0.5)
subprocess.run(['xdotool', 'key', 'super+d'], timeout=2)
time.sleep(1.0)
print(f"✅ [ORA/recovery/overlay] Focus VM + Win+D envoyé")
elif PYAUTOGUI_AVAILABLE:
pyautogui.hotkey('super', 'd')
time.sleep(1.0)
except Exception as e:
print(f"⚠️ [ORA/recovery/overlay] Erreur focus VM: {e}")
if PYAUTOGUI_AVAILABLE:
pyautogui.hotkey('super', 'd')
time.sleep(1.0)
# --- Étape 3 : Retry l'action originale --- # --- Étape 3 : Retry l'action originale ---
act_ok = self.act(decision, step_params) act_ok = self.act(decision, step_params)