Fix WebView layout, Android insets, and iOS dev server support#1935
Fix WebView layout, Android insets, and iOS dev server support#1935transphorm merged 8 commits intodevfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds dev-server wiring across platforms, toggles SDK config version in the KMP test app, wraps Android WebViews with window-insets handling, updates web onboarding layout and scoped CSS, and extends webview provider APIs/implementations to accept and prefer a developer Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: bb06e580-1c89-480a-8f7f-43a9d6917c7f
📒 Files selected for processing (3)
packages/kmp-sdk-test-app/composeApp/src/commonMain/kotlin/xyz/self/testapp/screens/SdkLaunchScreen.ktpackages/kmp-sdk/shared/src/androidMain/kotlin/xyz/self/sdk/webview/SelfVerificationActivity.ktpackages/webview-app/src/screens/onboarding/ProviderLaunchScreen.tsx
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7cc1b3d8-06bc-43d6-b31f-17d41e03a766
📒 Files selected for processing (3)
packages/kmp-sdk/shared/src/androidMain/kotlin/xyz/self/sdk/webview/SelfVerificationActivity.ktpackages/native-shell-android/src/main/kotlin/xyz/self/sdk/webview/SelfVerificationActivity.ktpackages/webview-app/src/screens/onboarding/ProviderLaunchScreen.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/webview-app/src/screens/onboarding/ProviderLaunchScreen.tsx
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: fa679af9-5111-494d-a584-c9f87ac2d4bc
📒 Files selected for processing (8)
packages/kmp-sdk-test-app/composeApp/src/iosMain/kotlin/xyz/self/testapp/screens/DevServerUrl.ios.ktpackages/kmp-sdk-test-app/iosApp/iosApp/Info.plistpackages/kmp-sdk-test-app/scripts/run-ios.shpackages/kmp-sdk/shared/src/androidMain/kotlin/xyz/self/sdk/webview/SelfVerificationActivity.ktpackages/kmp-sdk/shared/src/iosMain/kotlin/xyz/self/sdk/api/SelfSdk.ios.ktpackages/kmp-sdk/shared/src/iosMain/kotlin/xyz/self/sdk/providers/WebViewProvider.ktpackages/kmp-sdk/shared/src/iosMain/kotlin/xyz/self/sdk/webview/IosWebViewHost.ktpackages/self-sdk-swift/Sources/SelfSdkSwift/Providers/WebViewProviderImpl.swift
✅ Files skipped from review due to trivial changes (1)
- packages/kmp-sdk-test-app/iosApp/iosApp/Info.plist
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/kmp-sdk/shared/src/androidMain/kotlin/xyz/self/sdk/webview/SelfVerificationActivity.kt
Summary
WEB_SAFE_AREAinsets for the KYC pending screendevServerUrlthrough the full iOS SDK chain (KMP → Swift) soWEBVIEW_DEV_URLworks on iOS identically to AndroidChanges
KMP SDK (Android)
SelfVerificationActivity.kt— callWindowCompat.setDecorFitsSystemWindows(window, false), wrap WebView inFrameLayoutwithWindowInsetsCompatlistener for system bars + display cutout, clean up listener on destroyKMP SDK (iOS)
WebViewProvider.kt— addconfigureDevServer(devServerUrl:)to the interfaceIosWebViewHost.kt— acceptdevServerUrlparam, pass to providerSelfSdk.ios.kt— passconfig.devServerUrlthrough toIosWebViewHostSwift SDK
WebViewProviderImpl.swift— storedevServerUrl, use it ininitialContentURL()(priority: devServerUrl → loopback fallback → remote), updateisTrustedBridgeURLandisTrustedBridgeFrameInfoto trust dev server originKMP Test App
SdkLaunchScreen.kt— passversiontoSelfSdkConfigbased on mock document toggleDevServerUrl.ios.kt— readWEBVIEW_DEV_URLfrom Info.plist viaNSBundle, reject unresolved$(...)placeholdersInfo.plist— addWEBVIEW_DEV_URLbuild setting substitution keyrun-ios.sh— passWEBVIEW_DEV_URLenv var to xcodebuild; fix-project→-workspacefor CocoaPods linkageWebView App
ProviderLaunchScreen.tsx— constrain root toheight: 100vh+overflow: hidden, addposition: relativefor overlay context, wrap KYC pending screen in absolute overlay, useWEB_SAFE_AREA.insets, scope CSS overrides to#${CONTAINER_ID}Test Plan
yarn lint && yarn typespassescd packages/webview-app && yarn buildcd packages/kmp-sdk && ./gradlew :shared:jvmTest && ./gradlew :shared:ktlintCheckcd packages/kmp-sdk-test-app && ./gradlew ktlintCheckWEBVIEW_DEV_URL=http://<ip>:5173 yarn android— verify WebView loads from dev server, content not under status barWEBVIEW_DEV_URL=http://<ip>:5173 yarn ios— verify WebView loads from dev serverNative Consolidation Checklist
cd app && yarn jest:run/yarn workspace @selfxyz/rn-sdk-test-app test)🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
New Features