Skip to content

Add virtualized: realize off-screen items in virtualized lists/grids#415

Merged
JE-Chen merged 1 commit into
devfrom
feat/virtualized-batch
Jun 24, 2026
Merged

Add virtualized: realize off-screen items in virtualized lists/grids#415
JE-Chen merged 1 commit into
devfrom
feat/virtualized-batch

Conversation

@JE-Chen

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

Copy link
Copy Markdown
Member

Why

Long lists, data grids and trees (WPF / WinUI / File Explorer / virtual treeviews) only materialize the rows scrolled into view — an off-screen row has no accessibility element at all. So list_accessibility_elements / read_control_table / select_control_item simply cannot see it, and scroll_control_into_view can't help because the target element doesn't exist yet. This is the classic "element not found in a long list" wall — and the highest-leverage UIA gap (per ROUND-15 research).

realize_item locates the item inside its container by property (UIA ItemContainerPattern.FindItemByProperty) and realizes it (VirtualizedItemPattern.Realize) so it materializes as a real, clickable element.

Design

  • First feature of the ROUND-15 native-UIA depth lane. Extends the accessibility backend ABC (base.py with an _unsupported default) + real UIA in windows_backend.py (pattern IDs ItemContainer=10019 / VirtualizedItem=10020; FindItemByProperty by Name=30005 or AutomationId=30011, then Realize) + a utils/virtualized/ facade dispatching get_backend() — the same fake-backend seam as control_patterns / ax_text.
  • 5 layers wired: core → facade __all__AC_realize_item → read-only ac_realize_item MCP tool → Script Builder (Native UI). Qt-free verified.

Tests

test/unit_test/headless/test_virtualized_batch.py — fake backend (matching the ABC signature) covers realize-returns-element, not-found → None, by="automation_id", the unsupported-backend error, the executor {found, element} wrapper, and 5-layer wiring. 22 passed with the control_patterns / ax_text siblings. Real UIA not executed in CI (no Windows backend), matching the rest of the accessibility lane.

Long lists/grids/trees only materialize visible rows, so an off-screen
row has no accessibility element at all - list/read_table/select can't
see it and scroll_control_into_view can't help because it doesn't exist
yet. realize_item locates the item by property (ItemContainerPattern)
and realizes it (VirtualizedItemPattern) so it becomes a real element.
Extends the backend ABC + Windows UIA backend via the same fake-backend
seam as control_patterns.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 23 complexity · 2 duplication

Metric Results
Complexity 23
Duplication 2

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 5368cd6 into dev Jun 24, 2026
16 checks passed
@JE-Chen JE-Chen deleted the feat/virtualized-batch branch June 24, 2026 18:39
@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