Add act_in_view: scroll a target into view, then act when actionable#451
Merged
Conversation
Composes scroll_find.scroll_until_visible with actionability.act_when_ready so a 'click the off-screen row' step works in one call: scroll until the target is located, then run the actionability gate at its point and perform the action. ScrollPlan bundles the scroll search + locator/scroller seams to keep the call within the argument limit; the actionability probes and gate config are injectable, so the whole flow is testable without a screen.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 14 |
| 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
Completes the ROUND-15 input-fidelity lane's composition gap (previously deferred for an argument-count concern, now solved by bundling the scroll seams into
ScrollPlan).Two reliability primitives stayed separate:
scroll_find.scroll_until_visiblebrings an off-screen target on-screen,actionability.act_when_readygates on visible/stable/enabled/unoccluded before acting. A real "click the off-screen row" step needs both.utils/act_in_view/:act_in_view(scroll until the target is located, then run the actionability gate at its point and performaction),ScrollPlan(bundles the scroll searchkind/direction/max_scrolls/scroll_amount+ injectablelocator/scroller— keeps the call at ≤7 params). The actionability probes (region_sampler/enabled_probe/hit_tester) and gateconfigare injectable; reusesscroll_until_visible+act_when_ready. Fully testable without a screen.__all__;AC_act_in_viewexecutor command (scroll-find + click);ac_act_in_viewMCP tool (side-effect); Script Builder under Flow.act_in_view(arbitrary action + probes) is the Python-API surface.v221_features_doc.rst+WHATS_NEW.md.Test
test/unit_test/headless/test_act_in_view_batch.py— scrolls-then-acts (counts scrolls, acts at located point), acts-immediately-when-visible, raises when never found, and honours the actionability gate (waits for an injectedenabled_probevia a fake-clockGateConfigbefore clicking), plus facade + executor/MCP/builder wiring. All 6 green;ruff+bandit+radonclean; no float==; package stays Qt-free.