[GH-ISSUE #781] Compiled AppKit NIB hierarchies omit serialized view parent links #338

Closed
opened 2026-10-15 18:24:04 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @rudycelekli on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/781

Reproduction

A benign AppKit XIB based on the repository's tests/conformance/interface-builder/Main.xib, compiled with actual xcrun ibtool, encodes each nested view's parent in NSSuperview. The public built decode-interface-builder CLI sees the view objects but does not include these parent/child links: four nested views plus the existing button omit all five links; forty nested views omit all forty-one links. Both results nevertheless report hierarchy_complete: true and complete hierarchy coverage.

A native window XIB additionally encodes NSWindowTemplate.NSWindowView, which is also absent from the projected hierarchy. ibtool --hierarchy does not open compiled NIBs here; the reproduction uses the actual source XIB, actual compiler output and unchanged serialized-record decoder, not an unsupported native inspection claim.

The decoder currently starts from NSIBObjectData.NSRoot, which is the archive owner in these files. It consequently misses the separately encoded view tree. Existing recursive projection bounds also need to remain visible as partial coverage.

Expected behavior

Represent the explicitly encoded view-parent relationships, preserve existing recognized root/window relationships, and report partial coverage for missing, conflicting, cyclic or bounded links. No inferred parentage, schema expansion or target/UI execution is needed.

Native macOS reproduction only. This is the compiled-NIB hierarchy portion of the existing #480 scope. AI-assisted investigation and independent source review.

Originally created by @rudycelekli on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/781 ## Reproduction A benign AppKit XIB based on the repository's `tests/conformance/interface-builder/Main.xib`, compiled with actual `xcrun ibtool`, encodes each nested view's parent in `NSSuperview`. The public built `decode-interface-builder` CLI sees the view objects but does not include these parent/child links: four nested views plus the existing button omit all five links; forty nested views omit all forty-one links. Both results nevertheless report `hierarchy_complete: true` and complete hierarchy coverage. A native window XIB additionally encodes `NSWindowTemplate.NSWindowView`, which is also absent from the projected hierarchy. `ibtool --hierarchy` does not open compiled NIBs here; the reproduction uses the actual source XIB, actual compiler output and unchanged serialized-record decoder, not an unsupported native inspection claim. The decoder currently starts from `NSIBObjectData.NSRoot`, which is the archive owner in these files. It consequently misses the separately encoded view tree. Existing recursive projection bounds also need to remain visible as partial coverage. ## Expected behavior Represent the explicitly encoded view-parent relationships, preserve existing recognized root/window relationships, and report partial coverage for missing, conflicting, cyclic or bounded links. No inferred parentage, schema expansion or target/UI execution is needed. Native macOS reproduction only. This is the compiled-NIB hierarchy portion of the existing #480 scope. AI-assisted investigation and independent source review.
bsakaguchi 2026-10-15 18:24:04 +00:00
Author
Owner

@kaoru0822-kitauji commented on GitHub (Oct 7, 2026):

Fixed on main (#815), after 4.1.0. NibViewHierarchy now projects each serialized NSSuperview link and the NSWindowTemplate.NSWindowView relation instead of starting only from NSIBObjectData.NSRoot. It reports hierarchy_complete: false when a link is missing, conflicting, cyclic, or past the projection depth bound.

tests/boundary/filesystem/nibNativeHierarchy.test.ts compiles XIBs with real ibtool and covers:

  • 4 and 40 nested views, with every serialized superview link recovered;
  • the window-to-content-view relation kept alongside the superview links;
  • partial coverage beyond the projection depth bound.

It passes in the macOS "Real Apple artifact CLI/MCP E2E" CI job (6/6 on today's run against current main).

This ships in the next release (release PR #771).

<!-- gh-comment-id:6041898406 --> @kaoru0822-kitauji commented on GitHub (Oct 7, 2026): Fixed on `main` (#815), after 4.1.0. `NibViewHierarchy` now projects each serialized `NSSuperview` link and the `NSWindowTemplate.NSWindowView` relation instead of starting only from `NSIBObjectData.NSRoot`. It reports `hierarchy_complete: false` when a link is missing, conflicting, cyclic, or past the projection depth bound. `tests/boundary/filesystem/nibNativeHierarchy.test.ts` compiles XIBs with real `ibtool` and covers: - 4 and 40 nested views, with every serialized superview link recovered; - the window-to-content-view relation kept alongside the superview links; - partial coverage beyond the projection depth bound. It passes in the macOS "Real Apple artifact CLI/MCP E2E" CI job (6/6 on today's run against current `main`). This ships in the next release (release PR #771).
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#338
No description provided.