Repository navigation
Fix MCP identifiers and detail reads for SwiftUI virtual nodes - #46
Merged
Merged
Conversation
Use deferred detail IDs for virtual nodes and namespaced handles for older inline payloads. Route lookup through the same identifier mapping, serve inline details without an invalid RPC, and recognize custom attribute groups as cached details. Validation: Host build and MCP bridge tests passed, including 105 virtual nodes. iOS 27 end-to-end checks found 117 unique detailed-mode nodes and 30 unique compact-mode nodes; all seven Text nodes returned details and cached attributes.
Use the system find command to enumerate core model sources on CI runners without ripgrep. Validated the entire MCP bridge test script with PATH restricted to macOS system directories.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SwiftUI virtual nodes were serialized through the native-object identifier path, so every node without a UIView/CALayer appeared as
0x0. A caller could not reliably address individual Text nodes, and custom-only attribute groups were incorrectly reported as uncached.Use the deferred detail oid when available, the existing SwiftUI handle for older inline payloads, and a separate host-local namespace for other custom nodes. Hierarchy serialization and lookup now share this mapping.
read_view_detailsreturns older inline details without sending an invalid RPC 203, whileread_attributesrecognizes custom groups and fetched empty groups as cached.Identifiers remain scoped to the current hierarchy; clients must rediscover nodes after a refresh.
Validation
Scripts/test-mcp-bridge.shpassed, including a run withPATH=/usr/bin:/bin:/usr/sbin:/sbin. The script uses systemfindso CI does not require ripgrep.read_view_detailswith no failed identifiers, and subsequentread_attributescalls reporteddetailsCached: true.Related changes