From 5124af930bde7e92011cb0be1f87eff542147f17 Mon Sep 17 00:00:00 2001 From: Evi Nova <66773372+Tranquil-Flow@users.noreply.github.com> Date: Thu, 2 Apr 2026 14:28:34 +1000 Subject: [PATCH] fix(webview): screen dimension fixes, tunnel fail state, cleanup (#1904) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(webview): screen dimension fixes, bump euclid 1.4.0, cleanup Set WEB_SAFE_AREA top to 0 — native shell handles status bar insets edge-to-edge. Add flex wrappers to ConfirmIdentificationScreen and VerificationResultScreen so StatusState fills viewport. Bump @selfxyz/euclid and euclid-core to 1.4.0 (edge-to-edge backgrounds, responsive animations, centered text, fixed button visibility). Delete orphaned KycMockScreen replaced by TunnelKycWrapper. * fix(rn-sdk-test-app): gracefully skip pod install when Ruby < 3.2 The postinstall script requires Ruby 3.2+ and bundler 2.6.9 for CocoaPods. On macOS with system Ruby 2.6, this hard-failed yarn install for the entire monorepo. Now checks Ruby version first and skips with a message instead of failing. --- .../rn-sdk-test-app/scripts/postinstall.cjs | 9 +++++ packages/webview-app/package.json | 4 +-- .../ConfirmIdentificationScreen.tsx | 13 +++++-- .../proving/VerificationResultScreen.tsx | 13 +++++-- .../src/screens/tunnel/KycMockScreen.tsx | 34 ------------------- packages/webview-app/src/utils/insets.ts | 2 +- yarn.lock | 22 ++++++------ 7 files changed, 45 insertions(+), 52 deletions(-) delete mode 100644 packages/webview-app/src/screens/tunnel/KycMockScreen.tsx diff --git a/packages/rn-sdk-test-app/scripts/postinstall.cjs b/packages/rn-sdk-test-app/scripts/postinstall.cjs index c70cf6db0..10ed9b323 100644 --- a/packages/rn-sdk-test-app/scripts/postinstall.cjs +++ b/packages/rn-sdk-test-app/scripts/postinstall.cjs @@ -24,6 +24,15 @@ if (process.platform !== 'darwin' || isCi || process.env.SKIP_RN_SDK_TEST_APP_PO process.exit(0); } +const rubyVersion = spawnSync('ruby', ['-e', 'puts RUBY_VERSION'], { encoding: 'utf8' }); +const version = (rubyVersion.stdout || '').trim(); +const [major, minor] = version.split('.').map(Number); + +if (!version || major < 3 || (major === 3 && minor < 2)) { + console.log(`[rn-sdk-test-app] Skipping iOS pod install: Ruby ${version || 'not found'} < 3.2 required. Install Ruby 3.2+ to enable.`); + process.exit(0); +} + const bundleCheck = spawnSync('bundle', ['check'], { cwd: iosDir, stdio: 'inherit', diff --git a/packages/webview-app/package.json b/packages/webview-app/package.json index 57f1a972c..b81b1bb0a 100644 --- a/packages/webview-app/package.json +++ b/packages/webview-app/package.json @@ -20,8 +20,8 @@ "@didit-protocol/sdk-web": "^0.1.8", "@scure/bip32": "^2.0.1", "@scure/bip39": "^1.6.0", - "@selfxyz/euclid": "1.3.0", - "@selfxyz/euclid-core": "1.3.0", + "@selfxyz/euclid": "1.4.0", + "@selfxyz/euclid-core": "1.4.0", "@selfxyz/mobile-sdk-alpha": "workspace:^", "@selfxyz/webview-bridge": "workspace:^", "buffer": "^6.0.3", diff --git a/packages/webview-app/src/screens/onboarding/ConfirmIdentificationScreen.tsx b/packages/webview-app/src/screens/onboarding/ConfirmIdentificationScreen.tsx index 72504d047..7818b045c 100644 --- a/packages/webview-app/src/screens/onboarding/ConfirmIdentificationScreen.tsx +++ b/packages/webview-app/src/screens/onboarding/ConfirmIdentificationScreen.tsx @@ -12,6 +12,7 @@ import type { VerificationResult } from '@selfxyz/webview-bridge'; import { MockRegistrationFailureButton } from '../../components/MockRegistrationFailureButton'; import { useSelfClient } from '../../providers/SelfClientProvider'; import { useVerificationRequest } from '../../providers/VerificationRequestProvider'; +import { WEB_SAFE_AREA } from '../../utils/insets'; export const ConfirmIdentificationScreen: React.FC = () => { const navigate = useNavigate(); @@ -56,7 +57,15 @@ export const ConfirmIdentificationScreen: React.FC = () => { }, [analytics, countryCode, documentType, haptic, lifecycle, navigate, nextPath, request.userId, verificationId]); return ( - <> +
{ buttonText="Confirm" onButtonPress={onConfirm} /> - +
); }; diff --git a/packages/webview-app/src/screens/proving/VerificationResultScreen.tsx b/packages/webview-app/src/screens/proving/VerificationResultScreen.tsx index 57f467aa5..8c9878b38 100644 --- a/packages/webview-app/src/screens/proving/VerificationResultScreen.tsx +++ b/packages/webview-app/src/screens/proving/VerificationResultScreen.tsx @@ -10,6 +10,7 @@ import { colors, StatusState, WarningOctagonIcon } from '@selfxyz/euclid'; import type { VerificationResult } from '@selfxyz/webview-bridge'; import { useSelfClient } from '../../providers/SelfClientProvider'; +import { WEB_SAFE_AREA } from '../../utils/insets'; export const VerificationResultScreen: React.FC = () => { const navigate = useNavigate(); @@ -46,7 +47,15 @@ export const VerificationResultScreen: React.FC = () => { }, [analytics, haptic, lifecycle, navigate, result, resultSent]); return ( - <> +
{ onButtonPress={onContinue} icon={success ? undefined : } /> - +
); }; diff --git a/packages/webview-app/src/screens/tunnel/KycMockScreen.tsx b/packages/webview-app/src/screens/tunnel/KycMockScreen.tsx deleted file mode 100644 index a409c2bca..000000000 --- a/packages/webview-app/src/screens/tunnel/KycMockScreen.tsx +++ /dev/null @@ -1,34 +0,0 @@ -// SPDX-FileCopyrightText: 2025-2026 Social Connect Labs, Inc. -// SPDX-License-Identifier: BUSL-1.1 -// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. - -import type React from 'react'; -import { useCallback } from 'react'; -import { useNavigate } from 'react-router-dom'; - -import { Button } from '@selfxyz/euclid'; - -export const KycMockScreen: React.FC = () => { - const navigate = useNavigate(); - - const onContinue = useCallback(() => { - navigate('/tunnel/proof/receipt'); - }, [navigate]); - - return ( -
-

