Skip to content

fix(epoch+set_text): epoch stable au focus + repli de saisie sur champ web#6

Merged
Destynova2 merged 1 commit into
mainfrom
fix/field-type-fallback-focus-epoch
Jun 30, 2026
Merged

fix(epoch+set_text): epoch stable au focus + repli de saisie sur champ web#6
Destynova2 merged 1 commit into
mainfrom
fix/field-type-fallback-focus-epoch

Conversation

@Destynova2

Copy link
Copy Markdown
Contributor

Contexte

Suite du fix epoch (#5). Le test live sur Firefox (page Uber Eats en arrière-plan, cible volontairement dure) a sorti 2 issues bornées, corrigées ici.

A — epoch stable quand on focalise un champ

Après focus_window, l'epoch re-churnait : focaliser un champ web insère un nœud caret / focus-ring transitoire dans l'arbre AX → ça changeait l'ensemble structurel hashé par ui_fingerprint.
Fix : le fingerprint exclut les nœuds décoratifs transitoires (rôles caret/focus-ring/selection/text-marker, ou caret ~1px) — feuilles sans action/drag/état de contrôle — et normalise le path après leur retrait (un caret inséré ne décale plus le path des vrais voisins). → focaliser un champ ne change plus l'epoch.

B — saisie robuste sur champ web + diagnostic actionnable

apply_selections set_text sur un champ AX web Firefox en arrière-plan échouait en actuator returned Failed opaque (la frappe élément-bound n'atterrit pas hors focus).
Fix — chaîne de repli sur champ AX :

  1. type_into
  2. focus_window + Focus élément → type_into
  3. clic du champ → set_field_text (remplacement par paste presse-papier)

Chaque tentative est vérifiée (valeur == texte demandé). Si tout échoue → erreur actionnable :

web text field could not receive input in background; the target window may need to be frontmost/focused - try focus_window or raise the window

Sémantique fail-honest préservée (un échec reste rapporté, jamais de faux succès). Gate batch ajusté pour ne pas re-prompter dans un batch déjà approuvé.

La frappe Firefox-arrière-plan reste best-effort (limite structurelle de Firefox) ; le gain garanti = epoch stable au focus + vrai repli + diagnostic clair, tout couvert par tests.

Validation locale

cargo build ✅ · cargo clippy --workspace --all-targets -- -D warnings ✅ · cargo test ✅ (250 tests).

3ᵉ PR au format grob — ciblée, issue d'un test live sur la cible dure.

…p web

Decouvert au test live sur Firefox (arriere-plan).
A) ui_fingerprint exclut les noeuds decoratifs transitoires (caret/focus-ring/selection/text-marker, ou caret ~1px) et normalise le path apres leur retrait -> focaliser un champ ne fait plus churner l'epoch.
B) set_text sur champ AX: chaine de repli type_into -> focus_window+Focus+retry -> clic+set_field_text (paste presse-papier), chaque tentative verifiee ; si tout echoue, erreur actionnable au lieu de 'actuator returned Failed' ; gate batch ajuste pour ne pas re-prompter dans un batch deja approuve. Frappe Firefox-arriere-plan reste best-effort.
@Destynova2 Destynova2 enabled auto-merge June 30, 2026 18:29
@Destynova2 Destynova2 added this pull request to the merge queue Jun 30, 2026
Merged via the queue into main with commit 64d706c Jun 30, 2026
17 checks passed
@Destynova2 Destynova2 deleted the fix/field-type-fallback-focus-epoch branch June 30, 2026 18:47
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.

1 participant