Skip to content

fix(android): preserve editable-field metadata in snapshots - #2290

Open
AdzeB wants to merge 2 commits into
callstack:mainfrom
AdzeB:fix/android-field-observation-metadata
Open

fix(android): preserve editable-field metadata in snapshots#2290
AdzeB wants to merge 2 commits into
callstack:mainfrom
AdzeB:fix/android-field-observation-metadata

Conversation

@AdzeB

@AdzeB AdzeB commented Sep 5, 2026

Copy link
Copy Markdown

Summary

Android structured snapshots and get attrs now preserve native editable, password, hintShowing, and selection offsets, including explicit false/zero. Empty accessibility text remains value: ""; unavailable facts remain absent. Documentation explains availability and interpretation.

This extends #2066's internal hint handling. Selection offsets are not character counts or proof of value equality. Exact opaque-value verification remains separate (#2289); no new secret-value reads or fill-verification behavior are introduced.

Eight files changed: seven for field observations and one test-isolation repair in a separate commit. A pre-existing lifecycle test failure reproduced on the untouched baseline was fixed by mocking the consumed application-tools factory's prewarm facet, with causal red/green proof.

Closes #2288.

Validation

Final head: a6fa69a8c0cc3dcd83568db20f57fd13936c7eba.

  • pnpm check:affected --run: all runnable checks passed, including format, lint, typecheck, layering, fallow, build, and 730 related test files / 5,609 tests. Native/device and coverage CI remain authoritative.
  • Three field-metadata tests passed; reverting the implementation made two fail.
  • Native build and live evidence at a4a9f5a1956cfa94812fd5216d90f444248210d5; no production code changed afterward. pnpm build:android passed. On an API-36 arm64 emulator with rebuilt 0.20.11-dev helper and isolated daemon, CLI snapshots preserved explicit booleans; a synthetic secure field's get attrs returned hintShowing: false and selection offsets 4/4 after fill. Its masked hint reported hintShowing: true before fill. Sessions closed.

@thymikee

thymikee commented Sep 5, 2026

Copy link
Copy Markdown
Member

Two blocking production-route gaps remain at exact head a6fa69a8c0cc3dcd83568db20f57fd13936c7eba:

  1. get attrs --level digest drops editable, password, hintShowing, selectionStart, and selectionEnd because SELECTOR_DIGEST_NODE_FIELDS in src/daemon/response-views.ts omits them. Digest is the supported token-cheap attrs response, so add these semantic fields and a digest-route regression covering explicit false/zero/empty plus omission when unavailable.

  2. The helper emits selection offsets only inside if (node.isEditable()), but feat(android): expose editable-field metadata in structured snapshots #2288 requires every available nonnegative accessibility offset. Read-only selectable text can expose a valid selection independently of editability. Read and emit each nonnegative offset independently, and add a parser-to-snapshot regression for a non-editable selectable node; negative/unavailable values must remain absent.

The rest of the XML → parser → raw/regular snapshot route looks correct, and the live Android evidence is credible for the unchanged production commit. Final-head CI has not reported yet. Holding ready-for-human until these gaps are fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(android): expose editable-field metadata in structured snapshots

2 participants