Repository navigation
Conversation
The native shell view built its WebView in its constructor and was the page: fences, clients, load state and bridge all lived on the Expo view. They now live on a MobileWebShellPage per platform, which reports through a sink, and the view creates one on its first prop commit and hosts it. No behaviour change: the same fences are installed in the same order, the view still builds one page per mount and forwards the same three events. Android's deferred document-failure report now posts to the main looper rather than View.post, which is the same thread and order for an attached view and does not wait for an attach that a detached view never gets. This is the seam a page booted ahead of its screen needs. Co-Authored-By: Claude <[email protected]>
|
No actionable comments were generated in the recent review.
|
…ts sink alike on both platforms
…e-split # Conflicts: # mobile/modules/orca-mobile-web-shell/android/src/main/java/expo/modules/orcamobilewebshell/MobileWebShellView.kt # mobile/modules/orca-mobile-web-shell/ios/MobileWebShellView.swift
…ment object (#39946) The native shell view now hosts a MobileWebShellDocument that owns the WebView, its scheme handler or request intercept, the network block, the bridge and the navigation policy. The view keeps layout, the back-edge swipe and its React events. Nothing changes for a page; this is the seam a prewarmed spare page needs. Based on Jinwoo's page split in #32202. Co-authored-by: Jinwoo-H <[email protected]>
Summary
The phone's shell WebView is now a page object hosted by the native view, on Android and iOS. A page reports its load states, bridge frames and external navigations through a sink. Today the view is that sink and owns exactly one page, created on its first props.
This is the first of three stacked PRs that let the phone boot the next screen's page before it is opened. Splitting the page from the view is what lets a page exist before any view hosts it.
MobileWebShellPage.ktholds the former view body (WebView, fences, bridge listener, load-state machine, request intercept, render-process-gone).MobileWebShellView.ktcreates it and forwards the sink to its events. The deferred document-failure report posts to the main looper instead of the view, because the page is not a view.MobileWebShellPageinMobileWebShellPage.swift.MobileWebShellView.swifthosts the page's WKWebView with constraints and is the sink.One timing change on Android: a document failure was reported through
View.post, which waits for the view to be attached. It now posts to the main looper, so a failure on a detached view is reported straight away instead of when the view reattaches. The next PR needs this, because a parked page has no attached view. Otherwise behaviour is unchanged.Mostly a move: the large line counts are the old view body moving into the page file.
Checks
Release builds, device-check flows on the Android emulator (API 36) and the iOS 26.5 and 18.1 simulators: first open, host to session, New Workspace overlay, pop to an existing screen (#32110), renderer kill then remount, background then foreground, new page generation from a desktop update, host removal and re-pair.
Compat
Native-only refactor. No change to props, events, bridge protocol or the page bundle.