fix(android): preserve editable-field metadata in snapshots - #2290
Conversation
|
Two blocking production-route gaps remain at exact head
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 |
…n offsets past editability - `get attrs --level digest` kept only the pre-callstack#2288 semantic fields, so `editable`/`password`/`hintShowing`/`selectionStart`/`selectionEnd` vanished on the token-cheap route. The digest now keeps them, with a regression covering explicit false/zero/empty and omission when unavailable. - The helper emitted selection offsets only inside `isEditable()`, but read-only selectable text exposes a selection too. Each nonnegative offset is now emitted independently; -1 stays absent. Parser-to-snapshot regression for a non-editable selectable node. - Docs: the field-metadata notes get their own section instead of leading the efficiency tips. - Dropped the test-isolation commit: main already mocks notifyIosRunnerAppRelaunched, and the lifecycle test passes without it.
a6fa69a to
e1b7be6
Compare
|
Both gaps are fixed at head
Also: the Validation.
Text snapshot output is unchanged. Re-validation gotcha: a |
|
Sentinel: clean coordinator + independent Terra/high review at e1b7be6. Both previous blockers are resolved: non-editable selection offsets survive helper capture, and get/find digest output preserves the field facts, including false/zero/empty values. Focused regressions target both fixes. Exact-head runnable CI is green, including Android smoke and coverage/integration; the PR records private-Pixel live digest evidence (not independently rerun in this review). Ready for human review/merge; no merge performed. |
Summary
Android structured snapshots and
get attrsnow preserve nativeeditable,password,hintShowing, and selection offsets, including explicit false/zero, on every response level including the token-cheap digest. Empty accessibility text remainsvalue: ""; unavailable facts remain absent. Documentation explains availability and interpretation.This extends #2066's internal hint handling. Selection offsets are accessibility offsets, independent of
editable(read-only selectable text exposes them too); they 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.Closes #2288.
Changes
textwhen present (even empty),editable,password,hint-showing(API 26+) always, and each nonnegativeselection-start/selection-endindependently; -1 stays absent.undefined.get attrs --level digestkeeps the five facts (SELECTOR_DIGEST_NODE_FIELDS).snapshots.md.Validation
Head:
e1b7be604154b701cc7f8f5e2e6e678aad1527da(rebased onto main4b7c561d1e).pnpm check:affected --run: format, lint, typecheck, layering, fallow, build, 741 test files / 5,713 tests passed.pnpm package:android-snapshot-helper:npmbuilt the 0.20.11-dev helper (helper unit suite runs inside the build).get attrs --level digest: the name field afterfill "Grace"reportseditable: true, password: false, hintShowing: false, selectionStart: 5, selectionEnd: 5; theform-titleViewGroup reportseditable: false, password: false, hintShowing: falseand no selection keys. The text snapshot is unchanged.The earlier test-isolation commit was dropped: main already mocks
notifyIosRunnerAppRelaunchedand the lifecycle test passes without it; the intermittent pkill leak is tracked in #2314.