Skip to content

fix(selectors): honor a published editable fact in matching and is editable - #3535

Merged
thymikee merged 1 commit into
mainfrom
fix/3530-editable-fact-selectors
Oct 12, 2026
Merged

thymikee merged 1 commit into
mainfrom
fix/3530-editable-fact-selectors

Conversation

@thymikee

@thymikee thymikee commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Summary

isNodeEditable now lets an explicit editable fact decide both editable= selector matching and is editable. Without the fact, type inference is unchanged; a disabled node is still never editable. Fix is in the one owner (packages/selectors/src/internal/node.ts), plus a note in website/docs/docs/selectors.md. 5 files touched, no scope expansion.

agent-device is editable 'label="Mobile"'   # Android Spinner publishing editable: true

Closes #3530

Validation

Tested commit: 60eb25c. pnpm check:affected --run passed.

New unit tests cover a custom view with editable: true, a text field with editable: false, a disabled field, and the fact absent. The three fact-driven tests fail on origin/main's node.ts and pass with the fix.

Live, Android emulator via ADB (android-helper backend 0.21.27-dev), Contacts "Create contact" screen, whose "Mobile" Spinner publishes editable: true:

command base 46dae0f head 60eb25c
is editable 'label="Mobile"' COMMAND_FAILED ... editable:false Passed: is editable
is exists 'label="Mobile" editable=true' fails Passed
is exists 'label="Mobile" editable=false' Passed fails

Known gap, outside this package: fill's "not a text input" warning in src/commands/interaction/runtime/interactions.ts still uses isFillableType, not the fact.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

…itable

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-12 19:15 UTC

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread packages/selectors/src/internal/node.ts Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.17 MB 5.17 MB +195 B
Package (unpacked) 5.17 MB 5.17 MB +195 B
Package (download) 1.55 MB 1.55 MB +66 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 20.3 ms 20.1 ms -0.2 ms
CLI --help 51.3 ms 52.0 ms +0.7 ms

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at 60eb25c. Honoring a published editable fact in matching and in is editable looks correct to me, and the new tests would fail against the old one-line implementation. Not blocking: the doc comment at https://github.com/callstack/agent-device/blob/60eb25c/packages/selectors/src/internal/node.ts#L11 says a published fact decides, but line 13 returns false for a disabled node before the fact is read, so you can delete the comment or say "disabled is never editable; otherwise the published fact, else type inference", and you can take or leave this.

The cubic-dev-ai P3 thread on the same comment still applies, and it is only about wording: #3535 (comment)

The Contacts Mobile Spinner table on Android (android-helper 0.21.27-dev) is your own live evidence. I did not reproduce it, and I did not run the tests. I also did not check whether the helper publishes editable=false for any EditText that used to match by type. Those nodes now stop matching editable=true, which is the intended rule, and your live run is the only evidence on it. No conflicts. CI is still pending: the only jobs not passing are two Smoke Tests, both queued and not failed. Wait for them to finish before merging.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 12, 2026
@thymikee
thymikee merged commit aa1b08c into main Oct 12, 2026
22 checks passed
@thymikee
thymikee deleted the fix/3530-editable-fact-selectors branch October 12, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Honor a published editable fact in selector matching and is editable

1 participant