fix(capture-kit): ignore nested empty floating-bar containers in sheet occlusion
KH
4d ago+329+329+012345678901234567890123456789-4-4-0123456789
Summary
Fixes #5240. On iOS 27, a presented sheet hosting nested UINavigationControllers emits an inner empty _UIFloatingBarContainerView before the outer sheet's _UIFloatingBarContainerView, which broke the own-presentation sibling walk and marked sheet inputs covered.
packages/capture-kit/src/snapshot-occlusion.ts: ignore nested empty_UIFloatingBarContainerViewnodes as presentation boundaries for an enclosing outer floating-bar host (isNestedEmptyFloatingBarContainer,isNestedInLaterFloatingBarPresentation), while keeping real obstructingUIToolbarcontrols covered.packages/capture-kit/src/snapshot-occlusion-ios27-system-toolbars.test.ts: added regression tests for nested sheet floating-bar containers and obstructing toolbars.
Before / after
- Before:
fillon aTextInputinside a sheet with nested navigation controllers fails withcovered by another visible element(Toolbar). - After: the sheet input is not marked covered by the nested empty
_UIFloatingBarContainerView; real obstructing toolbars still block interaction.
Validation
Tested at ea5417de11 on 59a640c08d:
vitest run --project unit-coreonsnapshot-occlusion,snapshot-occlusion-ios27-system-toolbars,snapshot-occlusion-sibling-sized-chrome: 3 files, 85 tests passed.tsc -b tsconfig.typecheck.json examples/sdk/tsconfig.json: passed.oxlint . --deny-warningsandoxfmt --check: passed.
CI obligations: unit-core and Apple smoke lanes. Risks: none known.