Skip to content

Compiled AppKit NIB hierarchies omit serialized view parent links #781

Closed

Description

@rudycelekli

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.

Activity

  1. kaoru0822-kitauji commented on Oct 7, 2026

    @kaoru0822-kitauji
    Collaborator

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

  2. added
    bug
    area: native
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: nativebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions