Skip to content

fix(android): share fill target identity matching - #5238

Merged
thymikee merged 3 commits into
mainfrom
t3/6270e6bf
Nov 30, 2026
Merged

thymikee merged 3 commits into
mainfrom
t3/6270e6bf

Conversation

@thymikee

@thymikee thymikee commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Android fill pre-reads and live text reads now match a resource ID using the selected package and published class when supplied. This lets a Compose container match the button role published in the snapshot. Empty-field recovery uses the same matcher to check that the resource ID is unique across classes in its package.

The optional recycled-list pre-read change is deferred.

Before / after

A Compose button labeled Submit moved and another button occupied its recorded point. Reading the selected button returned other button on main (a4b31e34d6). The same read returns Submit at this head.

Validation

At c8eb12df8544bad38a249b4d2d1aef915014f211, all 26 tests in the text-read and empty-target test files passed. The regression test failed on the base revision with the neighboring button’s text. Self-reviewed the diff. Live device verification was skipped as requested. CI checks and independent review are pending.

Closes #5223


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff Turn on auto-fix

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.70 MB 6.70 MB -47 B
Package (unpacked) 6.70 MB 6.70 MB -47 B
Package (download) 2.05 MB 2.05 MB +3 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 25.9 ms 20.6 ms -5.3 ms
CLI --help 49.3 ms 43.2 ms -6.2 ms

@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

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

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

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of 88dc7c0

No open findings.

1 finding below minor hidden (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (a4b31e34d68c).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

Copy link
Copy Markdown
Member Author

The PR is ready to merge at 88dc7c0. No checks are failing, and only optional notes remain.

Not blocking: each of these can be taken or left: the point fallback still checks package and class inline, and sameAndroidFillTarget also compares node identity, so a follow-up could share a package-and-class matcher with the helper (the fallback has no resource id to call the helper as written); the same fallback now accepts any matching android.view.View for a role-typed target without a resource id or match-count guard, so if that returns wrong text in practice, a follow-up issue could require a role child; the shared resource id test also passes on main and can stay as a characterization pin; and the live Android run is treated as waived, but if wanted, it would run get text on a moved role-folded Compose button, confirm the android-helper backend with snapshot -i --json, and show the button text instead of the neighbor text.

Neither open thread needs a change in this PR, so both can be resolved: any-View fold follows the existing field identity rule, identity routes count matches, and the fallback gap is the optional follow-up above; point fallback class is fixed at this commit and has a test.

Not verified here: behavior on a live Android device (the Compose fold fixtures are hand-written XML based on comments in ui-hierarchy-builder.ts, not a real helper capture), and a local run of the new tests.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 30, 2026
@thymikee
thymikee merged commit 021423b into main Nov 30, 2026
21 checks passed
@thymikee
thymikee deleted the t3/6270e6bf branch November 30, 2026 11:48
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.

Android fill verification: share one node-to-target identity match

1 participant