Skip to content

test(android): a content description change invalidates snapshot reuse and survives the selector digest - #2920

Merged
thymikee merged 1 commit into
callstack:mainfrom
okwasniewski:oskar/android-content-description-tests
Sep 24, 2026
Merged

thymikee merged 1 commit into
callstack:mainfrom
okwasniewski:oskar/android-content-description-tests

Conversation

@okwasniewski

Copy link
Copy Markdown
Contributor

Summary

Review follow-up to #2912, test-only. contentDescription joined the presentation-equivalence key in snapshot-unchanged.ts and the selector-digest allowlist in response-views.ts without a case in either table, so removing either entry later would have left both suites green.

  • snapshot-unchanged.test.ts: contentDescription is a row in the "detects presentation changes" table, and a new case keeps a node whose description did not change as unchanged.
  • response-views.test.ts: MATCHED_NODE and COMPACT_NODE carry contentDescription, so the find/get digest assertions cover its retention.

2 files, 14 lines. Flagged inline on #2912 by Copilot and noted as non-blocking by @thymikee; it merged before the rows landed.

Validation

Tested at a2a27bb. pnpm check:affected --run --base 86d719dc3 passed: format, lint, typecheck, layering, fallow, build, and the two related files (74 tests). No runtime change, so no device run.

…e and survives the selector digest

Review follow-up: `contentDescription` joined the presentation-equivalence key and the digest allowlist without a case in either table, so removing it later would have left both suites green.

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

No unresolved issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Test-only Android regression coverage for contentDescription in snapshot reuse and selector digests.

Changes:

  • Tests changed and unchanged descriptions.
  • Extends selector digest fixtures.
File Description
src/​daemon/​__tests__/​response-views.test.ts Verifies selector digest retention.
src/​commands/​capture/​runtime/​snapshot-unchanged.test.ts Covers description changes and unchanged reuse.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@thymikee

Copy link
Copy Markdown
Member

This is ready at a2a27bb. Not blocking: the new "unchanged metadata keeps a content description that did not change" test (src/commands/capture/runtime/snapshot-unchanged.test.ts:110) passes regardless of whether contentDescription is in PRESENTATION_SCALAR_FIELDS, since the existing "unchanged metadata ignores refs and volatile process ids" test already covers reuse on equal nodes, so you can drop it or change it to pair an unchanged contentDescription with a changed non-presentation field like editable, but either way it's fine to merge as is. Checks are green (12/12), and the diff is test-only, staying inside the changed test files' own route. I ran only the two targeted test files, not the full repo gate, and took #2912's live-device claim about contentDescription on the wire as established rather than re-verifying it.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 24, 2026
@thymikee
thymikee merged commit 6508ef8 into callstack:main Sep 24, 2026
12 checks passed
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.

3 participants