fix(artifacts): project compiled AppKit actions from the control to its target
NSNibControlConnector archives the sending control as NSSource and the action target as NSDestination; a nil target is the first responder. The NIBArchive projection swapped them for control connectors, so every compiled AppKit action ran from its target to the control. The action trace, which follows control -> action, could not find them, and the selector node was keyed by the control instead of the target class. When the target was nil, the swapped source was null and the action was dropped: Chess lost 29 menu actions, KeepingYouAwake 7. Connectors now keep NSSource -> NSDestination. The NIBArchive test encoder moves to a fixture module so a bundle test can build compiled NIBs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f430c416c7
commit
b08228d19f
@@ -255,16 +255,14 @@ const projectNibArchive = (archive: NibArchiveDocument) => {
|
||||
: className.includes("Control")
|
||||
? "action"
|
||||
: className;
|
||||
const controlAction = className.includes("Control");
|
||||
const connectionSource = controlAction ? destination : source;
|
||||
const connectionDestination = controlAction ? source : destination;
|
||||
if (connectionSource === null) continue;
|
||||
(connections[String(connectionSource)] ??= []).push({
|
||||
// NSSource is the outlet owner or the sending control; NSDestination is
|
||||
// the outlet value or the action target, and a nil target is the first
|
||||
// responder.
|
||||
(connections[String(source)] ??= []).push({
|
||||
type,
|
||||
"destination-id":
|
||||
connectionDestination === null ? null : String(connectionDestination),
|
||||
"destination-id": destination === null ? null : String(destination),
|
||||
label,
|
||||
source_id: String(connectionSource),
|
||||
source_id: String(source),
|
||||
archive_object_id: String(object.id),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user