Add app_idle: wait until the app's busy signal settles before acting#440
Merged
Conversation
A click fired while the app is still churning (busy cursor up, dialog mid-paint, long handler running) is dropped or mis-targeted. smart_waits watches pixels settle; this watches the busy signal settle, reusing settle_detector.SettleTracker over a 1.0-busy/0.0-idle series. The busy probe (default Windows busy cursor) and clock/sleep are injectable, so the settle gate is fully testable without an app.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 28 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
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
Fifth feature of the ROUND-15 input-fidelity lane. A click fired while the app is still churning (busy cursor up, dialog mid-paint, long handler running) is dropped or mis-targeted.
smart_waitswatches pixels settle; this watches the app's busy signal settle — cheaper, and survives animated-but-idle UI.utils/app_idle/:wait_until_app_idle(poll an injectablebusy_probeuntil the app reads idle forquiet_samplespolls in a row, or timeout; injectableclock/sleep),idle_point(pure analyser over a recorded busy/idle trace). Reusessettle_detector.SettleTracker— feeds 1.0 when busy / 0.0 when idle, a busy spike resets the quiet run. Default probe = Windows busy/app-starting cursor (GetCursorInfovsIDC_WAIT/IDC_APPSTARTING).__all__;AC_wait_until_app_idle/AC_idle_pointexecutor commands; matching read-onlyac_*MCP tools; Script Builder under Flow.v213_features_doc.rst+WHATS_NEW.md.Test
test/unit_test/headless/test_app_idle_batch.py— pureidle_point(settles after busy run / resets on spike / never settles / immediate),wait_until_app_idlesettles + times-out with injected probe+clock+sleep, JSON-list executor coercion, plus facade + executor/MCP/builder wiring. All 9 green;ruff+bandit+radonclean; no float==; package stays Qt-free.