Computer Use (Windows/UIA): snapshot element list is flattened in reverse pre-order; ToggleState not exposed
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start by tracing the Windows computer-use snapshot code that builds the flat element listing and renders element attributes; the issue does not name those files or tests. Check how traversal order is produced and which UIA properties are included. Done means the listing follows forward pre-order (or documents its order) and exposes applicable state attributes, including ToggleState; run the relevant snapshot tests.
由索引模型根據 Issue 內容生成。
描述
Environment
- ZCode computer-use plugin 0.6.3 (official), Windows 10 x64 (19045)
- App under test: a GPUI (gpui-kit 0.7.0) Todo list on Windows, observed via the
UIA accessibility path (get_app_state/getAXState)
Summary
Two consumer-side issues in the Windows computer-use snapshot element listing:
-
Element order is reverse pre-order. The flat element list enumerates the
UIA tree like a stack-based DFS that emits a node before pushing its
children in order — equivalent to a DFS pre-order with every sibling group
reversed. Flat indices therefore do not match visual order: within each
container the list runs bottom-row → top-row. We verified this across four
distinct container levels in one app (table rows, a toolbar, a form row, an
inline edit card). -
ToggleState is missing from the listing. Checkbox elements show only
checkbox (pressable) actions=[AXToggle,AXPress]with no state field, even
though the element advertises the toggle action — which in UIA implies the
Toggle pattern is registered andUIA_ToggleToggleStatePropertyIdis
readable. (By contrast, textfieldvalueis shown, so attribute display
is selective rather than absent.)
Why we're confident it's the snapshot layer, not the app toolkit
We verified the app's whole a11y chain is strictly order-preserving and
state-reporting:
- gpui builds accesskit children in document order during prepaint DFS
(window/a11y.rs:429-440,element.rs:367-406); NodeId is identity-only. - accesskit 0.24.1
Node.childrenis an ordered Vec; accesskit_consumer 0.38.0
iterates it unchanged; accesskit_windows 0.34.0Navigateuses
filtered_childrenorder (the filter drops, never reorders). - accesskit_windows registers TogglePattern with a proper ToggleState for
checkboxes (node.rs:575-585,1332-1335). - Windows Inspect.exe shows the same tree in visual order with readable
ToggleState.
Replaying 12 captured snapshots against the reverse-pre-order model reproduced
the emitted listing character-for-character, including which elements
appear before/after others in every container. Tree-shape changes (adding a
row, opening an edit card) explain all frame-to-frame index shifts.
Impact
An agent clicking by flat index hits a visually different row than intended
(observed: "click row 2 by index" landed on visual row 3 — the click used the
element's own bounds, so it struck the element the index actually named).
Checkbox verification cannot be asserted from the snapshot at all.
Suggested fixes
- Flatten in forward pre-order (FirstChild → NextSibling semantics), or at
minimum document that flat order is reverse pre-order. - Include state attributes in element lines: ToggleState (On/Off), Value,
IsSelected where applicable.
- 主要語言
- Python
- 星號
- 124
- 分支
- 93
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
zai-org/zcode-plugins 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
zai-org/zcode-plugins#107 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 85/100
zai-org/zcode-plugins#106 ·
維護者通常 1 天內回覆
-
video-agent-kit (0.4.3): hooks invoke python3, which doesn't exist on Windows — SessionStart/UserPromptSubmit/Stop hooks fail on every trigger可能已有人在做 @dvd233 於 38 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 85/100
zai-org/zcode-plugins#14 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 35/100
zai-org/zcode-plugins#141 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 57/100
zai-org/zcode-plugins#135 ·
維護者通常 1 天內回覆
查看 zai-org/zcode-plugins 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
namespace operations
難度 1/5 1 小時以內 新手友好度 65/100
EclipseFdn/open-vsx.org#15057 ·
維護者通常 1 天內回覆
-
Mission statement: why this is free, in the README, Why This Exists and the wiki Home可能已有人在做 @ChiefGyk3D 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
ChiefGyk3D/Clouds-Against-Humanity#348 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 74/100
vllm-project/vime#508 ·
維護者通常 4 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