Skip to content

Fix mobile resume blanking and viewport/scroll layout bugs - #225

Merged
malpercio-dev merged 2 commits into
mainfrom
claude/mobile-resume-layout-bugs-fxmt59
Jul 13, 2026
Merged

Fix mobile resume blanking and viewport/scroll layout bugs#225
malpercio-dev merged 2 commits into
mainfrom
claude/mobile-resume-layout-bugs-fxmt59

Conversation

@malpercio-dev

Copy link
Copy Markdown
Owner

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-wry now installs a default webViewWebContentProcessDidTerminate handler that reloads the webview automatically.

Both apps resolved to 2.10.3, just before the fix. This bumps the tauri family in Cargo.lock to tauri 2.11.0 / tauri-runtime-wry 2.11.4 / wry 0.55.1.

  • Lockfile-only change — every manifest already declares tauri = "2", so no manifest edits.
  • Contained to the two app crates; no server crate depends on tauri, so the Linux PDS gate is unaffected.
  • Transitive additions (png, tendril, dbus/libdbus-sys, ctor/dtor proc-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=cover to both app.html, defines --safe-* = env(safe-area-inset-*) vars in each base.css, and pads the root shells (identity-wallet .app, admin ScreenShell) 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 100vh with no overscroll containment (whole-page rubber-band that reveals blank ground), and OnboardingShell centered content with justify-content: center, which pushes the top of tall content above the scroll origin where it can't be reached. This switches the frame to 100dvh + overflow: hidden with overscroll-behavior: none, and uses justify-content: safe center so 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.htmlviewport-fit=cover
  • apps/*/src/lib/styles/base.css--safe-* vars + overscroll-behavior: none
  • apps/identity-wallet/src/routes/+page.svelte.app fixed 100dvh safe-area frame
  • apps/identity-wallet/src/lib/components/ui/OnboardingShell.svelte — scroll-safe centering
  • apps/admin-companion/src/lib/components/ui/ScreenShell.svelte — safe-area padding
  • Cargo.lock — tauri 2.10.3 → 2.11.0

Verification

  • pnpm check (svelte-check): 0 errors / 0 warnings for both apps.
  • Unit tests: 65 (identity-wallet) + 96 (admin-companion) passing.
  • cargo metadata --locked passes; deny.toml sets multiple-versions = "allow" and bans only tower-http/reqwest/tonic (none touched).
  • Not verifiable in the Linux dev environment: the iOS Rust build and on-device resume behavior (no Apple toolchain; both apps are excluded from the Linux gate by design). CI's macos-26 ios-pr-check lane 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

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
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@malpercio-dev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: de72f5e2-5e34-4ae3-bcda-d816875af37d

📥 Commits

Reviewing files that changed from the base of the PR and between 83ecc65 and c234ef8.

📒 Files selected for processing (3)
  • apps/admin-companion/src/lib/components/ui/ScreenShell.svelte
  • apps/identity-wallet/src/lib/components/ui/OnboardingShell.svelte
  • apps/identity-wallet/src/routes/+page.svelte
📝 Walkthrough

Walkthrough

Both 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.

Changes

Mobile layout behavior

Layer / File(s) Summary
Viewport and safe-area foundation
apps/admin-companion/src/app.html, apps/admin-companion/src/lib/styles/base.css, apps/identity-wallet/src/app.html, apps/identity-wallet/src/lib/styles/base.css
Viewport metadata includes viewport-fit=cover; both apps define safe-area variables with fallbacks and disable document overscroll.
Shell sizing and overflow behavior
apps/admin-companion/src/lib/components/ui/ScreenShell.svelte, apps/identity-wallet/src/lib/components/ui/OnboardingShell.svelte, apps/identity-wallet/src/routes/+page.svelte
Shell layouts apply safe-area padding, enable onboarding scrolling, use safe centering, and size the wallet app with 100dvh.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

A rabbit hops where safe insets glow,
With padded screens in a tidy row.
No rubber-band bounce, no hidden view,
Tall onboarding scrolls right through.
“Edge to edge!” I cheer, “It’s done!”

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly captures the main fixes: mobile resume blanking and viewport/scroll layout issues.
Description check ✅ Passed The description matches the PR’s iOS WKWebView and layout fixes and is directly related to the changed files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/mobile-resume-layout-bugs-fxmt59
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/mobile-resume-layout-bugs-fxmt59

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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
@malpercio-dev
malpercio-dev merged commit 7a0da74 into main Jul 13, 2026
8 checks passed
@malpercio-dev
malpercio-dev deleted the claude/mobile-resume-layout-bugs-fxmt59 branch July 13, 2026 12:40
malpercio-dev added a commit that referenced this pull request Jul 13, 2026
…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>
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.

2 participants