fix(snapshot): stop iOS 27 floating-bar containers from covering content

Merged
JO
4d ago
+62-1

Summary

Fixes #3883. On iOS 27 a _UIFloatingBarContainerView that starts 2pt below the viewport top (the app draws a 2pt strip there) misses the full-viewport chrome exemption and marks the content under it covered. 2 files in packages/capture-kit/src.

  • Top inset on the full-viewport check. A container matching the viewport's x, width and bottom edge may start up to 4pt (VIEWPORT_CHROME_TOP_INSET_PT) below the top. One below the status bar is tens of points down and still covers. With the shared 0.5pt rect tolerance, the accepted range is y = −0.5…4.5.

Tests: three in snapshot-occlusion.test.ts: 2pt and 4pt exempt, 5pt covers.

The parent-sized rule was dropped in e24d8fe3f: the regular iOS projection presents the containers as application-level siblings, so its shape never reaches occlusion.

Validation

  • pnpm check:affected --run --head e24d8fe3f: all runnable checks passed (exactCommit: true); 3637/3637 tests in 501 files.
  • The three inset tests fail on base 1d28b51a5, pass on head. Lowering the constant to 3 fails only the 4pt case.
  • Device: iPhone 18 Pro Max simulator, iOS 27.0 (24A434), Xcode 27.1, the reporter's Expo SDK 58 release build, Settings tab with the 2pt strip, Rooms cell @e8; same commands at base and head.
    • base 1d28b51a5: snapshot -i --json 17/25 covered by the toolbar at (0, 2 440x954); press @e8 refused as covered.
    • head e24d8fe3f (and c2b755432): toolbars at y=2 and y=64, 0/25 and 0/30 covered; press @e8 tapped and settled on the Rooms screen.
  • CI owns the device lanes.