Skip to content

fix(android): pin the sheet's ancestor wrappers as real views (collapsable=false) - #79

Open
LeCiel wants to merge 1 commit into
software-mansion-labs:mainfrom
LeCiel:fix/pin-ancestor-wrappers-collapsable
Open

fix(android): pin the sheet's ancestor wrappers as real views (collapsable=false)#79
LeCiel wants to merge 1 commit into
software-mansion-labs:mainfrom
LeCiel:fix/pin-ancestor-wrappers-collapsable

Conversation

@LeCiel

@LeCiel LeCiel commented Aug 31, 2026

Copy link
Copy Markdown

Fixes #78.

On Android with the New Architecture, the three layout-only wrappers above the native BottomSheetView are flattenable, and the outer sheet wrapper toggles pointerEvents ('none' <-> 'auto') on every open/close - forcing a flatten -> unflatten transition under portal-entry churn. That reparenting batch can arrive without the wrapper's Create mutation (an RN Fabric transaction/differ bug, reported separately to react/react-native), and a failing batch mount item kills the whole surface: RetryableMountingLayerException: Unable to find viewState for tag, white screen, dead touches. Full evidence (mount batch dumps, surface registry, causal chain) in #78.

collapsable={false} (a no-op on iOS) keeps the wrappers real from creation so the transition can never be emitted. The content views below the native view already pin collapsable={false}; this closes the same gap for the ancestors.

Verified on device (Galaxy S23 Ultra, RN 0.85.3, our production app): pre-fix the crash reproduced within ~3 rapid open/close cycles of an action sheet; pinning only the portal wrapper moved the identical crash exactly one level down to the outer sheet wrapper (causal confirmation); with all three pinned, 40 rapid-fire cycles produced zero occurrences. The crash had reached ~2% of Android sessions in production before the fix.

…sable=false)

On Android with the New Architecture, the three layout-only wrappers
above the native BottomSheetView are flattenable, and the outer sheet
wrapper toggles pointerEvents on every open/close - forcing a
flatten -> unflatten transition under portal-entry churn. That
reparenting batch can arrive without the wrapper's Create mutation,
and a failing batch mount item kills the whole surface:
RetryableMountingLayerException 'Unable to find viewState for tag',
white screen, dead touches.

collapsable={false} (a no-op on iOS) keeps the wrappers real from
creation so the transition can never be emitted. The content views
below the native view already pin collapsable={false}; this closes the
same gap for the ancestors.

Fixes software-mansion-labs#78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant