Repository navigation
fix(mobile): show update confirmations above the open sheet - #698
Merged
Merged
Conversation
Tapping Update on a computer, or Update all, in the mobile update sheet called confirm(). The shared ConfirmHost presented its React Native Modal from the app window while the update sheet's Modal was still presented. UIKit refuses a second presentation from a view controller that is already presenting, but React Native marks the refused modal as presented. Nothing appeared, no request was sent, and the orphaned modal was left behind, which matches the touch blocker reported after closing the sheet. Bot settings had the same pattern. Overlays now register in ui/overlay-stack.ts with their parent overlay. Sibling overlays take turns: one presents only after the previous sibling is gone natively (iOS Modal.onDismiss, Android commit, 1 s fallback). A parent keeps its native modal while nested overlays are on screen, because UIKit would dismiss only the topmost one. confirm() renders inside the topmost open overlay, so the dialog appears above the update sheet, which stays open. While the gateway handles the request, the sheet shows "Starting update…", then progress, the result or an error. Fixes: #536 Related: #669
This was referenced Nov 16, 2026
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 mobile, tapping Update on a computer (or Update all) in the update sheet did nothing. After the user closed the sheet, the app stopped responding to touch.
Root cause
confirmAppUpdatecalls the sharedconfirm(), whose singleConfirmHostis mounted at the app root. Its React NativeModalis presented from the root view controller (RCTModalHostViewComponentView presentViewController→[self reactViewController]) while that controller is already presenting the update sheet'sModal. UIKit refuses the second presentation, so no dialog appears and the confirmed request is never sent. The gateway path (ManageUpdates, owner scoping,confirm_restart) is the one web uses and is unchanged; worker updates, which need no confirmation, were not affected._isPresented = YESbefore UIKit refuses the presentation and never resets it, so the confirmation stays mounted in a "presented" state that nobody can close. The orphaned transparent modal is what is left behind after the sheet closes. I couldn't confirm the exact UIKit sequence on a device; the device host is unavailable. The same structure has another trap: dismissing a parent modal while a modal nested in it is still presented makes UIKit dismiss only the topmost one, which leaves the parent on screen, invisible and catching touches.BotSettingsExtras(confirmations inside Bot settings) had the same pattern.Fix (JS only)
ui/overlay-stack.tsregisters everyOverlaywith its parent overlay (or the app window) and a phase:waiting,shownorclosing.Modal.onDismiss, the Android commit), with a 1 s fallback so a lost callback can't block later overlays.confirm()renders inside the topmost open overlay:OverlayLayerrendersConfirmHostin everyOverlay. The dialog appears above the update sheet, and the sheet stays open to show progress. If the host closes before the dialog appears, the dialog moves down a level (picker → root, after the picker is gone). If the host closes under the dialog, the dialog is cancelled.ManageUpdatesis in flight (up to 150 s), the sheet shows "Starting update…". Then the rows show progress and the result, andUpdateFeedbackshows errors with details.docs/mobile.md(overlay ordering) anddocs/updates.md(mobile confirmation).Verification
bun install,bun run gen:check,bun run typecheck,bun run lint,bun run format:check: clean.expo exportfor iOS and Android: both pass.expo-updates fingerprint:generate: iOS138e0c6b171c82b4933e86808cdfef56da73b8c6, Android906dc944f94eb8333fa384ed9f198834fdd30d13. These are identical todev, so the fix ships OTA.check:tmpwas not run, since no server code changed.Please re-test on a device (iOS first, then Android)
After each: Cancel and Confirm, close everything, then check that the whole app responds to touch.
Copy audit (docs/copy.md §8)
Starting update…. Before, nothing was shown while the request ran. It is a progress state (§4.6: -ing verb plus ellipsis), in sentence case, a polite live region, and doesn't repeat the row badges.Fixes: #536
Related: #669