fix(apple): type a text-entry-trait element as a text input in the simulator AX tree

Merged
KA
17h ago
+79-2

Summary

The Simulator AX snapshot typed a custom-drawn iOS text input as a non-editable Other, while the XCTest snapshot types the same element TextView with editable: true. A Compose Multiplatform 1.12 BasicTextField reports automation type Other, but its traits word (140746078552064) carries text entry (bit 18) and text area (bit 47). XCTest types from those bits, and now the bridge decoder does too, for an Other only: text entry gives TextField, plus secure text field (bit 24) SecureTextField, search field (bit 10) SearchField, or text area (bit 47) TextView. interpretIosNode then marks the input editable.

Clients that check editable (e2e's fill and its agent's view of the screen) treated these fields as non-inputs. That failed the tester-army/e2e Kotlin Multiplatform nightly on iOS.

4 files: tree.ts, tree.test.ts, an amendment to ADR 0004 next to the tab-button trait rule, and a changeset.

Validation

Tested at ce8afdf on base b396bd0.

  • vitest run packages/platform-apple packages/capture-kit: 350 files and 3324 tests pass. pnpm lint passes.

  • pnpm check:affected --run --head fails at typecheck with Cannot find name '__OWNER_FILES__' in command-registry/src/registry.ts. The same error happens on b396bd0 in this checkout. It isn't from this change.

  • Live run on an iPhone 18 Pro simulator with iOS 27, using bin/agent-device.mjs from this build. The run used the examples/with-kotlin-multiplatform app from tester-army/e2e. The name field on the bridge route (with pid) changed:

    • base: type: Other, no editable
    • head: type: TextView, editable: true

    The e2e iOS suite passes 5 of 5 against this build.

  • Not run: device lanes and coverage; CI owns them.