Fix mobile resume blanking and viewport/scroll layout bugs - #225
Conversation
Three iOS WKWebView issues across both Tauri apps (Obsign + admin): 1. Blank viewport after backgrounding — iOS terminates the WebContent process while the app is suspended; on resume the webview rendered blank with no JS context. Fixed upstream in Tauri 2.11.0, where tauri-runtime-wry installs a default webViewWebContentProcessDidTerminate handler that reloads the webview. Bump the tauri family 2.10.3 -> 2.11.0 so both apps inherit the auto-reload (lockfile only; no server crate depends on tauri). 2. Content hidden under the status bar / Dynamic Island / home indicator — the WKWebView is edge-to-edge but nothing opted into it. Add viewport-fit=cover to both app.html and pad the root shells by env(safe-area-inset-*), exposed as --safe-* vars and max()-blended with the base spacing so non-notched targets are unaffected. 3. Janky scroll / tall screens partly unreachable — identity-wallet's frame used fixed 100vh with no overscroll containment (whole-page rubber-band), and OnboardingShell centered with justify-content:center, which traps overflow above the scroll origin. Switch to a 100dvh overflow:hidden frame with overscroll-behavior:none, and use `justify-content: safe center` so tall content scrolls into reach instead of clipping. Frontend type-check (svelte-check) and unit tests pass for both apps. The iOS Rust/build side is exercised by CI's macOS lane (both apps are excluded from the Linux gate by design). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WvVP5PDvqbSQd7HxnrMPH
|
Warning Review limit reached
Next review available in: 53 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughBoth applications now support edge-to-edge mobile viewports with safe-area fallbacks, disabled document overscroll, and layout-specific spacing or scrolling. The identity wallet also uses dynamic viewport height and safe centering for overflowing onboarding content. ChangesMobile layout behavior
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The deployment floor is iOS 13 (cargo-mobile2 default; no minimumSystemVersion override), but `dvh` needs iOS 16+ and the `safe` alignment keyword, while iOS 11+, is worth a defensive fallback. Declare the widely-supported value first so older WebViews still get a working frame / centered content, then let the modern value win where supported: - identity-wallet .app: `height: 100vh` before `height: 100dvh` (without it, an iOS 13–15 WebView ignores dvh and the fixed frame has no height, collapsing the height:100% screens inside it). - admin-companion ScreenShell: same `min-height: 100vh` -> `100dvh` fallback. - OnboardingShell .content: `justify-content: center` before `safe center`, so a WebView that doesn't parse `safe` centers instead of reverting to top alignment. Addresses CodeRabbit review nits on PR #225. svelte-check clean for both apps. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WvVP5PDvqbSQd7HxnrMPH
…rate (#228) The mobile-resume/viewport fix (#225) bumped the Rust tauri family 2.10.3 -> 2.11.0 (lockfile only) to inherit the WKWebView auto-reload, but left @tauri-apps/api pinned at 2.10.1 in both apps. `cargo tauri ios build` enforces that the NPM package and Rust crate share a major/minor, so both TestFlight lanes failed on main: Found version mismatched Tauri packages... tauri (v2.11.0) : @tauri-apps/api (v2.10.1) Pin @tauri-apps/api to ~2.11.0 in identity-wallet and admin-companion and regenerate the lockfiles (both resolve 2.11.1). Pinning to the 2.11 minor (rather than the wallet's prior loose ^2) keeps the JS API locked to the Rust crate's minor so a future 2.12 publish can't silently re-introduce the mismatch. Frontend type-check and unit tests pass for both apps. Claude-Session: https://claude.ai/code/session_017minW9TbfkkZ1vKp5L1Y1B Co-authored-by: Claude <noreply@anthropic.com>
Fixes three iOS WKWebView issues reported across both Tauri apps (Obsign identity-wallet + admin-companion): a blank viewport after backgrounding, content hidden under the OS chrome, and janky scrolling / unreachable content on tall screens.
1. Blank viewport after backgrounding
iOS terminates the WKWebView's WebContent process while the app is suspended; on resume the webview renders blank with no JS context (so no frontend-only fix is possible — the JS heap is gone). This is tauri#14371, fixed upstream in Tauri 2.11.0 (tauri#14523):
tauri-runtime-wrynow installs a defaultwebViewWebContentProcessDidTerminatehandler that reloads the webview automatically.Both apps resolved to 2.10.3, just before the fix. This bumps the tauri family in
Cargo.lockto tauri 2.11.0 / tauri-runtime-wry 2.11.4 / wry 0.55.1.tauri = "2", so no manifest edits.tauri, so the Linux PDS gate is unaffected.png,tendril,dbus/libdbus-sys,ctor/dtorproc-macros) are standard permissive-licensed crates from the Tauri 2.11 ecosystem, all from crates.io.2. Content hidden under the status bar / Dynamic Island / home indicator
The WKWebView is edge-to-edge but nothing opted into safe-area handling. This adds
viewport-fit=coverto bothapp.html, defines--safe-*=env(safe-area-inset-*)vars in eachbase.css, and pads the root shells (identity-wallet.app, adminScreenShell) by them —max()-blended with the existing spacing so non-notched / desktop targets collapse to the base values and are unchanged.3. Janky scroll / tall screens partly unreachable
identity-wallet's frame used fixed
100vhwith no overscroll containment (whole-page rubber-band that reveals blank ground), andOnboardingShellcentered content withjustify-content: center, which pushes the top of tall content above the scroll origin where it can't be reached. This switches the frame to100dvh+overflow: hiddenwithoverscroll-behavior: none, and usesjustify-content: safe centerso tall content (small devices, long error copy) scrolls into view instead of clipping. Most screens already self-scroll, so the change is contained to the shared shell + frame.Files
apps/*/src/app.html—viewport-fit=coverapps/*/src/lib/styles/base.css—--safe-*vars +overscroll-behavior: noneapps/identity-wallet/src/routes/+page.svelte—.appfixed100dvhsafe-area frameapps/identity-wallet/src/lib/components/ui/OnboardingShell.svelte— scroll-safe centeringapps/admin-companion/src/lib/components/ui/ScreenShell.svelte— safe-area paddingCargo.lock— tauri 2.10.3 → 2.11.0Verification
pnpm check(svelte-check): 0 errors / 0 warnings for both apps.cargo metadata --lockedpasses;deny.tomlsetsmultiple-versions = "allow"and bans only tower-http/reqwest/tonic (none touched).macos-26ios-pr-checklane compiles both apps against Tauri 2.11 and runs their Rust tests. A background→resume smoke test on a simulator/TestFlight build is worth doing before release, since the resume fix is only observable at runtime.🤖 Generated with Claude Code
Generated by Claude Code