Repository navigation
fix(modal): render cutover modal inline to fix Android New-Arch login freeze - #673
Merged
Merged
Conversation
6 tasks
islandbitcoin
force-pushed
the
fix/cutover-modal-android-offscreen-freeze
branch
from
July 23, 2026 04:40
0d17da8 to
2423746
Compare
CashWalletCutoverModal auto-shows once after login for accounts created before the cash-wallet cutover. It is a bottom-anchored react-native-modal (style justifyContent: "flex-end", margin: 0). On Android under the New Architecture, react-native-modal renders through RCTModalHostView, which #545 already documented as broken on Fabric: it mis-measures the flex:1 content container, so the sheet is positioned below the visible viewport while its full-screen backdrop keeps capturing touches. The dismiss button is unreachable and the app appears frozen; only a restart clears it. Fix: pass coverScreen={false} so react-native-modal takes its inline render path instead of the broken native host, measuring layout correctly and keeping the sheet on-screen and dismissable. The portal-based workaround #545 added for this exact Fabric bug was removed in the same series, so other bottom-anchored react-native-modal usages are likely affected too; those are tracked separately as a modal-audit sweep. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg
islandbitcoin
force-pushed
the
fix/cutover-modal-android-offscreen-freeze
branch
from
July 23, 2026 16:36
2423746 to
096a8ab
Compare
bobodread876
pushed a commit
that referenced
this pull request
Aug 19, 2026
…, single source Review fixes for PR #701: - coverScreen={false} on the mandatory-update modal. It was the only react-native-modal in the tree without it — the exact omission #673/#674 fixed for seven other modals to stop the Fabric/New-Arch freeze on Android. Its children are flex-filled with a bottom-pinned spacer, so RCTModalHostView would push "Tap here to update" and "Contact Support" off-screen while the opaque backdrop keeps eating touches: an unescapable white screen on a modal with no dismiss, no backdrop press and a swallowed hardware back button. Because the inline path makes paint order follow sibling order, <AppUpdateGate /> now mounts as the last child in app.tsx instead of ahead of RootStack. - The store-link failure is rendered inside the modal instead of a toast. toastShow is dropped when a modal is already up (FIXME in utils/toast), so on the blocking path a failed openURL was a silent no-op with no way out. AppUpdateGate holds the openFailed state; the banner keeps the toast, which is reachable there. - One version check for the whole app. AppUpdateProvider owns the query subscription and the AppState listener; the gate and the home banner consume it. Previously each mounted its own hook — two sources of truth for "am I blocked?", with the banner re-deriving the gate's negation. - Release checklist + preflight for the deploy-order dependency. The served mobileVersions payload lives in lnflash/deployments, so a stale floor hard-blocks the whole install base at launch (prod currently serves min 362 against builds android 89 / ios 51). docs/release.md now carries the step, and `yarn check:version-gate [--api <url>]` compares the served payload against this checkout's build numbers and exits non-zero when the gate would block the release. Tests: - pin coverScreen={false} on the gate's modal - foreground re-check now asserts the refetched payload actually flips the gate (rerender case) plus an end-to-end case over a real Apollo link with two sequential responses - Android store-link coverage in a sibling spec (isIos is captured at module load), for both the blocking modal and the banner - inline failure message replaces the toast assertion on the blocking path, and the banner's toast keeps its own case - one AppState listener for the tree, and a consumer without the provider throws - version-gate parsing/comparison unit tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Android, immediately after login the app shows a distorted modal whose dismiss button is off-screen; its backdrop keeps capturing touches, so the entire app freezes. Only killing and relaunching clears it.
Root cause
CashWalletCutoverModalauto-shows once after login for any account created before the cash-wallet cutover (CashWalletCutoverModal.tsx:35, mounted athome-screen.tsx:163). It's a bottom-anchoredreact-native-modal—style: { justifyContent: "flex-end", margin: 0 }.Under the New Architecture,
react-native-modal(coverScreendefaults totrue) renders through the coreRCTModalHostView. Commit #545 (New-Arch enablement) already documented this component as "broken on Android with Fabric (RN 0.76.9)": it mis-measures theflex:1content container. WithjustifyContent: "flex-end"the sheet is positioned below the visible viewport, while the full-screen backdrop still renders on top and swallows every touch → distorted, unreachable OK button, frozen app. A restart skips the login→home transition during which the host is mis-measured, which is why it appears to "fix" itself.Centered modals tolerate the mis-measurement (a centered card stays roughly on-screen); only bottom-anchored sheets get pushed off.
Fix
+ coverScreen={false}This takes
react-native-modal's inline render path (modal.js:536,if (!coverScreen …)) instead of the broken native host, so layout measures correctly and the sheet stays on-screen and dismissable. A library bump won't help —14.0.0-rc.1is already the latest and has no Fabric fix.Wider context (not fixed here)
#545 originally added a portal-based workaround for this exact Fabric bug and then removed it in the same series (
* remove ModalPortal). So other bottom-anchoredreact-native-modalusages across the app are likely affected too. This PR fixes the one that auto-fires on login (highest impact — every returning pre-cutover user hits it); the rest are tracked as a separate modal-audit sweep.Testing
hasSeenCashWalletCutoverModalunset: log in → the sheet renders on-screen and is dismissable; app not frozen.The defect is a native/Fabric layout measurement, so a JS unit test can't reproduce it; the on-device check above is the meaningful guard.
🤖 Generated with Claude Code
https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg