You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f4930d6
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(ios): normalize snapshot geometry in one pass after acquisition (#2661) (#2669)
* refactor(ios): normalize snapshot geometry in one pass after acquisition (#2661)
Move the coordinate-rotation table and SnapshotGeometrySpace into the snapshot-presentation package and add SnapshotGeometrySpace.normalized(nodes:viewport:interfaceOrientation:). Acquisition now serializes reported frames only; captureWithBackend settles every node into the app's orientation space in one ancestry-keyed pass instead of threading geometrySpace/parentIsWindow through the recursive, raw, private-AX, and query-sweep walkers.
Drop the fold-consulting regular-depth frontier. It read reported (un-normalized) rects mid-walk to increment presented depth, so a turned keyboard band reported in the device's native space could be pruned before the single pass ever moved it back into the app's viewport. A regular --depth is now a presentation cut only: the walk's bounds are raw traversal depth (nil for a regular capture) plus a runaway node cap, and SnapshotPresentation applies the visibility fold and the presented-depth cut on the normalized array.
Reclassify the iOS tree backend's regular-depth capability from presented-frontier to presentation-cut across the Swift declaration, the cross-runtime parity fixture, and the TypeScript registry, and remove the now-unused Swift enum case (Android's helper keeps presented-frontier). Update ADR 0004 and the ios.yml PR-lane test list.
* refactor(ios): one CGRect-to-SnapshotRect conversion; ADR names the real reason the frontier went
Review follow-ups on #2669.
- Every CGRect becomes a SnapshotRect through SnapshotRect.init(_:). The runner's snapshotRect(from:)
and the package's private SnapshotPresentationInvariant.snapshotRect(from:) were field-for-field
copies; both are deleted and their nine call sites use the initializer.
- ADR 0004 attributes the frontier removal to its cause: a post-walk normalization pass cannot feed a
decision the walk already took, so the fold-consulting frontier had to go; the mis-cut keyboard
band was the symptom. The measured cost of dropping it (form, catalog: p50 within 4 %, p95 within
10 % of main, in the branch's favour) is recorded there.
- CHANGELOG line for the presentation-cut route and the capability rename.
* docs(adr): state the measured --depth cost of dropping the frontier, on the route where it engaged
The earlier sentence rested on snapshot -i runs, which carry no presented depth and never engaged
the frontier on main. Re-measured with --depth 2 and --depth 3 (n=15 per cell) on the recursive
tier: form 135 raw nodes and scrolled catalog 279 raw nodes walked in full to present 4 or 6,
acquisition p50 within ±4 % and p95 within ±7 % of main, mixed sign.
0 commit comments