Skip to content

Research iOS: paint safe-area strips with the page background again - #1425

Merged
AnthonyRonning merged 1 commit into
masterfrom
codex-safe-area-maple
Nov 2, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
codex-safe-area-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the black (dark mode) or white (light mode) bars above and below Research on iPhone since the Xcode 27.1 / Tauri 2.12 upgrade (PR #1264).

Cause

Tauri 2.12 pulls in wry 0.57, which includes tauri-apps/wry#1824: on iOS the WKWebView is now non-opaque with a systemBackgroundColor background. Our page uses viewport-fit=auto, so WebKit leaves the status-bar and home-indicator strips outside the page. An opaque WebView used to paint those strips with the page background. The non-opaque one shows its own system color there, which is pure black or white instead of #0A0A0A / #FAFAFA.

Fix

Set the WKWebView back to opaque in an iOS on_page_load hook (src-tauri/src/ios_webview_background.rs). WebKit then paints the strips from the page again. The switch waits for the first page load, so the launch keeps wry's no-white-flash behavior.

Verification

Logged in with the Dev test account on the chat screen. The simulator is an iPhone 18 Pro on iOS 27.0. The "PR #1425" build comes from CI (run 41371448478, research-ios lane). All three builds are installed over the same session.

Logged-in chat screen, before and after, dark and light

Pixel samples down the left edge (identical on an iOS 26.5 iPhone 17 Pro):

Build Dark: strips / page Light: strips / page
3.4.5 (Xcode 26.5, Tauri 2.11) #0A0A0A / #0A0A0A #FAFAFA / #FAFAFA
master (Tauri 2.12) #000000 / #0A0A0A #FFFFFF / #FAFAFA
this PR #0A0A0A / #0A0A0A #FAFAFA / #FAFAFA
  • Before the build, I confirmed the cause on master's app by attaching lldb and flipping setOpaque:YES on the live WebView. The strips went from #000000 to #0A0A0A.
  • Dark-mode launch recordings: 3.4.5 flashes white (#FEFEFE) for about 4 frames before the page paints. This PR goes black, then straight to the page, with no white frame (checked over two launches).
  • cargo check --target aarch64-apple-ios-sim, cargo fmt, and the pre-commit Research tests pass.

Not covered by this PR: the signed-out entry pages (gray #E2E2E2) still show #FAFAFA strips in light mode, the same as 3.4.5. Those strips use the body background, and the entry pages paint their own gray on top of it. Not tested: in-app theme overrides and rotation.

🤖 Generated with Claude Code

wry 0.57 (tauri-apps/wry#1824, pulled in by the Tauri 2.12 upgrade) makes
the iOS WKWebView non-opaque with a systemBackgroundColor background. The
page uses viewport-fit=auto, so the strips by the status bar and home
indicator turned plain black (dark) or white (light) instead of the page
background. Make the WebView opaque after the first page load so WebKit
paints them from the page again, without the white launch flash that an
opaque WebView shows before the first paint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AnthonyRonning
AnthonyRonning merged commit 714e282 into master Nov 2, 2026
40 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex-safe-area-maple branch November 2, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant