Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Computer Use (Windows/UIA): snapshot element list is flattened in reverse pre-order; ToggleState not exposed

オープン
#67 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
49/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
desktop

調査の方向性

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:

  1. 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).

  2. 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 and UIA_ToggleToggleStatePropertyId is
    readable. (By contrast, textfield value is 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.children is an ordered Vec; accesskit_consumer 0.38.0
    iterates it unchanged; accesskit_windows 0.34.0 Navigate uses
    filtered_children order (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
スター
86
フォーク
51
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

zai-org/zcode-plugins のほかの issue

zai-org/zcode-plugins の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。