feat: add semantic selectors and session management#15
Open
Conversation
- Add --text option: find element by AXLabel/AXValue (case-insensitive partial match) via live UI tree query - Add --type/--index options: find element by type with optional 0-based index among matches - Both tap and fill now support 4 target modes: -x/-y, --ref, --text, --type (mutually exclusive via clap conflicts) - Fill --target for text-based element search, --type/--index for type - Add find_by_text() and find_by_type_index() to snapshot module - resolve_live_element() helper queries idb describe-all on the fly
Add era session connect/list/disconnect/disconnect-all commands. Sessions store UDID, device name, and auto-detected scale factor in ~/.era/sessions.json. Existing commands (tap, snapshot, fill, swipe, tap-region) gain --session option as alternative to --device. When neither is specified, the default session is used.
…tor-session # Conflicts: # src/cli/mod.rs # tests/regression.rs
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
--textand--type/--indexoptions fortapandfillcommands, enabling label-based and type-based element targeting without coordinates or ref numbersera session connect/list/disconnectwith persistent device sessions (~/.era/sessions.json),--sessionoption on all device commands, and cached scale factor auto-detectionChanges
Phase 3a: Semantic Selectors
snapshot.rs:find_by_text()(case-insensitive partial match, prefers enabled elements),find_by_type_index()(type + 0-based index)cli/mod.rs:resolve_live_element()— live UI tree search via idb describe-all--ref/--text/--type/-x -y(enforced by clap constraints)Phase 3b: Session Management
session.rs(447 lines):SessionStorewith file-backed CRUD,resolve_device()priority chain (--session>--device> default session)--sessionadded to: Snapshot, Tap, Fill, TapRegion, Swipe--devicechanged to Optional (falls back to session or default)resolve_scale()supports session cached scaleHousekeeping
firebase-debug.logfrom tracking, added to.gitignoreUsage Examples
Test plan