fix: derive iOS transition snapshots from visible presentation

Merged
TH
3mo ago
+1374-67

Summary

Fix iOS interactive snapshots so private-AX transition state is derived from the visible presentation before semantic scoping.

This projects hidden/offscreen transition content out of the actionable tree, preserves scroll hints, promotes conservative app-provided navigation-title affordances, and distinguishes collapsed from expanded action shelves using viewport geometry. It also keeps raw iOS, macOS, and Android scope pushdown unchanged.

Stable capture now confirms broad screen replacements for 1.5 seconds, including replacements that begin after the first post-action capture or recover from tree to private AX. The confirmation applies only to XCTest captures using the default quiet period; explicit short quiet periods and non-transition captures retain their existing timing. This prevents --settle from accepting a self-consistent intermediate Element tree.

The change also hardens Apple runner source packaging and PR XCTest selection so the coordinate text-input policy exercised in source is included in the runner that ships and executes before merge.

Scope disclosure: 25 files are touched across four connected parts of the same iOS capture boundary: private-AX presentation and fixtures, scoped snapshot capture, stable-capture transition confirmation (including tree-to-private-AX recovery), and Apple runner packaging/PR test selection. No Android behavior, public CLI surface, docs, or skills changed.

Validation

  • Rebased on origin/main at 4bba40424 (#1838); pushed head is 5b81b67e6.
  • pnpm check:affected --run: package, build, type, layering, lint, format, Fallow, metadata, and Node integration gates passed. Affected coverage passed 2,502/2,503 tests; the sole failure was an unchanged iOS recorder-provider test timing out in /bin/ps under concurrent host XCTest load.
  • The same recorder-provider scenario failed on plain origin/main under identical load (2/2 failures), including the same incomplete process-identity error, classifying it as baseline/host contention rather than a PR regression.
  • The coordinate input regression is selected in the iOS PR workflow. Pre-fix mutant evidence: ignoring isEnabled failed 1/1 at the new assertion; restored code passed 1/1 in 0.017 seconds.
  • Transition regression evidence: deterministic fixtures for both tree -> private-ax recovery and a replacement beginning after the first capture failed by settling on the transitional action file; the fix passes all 17 focused stable-capture tests. pnpm check:quick passes.
  • Exact-head unpublished package SHA-256: 2a1b036b14bab4cd8c692b85e0350db85820c6173b1355ac361db71ac505e04a; the installed daemon bundle matches the branch build byte-for-byte.
  • Packed-package clean install, publint, attw, dependency closure, all 13 published entry-point imports, and packaged CLI smoke passed using an isolated simulator device set.
  • Fresh iOS simulator clone: closing Element's composer settled in 1.79 seconds and removed hidden upload actions; opening it settled in 1.82 seconds and exposed the visible upload action.
  • Fresh iOS simulator clone: the room header settled in 2.12 seconds, exposed the app-provided room-details affordance, and navigated to the in-app Settings row.
  • Fresh iOS simulator clone on the follow-up head: dismissing Element's Threads notice settled in 1.863 seconds across five captures and emitted only the closed composer; all hidden attachment actions and the false close icon were absent.