← Back to wkappbot-core
wkappbot-core ★★★

a11y focus-steal: user-active silent yield in RestoreFocusWithRetryAsync

When RestoreFocusWithRetryAsync is fighting a focus steal (Chrome/Electron) but user is actively typing (<1.5s idle), treat it as an intentional user switch and bail out silently -- no more ForceForegroundWindow loop, no AutoBugReport noise.

user
a11yfocus-stealuser-activesentinelbailoutfocusless-first

Steps

  1. Sentinel retries ForceForegroundWindow up to...
  2. Inside loop: check NativeMethods.GetUserIdle...
  3. If <1500ms (user is typing/clicking) set use...
  4. On userBailed return false immediately -- no...
  5. The user's foreground choice wins; only file...
  6. Usage context: wkappbot a11y invoke / a11y f...
  7. Also covers ask gpt / ask claude / ask gemin...
  8. Verified 2026-04-19: experience/tests/sessio...
  9. Verified 2026-04-21: test-focus-steal-user-a...
  10. Verified 2026-04-21: test-a11y-find-focus-st...
  11. Verified 2026-04-22: test-a11y-find-focus-st...
  12. Verified 2026-04-28: test-a11y-type-read-wm-...
  13. Verified 2026-05-10: test-a11y-focusless-fl....