KYC mock

-
- ); -}; diff --git a/packages/webview-app/src/utils/insets.ts b/packages/webview-app/src/utils/insets.ts index 667129b3c..5f2da4ac4 100644 --- a/packages/webview-app/src/utils/insets.ts +++ b/packages/webview-app/src/utils/insets.ts @@ -5,4 +5,4 @@ import { createSafeAreaProps } from '@selfxyz/euclid'; * In a native shell, these would come from the OS safe area APIs. * For browser preview, we use small fixed values for visual padding. */ -export const WEB_SAFE_AREA = createSafeAreaProps({ top: 16, bottom: 16 }); +export const WEB_SAFE_AREA = createSafeAreaProps({ top: 0, bottom: 16 }); diff --git a/yarn.lock b/yarn.lock index d354eb6e4..da5cd9f76 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10809,26 +10809,26 @@ __metadata: languageName: unknown linkType: soft -"@selfxyz/euclid-core@npm:1.3.0, @selfxyz/euclid-core@npm:^1.3.0": - version: 1.3.0 - resolution: "@selfxyz/euclid-core@npm:1.3.0" +"@selfxyz/euclid-core@npm:1.4.0, @selfxyz/euclid-core@npm:^1.4.0": + version: 1.4.0 + resolution: "@selfxyz/euclid-core@npm:1.4.0" peerDependencies: react: ">=18.2.0" - checksum: 10c0/346831b2e2128014a1143f2af079229c40bfe64a622ef54600f0d927a8b8f78e8ad624fd4805488e03fbc2504171313fcc62c4123970afa30597c7380c817c3b + checksum: 10c0/ab08282ee623ae120e7c0e83889739775d7f2289d5d662026c17ec4e3f9fd398c91ab79e98fab1198e8d9b6ccecbea4fd2576acb3d62d20481350e28bfd8cb2a languageName: node linkType: hard -"@selfxyz/euclid@npm:1.3.0": - version: 1.3.0 - resolution: "@selfxyz/euclid@npm:1.3.0" +"@selfxyz/euclid@npm:1.4.0": + version: 1.4.0 + resolution: "@selfxyz/euclid@npm:1.4.0" dependencies: "@lottiefiles/dotlottie-react": "npm:^0.18.4" - "@selfxyz/euclid-core": "npm:^1.3.0" + "@selfxyz/euclid-core": "npm:^1.4.0" lottie-react: "npm:^2.4.1" peerDependencies: react: ">=18.2.0" react-dom: ">=18.2.0" - checksum: 10c0/056e53cfa6566056fc107fb553157de586dcdd384eedf101316b11b08d39d5800226321d53e119e38160977ef346632f6db16c27ad67f003d0bf085aed8a0f48 + checksum: 10c0/fd560c7b7a2f1fcb7e69d85d3f34b6c7f9c2d711a634c18cc034566b9b3f8b2e353acdab60a9233326688ef055cf4ab6ff16d3d6a7912c8876e1d77559717f48 languageName: node linkType: hard @@ -11288,8 +11288,8 @@ __metadata: "@didit-protocol/sdk-web": "npm:^0.1.8" "@scure/bip32": "npm:^2.0.1" "@scure/bip39": "npm:^1.6.0" - "@selfxyz/euclid": "npm:1.3.0" - "@selfxyz/euclid-core": "npm:1.3.0" + "@selfxyz/euclid": "npm:1.4.0" + "@selfxyz/euclid-core": "npm:1.4.0" "@selfxyz/mobile-sdk-alpha": "workspace:^" "@selfxyz/webview-bridge": "workspace:^" "@testing-library/react": "npm:^14.1.2"