ios: preload What's New web pages before presenting the sheet
The one-time What's New sheet presented immediately and any web page then did its web-session exchange and WKWebView load behind the already-visible sheet, so the launch notice opened as a blank sheet that filled in seconds later. A sheet should not surface until its content renders immediately (HIG Loading: "The best content-loading experience finishes before people become aware of it"; loading in the background before surfacing UI is the sanctioned pattern).
Mechanism: a new MobileWhatsNewWebPageLoad owns one page's whole load lifecycle outside the view hierarchy (webview, session exchange, cookie seeding, navigation allowlist, bounded deadline) and settles into a terminal phase exactly once, with an outcome() that can never hang because the deadline task guarantees settlement. WorkspaceShellView now stages unseen pages as a candidate and a view-owned .task(id:) preloads every web page concurrently, presenting only pages that actually rendered; a page that fails or misses the 10s preload deadline is dropped unacknowledged (same policy as the existing offline skip) and returns next launch. Native feature pages are compiled in and present with no added wait. MobileWhatsNewWebView is now a thin renderer over a load (preloaded for the sheet, created in place for the Settings archive push), keeping the quiet failure placeholder and the fresh-session Try Again. Swiping between sheet pages no longer reloads a web page either, since the webview is owned outside the page view.
Tests: MobileWhatsNewWebPageLoadTests covers both deterministic failure paths (allowlist cancel, deadline while the session exchange hangs) and that a settled load answers late awaiters instead of parking a continuation forever.
Verified on tag wnpre: fleet macOS and iOS builds green, isolated-simulator launch shows the sheet appearing with content already rendered, dev-server /api/whats-new round confirmed. Localization audit: no new user-facing strings; the existing mobile.whatsNew.* keys are reused unchanged.
Includes a cherry-pick of https://github.com/manaflow-ai/cmux/pull/11316 (main is currently red for macOS Debug without it); it dedupes when that merges first.
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by cubic
Preloads What's New web pages before the sheet presents, so the one-time launch notice no longer appears as a blank sheet that fills in seconds later. The sheet now surfaces only after every web page has rendered; a page that fails or misses the 10s preload deadline is dropped unacknowledged and returns next launch.
- Adds
MobileWhatsNewWebPageLoad, which owns a page's whole load lifecycle (webview, session exchange, cookie seeding, navigation allowlist, bounded deadline) and always settles to a terminal phase, so presentation can never hang. - Native feature pages are compiled in and present with no added wait.
MobileWhatsNewWebViewis now a thin renderer over a load, so swiping between sheet pages no longer reloads a web page.- Cherry-picks the macOS Debug compile fix from #11316; it dedupes when that PR merges first.
Summary by CodeRabbit
-
New Features
- What's New web pages now preload before the sheet appears, enabling faster and smoother viewing.
- Previously loaded pages are reused when the sheet reappears.
- Web content now enforces navigation safeguards and handles loading timeouts.
-
Bug Fixes
- Failed or timed-out pages are omitted without being marked as acknowledged.
- Retry and loading behavior is more reliable when network requests stall.
-
Tests
- Added coverage for blocked navigation, stalled sessions, timeouts, and repeated load-result requests.