fix(describe-ui): Add point option support#39
Conversation
Expose the documented --point option on describe-ui and route point lookups through the simulator accessibility API instead of relying on full-tree output alone. Add command-surface and E2E coverage for help, validation, and point-specific payload shape so the CLI contract stays aligned with the runtime behavior and bundled skill docs. Fixes #38 Co-Authored-By: OpenAI Codex <noreply@openai.com>
WalkthroughThis pull request implements the 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Skills/CLI/axe/SKILL.md (1)
75-75:⚠️ Potential issue | 🟡 MinorInconsistency: "Every command" contradicts earlier guidance.
Line 8 states that commands like
list-simulatorsandinitdo not require--udid, but line 75 says "Every command includes--udid". The sibling fileSources/AXe/Resources/skills/axe/SKILL.mdcorrectly says "Every simulator-interaction command includes--udid" on its corresponding line.Suggested fix
Before finalising guidance, verify: -- Every command includes `--udid`. +- Every simulator-interaction command includes `--udid`.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Skills/CLI/axe/SKILL.md` at line 75, The sentence "Every command includes `--udid`" is inconsistent with earlier guidance and the sibling doc; update the phrase in SKILL.md (the occurrence of "Every command includes `--udid`") to read "Every simulator-interaction command includes `--udid`" so it matches the earlier note that commands like `list-simulators` and `init` do not require --udid.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@Skills/CLI/axe/SKILL.md`:
- Line 75: The sentence "Every command includes `--udid`" is inconsistent with
earlier guidance and the sibling doc; update the phrase in SKILL.md (the
occurrence of "Every command includes `--udid`") to read "Every
simulator-interaction command includes `--udid`" so it matches the earlier note
that commands like `list-simulators` and `init` do not require --udid.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 013a23fb-1bb6-48c9-a14b-f5ac90cbb9c6
📒 Files selected for processing (7)
CHANGELOG.mdSkills/CLI/axe/SKILL.mdSources/AXe/Commands/DescribeUI.swiftSources/AXe/Resources/skills/axe/SKILL.mdSources/AXe/Utilities/AccessibilityFetcher.swiftTests/DescribeUITests.swiftTests/TestUtilities.swift
Add the documented
describe-ui --point <x,y>option and route point lookups through the simulator accessibility API.The issue here was a contract mismatch: the docs already described
--point, but the CLI help and runtime implementation only exposed full-treedescribe-ui. This change makes the command surface, runtime behavior, and shipped skill docs agree, and adds stronger automated coverage around the point-specific payload shape returned from the simulator.I kept the fix narrow. The command still uses the existing accessibility fetch path, but now calls the point-specific simulator API when
--pointis provided. I also updated the E2E test to assert the stable shape of the returned accessibility object rather than only checking thatBackButtonappeared somewhere in the output.Fixes #38
Note
Medium Risk
Changes
describe-uiruntime behavior and output shape when--pointis used by routing through a different simulator accessibility API, which could affect downstream tooling/tests relying on previous output.Overview
Implements the documented
describe-ui --point <x,y>flag, including argument validation, and routes point lookups throughFBSimulator.accessibilityElement(at:nestedFormat:)while preserving full-tree behavior when omitted.Updates shipped skill docs and the
CHANGELOG, and expands test coverage to assert the flag appears in help output, rejects invalid formats, and validates the single-element JSON payload returned for a targeted point (including updated JSON parsing helpers to handle object-vs-array results and additional fields likeAXUniqueId).Written by Cursor Bugbot for commit 17a3997. This will update automatically on new commits. Configure here.