Add elements command for iOS accessibility tree dump#105
Merged
obj-p merged 2 commits intocli-mcp-parityfrom Apr 15, 2026
Merged
Add elements command for iOS accessibility tree dump#105obj-p merged 2 commits intocli-mcp-parityfrom
obj-p merged 2 commits intocli-mcp-parityfrom
Conversation
Forwards to the daemon's preview_elements MCP tool and prints the resulting JSON to stdout so callers can pipe into jq or consume from scripts. Session targeting mirrors configure/switch: --session, --file, or the sole running session. Also ignores .claude/scheduled_tasks.lock so it stops surfacing in git status. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ty stdout - The macOS-rejection test matched "ios" in lowercased stderr, which could incidentally pass on unrelated log lines. Pin it to the daemon's exact iOS-only message from MCPServer.swift:871. - Skip printing a trailing newline when the daemon returns an empty payload so downstream jq parsers don't see a stray \n. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
previewsmcp elementsas a daemon client for thepreview_elementsMCP tool.jq); log messages go to stderr.SessionResolverrules:--session <uuid>>--file <path>> sole running session.--filter {all,interactable,labeled}narrows the tree via the daemon..claude/scheduled_tasks.lockso it no longer shows up as untracked.Test plan
swift buildswift test --filter 'ElementsCommandTests/elementsNoSession'(passes locally)swift test --filter 'ElementsCommandTests/elementsRejectsMacOSSession'(passes locally, ~5s)🤖 Generated with Claude Code