Repository navigation
fix(apple): join recognized keys from NIBArchive field maps - #2248
Conversation
inspect-asset-catalog returned no resource-key matches for a decoded NIBArchive resource whose recognized image key is present in the archive. The NIBArchive projection groups an object's decoded fields under the node's nibValues attribute beside the class, label and ID it derives from the same archive, while the AppKit keyed-archive parser flattens the same fields onto the node. The catalog join read only the top level, so a recognized NSImageName on a decoded resource produced no row, and the empty-catalog limitation still claimed resource keys were reported as unmatched. Read an archive object's fields from both shapes, and give the namespace one owner by exporting NIB_VALUES_ATTRIBUTE from the projection that writes it. The recognized-field set stays in the catalog analysis, which owns that contract. Verified with 5 focused catalog tests, check:fast and verify:test-discovery on macOS arm64, and through the public CLI against the reported NIBArchive fixture. The keyed-archive control keeps its existing row, and a NIBArchive with only an unrecognized title still produces none. The ibtool-dependent native hierarchy lane requires full Xcode and was unavailable here.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Fold the complementary implementation from morluto#2256 into the earlier morluto#2248 proposal, retaining the original contribution history. Co-authored-by: Thang Luu <[email protected]>
|
Kept this earlier PR and original commit as canonical. Folded @thangldw's #2256 producer-boundary normalization and CLI/MCP coverage with coauthor credit, and reviewed @Bappaditya-kuilya's #2249 independent alternative. The final consumer uses canonical fields and parsed resource kinds rather than separately interpreting nested maps. Spec review caught a further issue: image-named fields on controls/views must not create resource joins. That is fixed with a resource-kind guard and a rooted NSButton NIBArchive regression. All 49 focused catalog/public CLI/MCP/filesystem tests, full source checks and docs checks passed. These catalog records are fixture-supplied, not native assetutil validation. #2249 and #2256 can now close as consolidated here. |
Fold the complementary implementation from morluto#2256 into the earlier morluto#2248 proposal, retaining the original contribution history. Co-authored-by: Thang Luu <[email protected]>
Fixes #2176.
Behavior
Restore catalog rows for recognized scalar image/asset keys decoded from NIBArchive resource nodes. Normalize those fields once in the Interface Builder producer, sharing the recognized-key contract with the catalog consumer. Preserve the original
nibValues, authored field values, archive path/SHA-256 and node identity; account for the extra serialized strings in the decoder budget.The consumer reads the canonical attributes and parsed resource classification. It does not reinterpret nested archive objects or match image-named fields on controls/views. A recognized key produces unmatched, matched or ambiguous rows for zero, one or multiple catalog renditions, with the original source provenance.
Contributor preservation
Keep XiaoBinGan's earlier PR and commit as canonical. Folded thangldw's #2256 producer-boundary implementation and public CLI/MCP coverage with coauthor credit. Reviewed Bappaditya-kuilya's #2249 independent alternative and fixture coverage; its nested-field consumer representation is superseded by this single producer normalization.
Validation and scope
49 focused tests passed across the catalog workflow, public CLI/MCP resource-key joins and Interface Builder filesystem decoding.
npm run checkandnpm run docs:checkpassed. Spec review caught and fixed overbroad joins from non-resource nodes; a rooted NSButton NIBArchive now proves the negative case.The production archive parser, graph, CLI and MCP paths are exercised. Catalog records are injected/supplied fixtures: this does not establish native
assetutil, a realAssets.car, nativeUINibapplicability, or Windows/Linux behavior. Earlier contributor evidence reported 124 focused passes and a public CLI unmatched-row reproduction; its native hierarchy suite was unavailable on that contributor's CommandLineTools-only setup. Those historical results are not represented as new native-provider verification.