Skip to content

Add act_in_view: scroll a target into view, then act when actionable#451

Merged
JE-Chen merged 1 commit into
devfrom
feat/act-in-view-batch
Jun 26, 2026
Merged

Add act_in_view: scroll a target into view, then act when actionable#451
JE-Chen merged 1 commit into
devfrom
feat/act-in-view-batch

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Jun 26, 2026

Copy link
Copy Markdown
Member

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_visible brings an off-screen target on-screen, actionability.act_when_ready gates on visible/stable/enabled/unoccluded before acting. A real "click the off-screen row" step needs both.

  • Headless core utils/act_in_view/: act_in_view (scroll until the target is located, then run the actionability gate at its point and perform action), ScrollPlan (bundles the scroll search kind/direction/max_scrolls/scroll_amount + injectable locator/scroller — keeps the call at ≤7 params). The actionability probes (region_sampler/enabled_probe/hit_tester) and gate config are injectable; reuses scroll_until_visible + act_when_ready. Fully testable without a screen.
  • 5 layers wired: facade __all__; AC_act_in_view executor command (scroll-find + click); ac_act_in_view MCP tool (side-effect); Script Builder under Flow. act_in_view (arbitrary action + probes) is the Python-API surface.
  • Docs: EN + Zh 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 injected enabled_probe via a fake-clock GateConfig before clicking), plus facade + executor/MCP/builder wiring. All 6 green; ruff + bandit + radon clean; no float ==; package stays Qt-free.

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.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 14 complexity · 0 duplication

Metric Results
Complexity 14
Duplication 0

View in Codacy

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.

@JE-Chen JE-Chen merged commit 629cccb into dev Jun 26, 2026
16 checks passed
@JE-Chen JE-Chen deleted the feat/act-in-view-batch branch June 26, 2026 04:11
@sonarqubecloud

Copy link
Copy Markdown

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