[PR #944] [MERGED] fix(native-ui): handle incomplete accessibility child collections #2522

Closed
opened 2026-10-17 21:07:07 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/944
Author: @morluto
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @morluto

Base: main ← Head: codex/native-ui-child-safety


📝 Commits (3)

  • cd7533f fix(native-ui): align verifier with scenario contract
  • f14fc26 perf(native-ui): reuse accessibility child counts
  • a560aa2 fix(native-ui): handle incomplete child collections

📊 Changes

6 files changed (+71 additions, -12 deletions)

View changed files

➕ bridge/native/NativeUIChildren.swift (+11 -0)
📝 bridge/native/ReaNativeUI.swift (+11 -7)
📝 package.json (+1 -0)
📝 scripts/verify-native-ui.mjs (+17 -3)
📝 src/native/NativeUiHelperRuntime.ts (+13 -2)
➕ tests/conformance/native/native-ui-children/main.swift (+18 -0)

📄 Description

Summary

The native UI bridge now reuses the remote accessibility child count while traversing a parent, avoiding a second count query. Traversal consumes only the children actually returned by AX; failed or short child retrieval is reported as incomplete instead of indexing past the returned collection. A shared Swift seam covers failed, short, complete, and over-budget results. The native verifier no longer supplies the stale restore input.

Verification

  • npm run format:check
  • npm run build:cached
  • npm run check:fast
  • npm run test:local -- src/native/NativeUiObservation.test.ts — 15 tests
  • npm run verify:native-ui — real macOS positive fixture, CLI action parity, digest mismatch rejection
  • npm pack --dry-run --json — includes bridge/native/NativeUIChildren.swift

Real Windows verification was not performed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/944 **Author:** [@morluto](https://github.com/morluto) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/native-ui-child-safety` --- ### 📝 Commits (3) - [`cd7533f`](https://github.com/morluto/rea/commit/cd7533f71385f6225d8fc47504c31c2129c8cdbd) fix(native-ui): align verifier with scenario contract - [`f14fc26`](https://github.com/morluto/rea/commit/f14fc26163a08abc893dfb1766bb3464480b2f09) perf(native-ui): reuse accessibility child counts - [`a560aa2`](https://github.com/morluto/rea/commit/a560aa2c17758e1b58ed89eab1e9eced8d8cba34) fix(native-ui): handle incomplete child collections ### 📊 Changes **6 files changed** (+71 additions, -12 deletions) <details> <summary>View changed files</summary> ➕ `bridge/native/NativeUIChildren.swift` (+11 -0) 📝 `bridge/native/ReaNativeUI.swift` (+11 -7) 📝 `package.json` (+1 -0) 📝 `scripts/verify-native-ui.mjs` (+17 -3) 📝 `src/native/NativeUiHelperRuntime.ts` (+13 -2) ➕ `tests/conformance/native/native-ui-children/main.swift` (+18 -0) </details> ### 📄 Description ## Summary The native UI bridge now reuses the remote accessibility child count while traversing a parent, avoiding a second count query. Traversal consumes only the children actually returned by AX; failed or short child retrieval is reported as incomplete instead of indexing past the returned collection. A shared Swift seam covers failed, short, complete, and over-budget results. The native verifier no longer supplies the stale restore input. ## Verification - `npm run format:check` - `npm run build:cached` - `npm run check:fast` - `npm run test:local -- src/native/NativeUiObservation.test.ts` — 15 tests - `npm run verify:native-ui` — real macOS positive fixture, CLI action parity, digest mismatch rejection - `npm pack --dry-run --json` — includes `bridge/native/NativeUIChildren.swift` Real Windows verification was not performed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:07:07 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2522
No description provided.