Skip to content

Conversation

@aaronmgdr
Copy link
Contributor

@aaronmgdr aaronmgdr commented Oct 8, 2025

needed to remove tamagui as a dependency as config issues came up in the end its nice to have one less dependency anyway

i viewed the screens and everything looks right to me

Summary by CodeRabbit

  • New Features

    • Web "hold to activate" long-press button with animated progress; round country-flag avatars.
  • Style

    • Unified typography and button styling: colors, sizes, alignment now applied via style props; spacing refined across screens.
  • Refactor

    • UI components consolidated into a shared mobile SDK; app root switched to a pre-built theme/config.
  • Chores

    • Build and packaging updates, font assets included, and test SVG mocks added.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 8, 2025

Walkthrough

Replaces runtime Tamagui config with a prebuilt config, removes app-local Tamagui typography and web HeldPrimaryButton, moves typography/buttons/flags into packages/mobile-sdk-alpha with RN and web implementations, updates many app imports to the SDK, adjusts build entries, Jest SVG mocks, and package dependencies.

Changes

Cohort / File(s) Summary
App provider config
app/index.js
Import prebuilt ./tamagui.config and pass it into <TamaguiProvider config={tamaguiConfig}> instead of calling createTamagui(config) at runtime.
App UI imports & styling (bulk)
app/src/components/*, app/src/layouts/*, app/src/screens/**/*
Replaced many local UI/typography/button imports with @selfxyz/mobile-sdk-alpha/components and converted component-level typography props to RN style objects.
Removed app typography files
app/src/components/typography/*
Deleted Tamagui-based local typography exports (BodyText, Caption, Description, SubHeader, Title).
NavBar & title props
app/src/components/NavBar/*, app/src/components/NavBar/BaseNavBar.tsx
Title now imported from SDK; NavBarTitleProps now extends RN TextProps; title typography props consolidated into style objects.
Web long-hold button (moved)
Removed: app/src/components/buttons/PrimaryButtonLongHold.web.tsx
Added: packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.web.tsx
Removed app-level web HeldPrimaryButton; added SDK web implementation using Animated timing, progress overlay, layout measuring, and hold-to-trigger logic.
SDK: buttons & AbstractButton
packages/mobile-sdk-alpha/src/components/buttons/*
Switched from Tamagui Button to RN Pressable; ButtonProps extends PressableProps; added selfClient tracking; normalized relative imports.
SDK: RN typography added
packages/mobile-sdk-alpha/src/components/typography/*
Added RN implementations and exports for BodyText, Caption, Description, DescriptionTitle, SubHeader, Title; styles applied via merged RN style arrays.
SDK: flags & styles
packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx, .../typography/styles.ts
Parameterized flag lookup to accept CountryFlags map, switched lookup logic, added circular borderRadius, and adjusted color import paths.
SDK: screen imports
packages/mobile-sdk-alpha/src/components/screens/*
Moved View (and other small imports) from Tamagui to react-native across several screens.
SDK: exports & build
packages/mobile-sdk-alpha/src/components/index.ts, packages/mobile-sdk-alpha/tsup.config.ts
Added many component exports in SDK index and exposed components/index as a tsup build entry.
SDK: utils & fonts
packages/mobile-sdk-alpha/src/utils/fonts.ts, packages/mobile-sdk-alpha/src/utils/styleUtils.ts
Added font-name constants (advercase, dinot, plexMono) and normalizeBorderWidth helper.
Packages / tests / deps / config
packages/mobile-sdk-alpha/package.json, app/package.json, app/jest.config.cjs, app/jest.setup.js, packages/mobile-sdk-alpha/react-native.config.cjs
SDK deps updated (added @xstate/react, react-native-svg-circle-country-flags), peerDeps changed to react-native-svg; app removed react-native-svg-circle-country-flags; Jest mappings and SVG mock added; RN asset fonts added to SDK config.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant HeldWeb as HeldPrimaryButton (web)
  participant Animated as Animated.Value
  participant Primary as PrimaryButton.onLongPress

  User->>HeldWeb: pressIn
  HeldWeb->>Animated: start Animated.timing -> ACTION_TIMER
  note right of Animated #88C0D0: progress drives overlay width
  alt progress ≥ threshold while pressed
    Animated-->>HeldWeb: threshold reached
    HeldWeb->>Primary: call onLongPress()
  else released early
    User->>HeldWeb: pressOut
    HeldWeb->>Animated: animate progress → 0 (200ms)
  end
Loading
sequenceDiagram
  autonumber
  participant UI as AbstractButton
  participant Pressable as RN Pressable
  participant Client as useSelfClient

  UI->>Pressable: user press -> handlePress()
  UI->>Client: selfClient.trackEvent("button_press")
  Pressable-->>UI: invoke forwarded onPress callback (if provided)
  UI->>UI: apply pressedStyle via functional style resolver when pressed
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

codex

Suggested reviewers

  • shazarre

Poem

Tamagui left its runtime nest,
Buttons learned to press and rest.
Fonts and flags found one new place,
A barrelled SDK shares the face.
Build and tests now sing in tune—hooray, deploy soon! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title accurately reflects the primary change of moving components into the SDK for future reuse, is concise and clear, and matches the PR scope without extraneous details.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch aaronmgdr/untamagui

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c2bb656 and 2b7f019.

📒 Files selected for processing (1)
  • app/src/screens/app/LaunchScreen.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/screens/app/LaunchScreen.tsx
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: e2e-ios
  • GitHub Check: build-deps
  • GitHub Check: android-build-test
  • GitHub Check: ios-e2e
  • GitHub Check: analyze-ios
  • GitHub Check: analyze-android

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx (1)

49-56: Fix const reassignment in handlePress.

Line 53 tries to assign back to trackEvent, but trackEvent is a const from props destructuring. When a colon-delimited event hits this path, the assignment throws TypeError: Assignment to constant variable, breaking every press. Please keep trackEvent immutable and derive a new local string before tracking the event.

   if (trackEvent) {
     // attempt to remove event category from click event
     const parsedEvent = trackEvent?.split(':')?.[1]?.trim();
-    if (parsedEvent) {
-      trackEvent = parsedEvent;
-    }
-    selfClient.trackEvent(`Click: ${trackEvent}`);
+    const eventName = parsedEvent ?? trackEvent;
+    selfClient.trackEvent(`Click: ${eventName}`);
   }
🧹 Nitpick comments (2)
app/src/screens/settings/DocumentDataInfoScreen.tsx (1)

67-68: Inline styles bypass Caption's semantic size prop.

The Caption component in the SDK accepts a size prop ('small' | 'large' | default) that maps to fontSize values, but this code now uses inline style={{ fontSize: 16 }}. While this works fine, it bypasses the component's built-in sizing API.

If you want consistency across the codebase, consider using the semantic size prop where possible, or document the rationale for preferring inline styles.

app/src/screens/document/DocumentNFCTroubleScreen.tsx (1)

99-99: Confirm Caption color overrides
Caption is consistently overridden to slate500 in all trouble/tips screens—ensure this darker tone matches the design spec. Remove the explicit slate400 override in SaveRecoveryPhraseScreen (Caption defaults to slate400).

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8cbb7c2 and 11ba15c.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (81)
  • app/index.js (1 hunks)
  • app/src/components/Disclosures.tsx (2 hunks)
  • app/src/components/FeedbackModal.tsx (1 hunks)
  • app/src/components/FeedbackModalScreen.tsx (2 hunks)
  • app/src/components/NavBar/AadhaarNavBar.tsx (1 hunks)
  • app/src/components/NavBar/BaseNavBar.tsx (1 hunks)
  • app/src/components/NavBar/DocumentFlowNavBar.tsx (1 hunks)
  • app/src/components/NavBar/HomeNavBar.tsx (1 hunks)
  • app/src/components/NavBar/IdDetailsNavBar.tsx (1 hunks)
  • app/src/components/Tips.tsx (2 hunks)
  • app/src/components/buttons/PrimaryButtonLongHold.web.tsx (0 hunks)
  • app/src/components/flag/RoundFlag.tsx (0 hunks)
  • app/src/components/typography/BodyText.ts (0 hunks)
  • app/src/components/typography/Caption.tsx (0 hunks)
  • app/src/components/typography/Description.tsx (0 hunks)
  • app/src/components/typography/DescriptionTitle.tsx (0 hunks)
  • app/src/components/typography/SubHeader.tsx (0 hunks)
  • app/src/components/typography/Title.tsx (0 hunks)
  • app/src/layouts/SimpleScrolledTitleLayout.tsx (2 hunks)
  • app/src/screens/dev/CreateMockScreen.tsx (2 hunks)
  • app/src/screens/dev/CreateMockScreenDeepLink.tsx (2 hunks)
  • app/src/screens/document/ComingSoonScreen.tsx (2 hunks)
  • app/src/screens/document/ConfirmBelongingScreen.tsx (2 hunks)
  • app/src/screens/document/CountryPickerScreen.tsx (5 hunks)
  • app/src/screens/document/DocumentCameraScreen.tsx (1 hunks)
  • app/src/screens/document/DocumentCameraTroubleScreen.tsx (2 hunks)
  • app/src/screens/document/DocumentNFCMethodSelectionScreen.tsx (2 hunks)
  • app/src/screens/document/DocumentNFCScanScreen.tsx (3 hunks)
  • app/src/screens/document/DocumentNFCScanScreen.web.tsx (2 hunks)
  • app/src/screens/document/DocumentNFCTroubleScreen.tsx (3 hunks)
  • app/src/screens/document/DocumentOnboardingScreen.tsx (1 hunks)
  • app/src/screens/document/IDPickerScreen.tsx (3 hunks)
  • app/src/screens/document/aadhaar/AadhaarUploadErrorScreen.tsx (2 hunks)
  • app/src/screens/document/aadhaar/AadhaarUploadScreen.tsx (2 hunks)
  • app/src/screens/document/aadhaar/AadhaarUploadedSuccessScreen.tsx (2 hunks)
  • app/src/screens/home/DisclaimerScreen.tsx (1 hunks)
  • app/src/screens/home/ProofHistoryList.tsx (2 hunks)
  • app/src/screens/home/ProofHistoryScreen.tsx (2 hunks)
  • app/src/screens/prove/ProofRequestStatusScreen.tsx (2 hunks)
  • app/src/screens/prove/ProveScreen.tsx (8 hunks)
  • app/src/screens/prove/QRCodeTroubleScreen.tsx (2 hunks)
  • app/src/screens/prove/QRCodeViewFinderScreen.tsx (1 hunks)
  • app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx (1 hunks)
  • app/src/screens/recovery/AccountRecoveryScreen.tsx (1 hunks)
  • app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx (2 hunks)
  • app/src/screens/recovery/DocumentDataNotFoundScreen.tsx (2 hunks)
  • app/src/screens/recovery/RecoverWithPhraseScreen.tsx (2 hunks)
  • app/src/screens/recovery/SaveRecoveryPhraseScreen.tsx (3 hunks)
  • app/src/screens/settings/CloudBackupScreen.tsx (1 hunks)
  • app/src/screens/settings/DocumentDataInfoScreen.tsx (2 hunks)
  • app/src/screens/settings/ManageDocumentsScreen.tsx (1 hunks)
  • app/src/screens/settings/SettingsScreen.tsx (3 hunks)
  • app/src/screens/settings/ShowRecoveryPhraseScreen.tsx (1 hunks)
  • app/src/screens/system/DeferredLinkingInfoScreen.tsx (1 hunks)
  • app/src/screens/system/LaunchScreen.tsx (2 hunks)
  • app/src/screens/system/ModalScreen.tsx (2 hunks)
  • packages/mobile-sdk-alpha/package.json (2 hunks)
  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx (4 hunks)
  • packages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx (2 hunks)
  • packages/mobile-sdk-alpha/src/components/buttons/PrimaryButton.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.shared.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.web.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/buttons/SecondaryButton.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/index.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/screens/PassportCameraScreen.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/screens/QRCodeScreen.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/typography/Additional.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/typography/Caption.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/typography/Caution.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/typography/Description.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/typography/DescriptionTitle.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/typography/SubHeader.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/typography/Title.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/typography/styles.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/utils/fonts.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/utils/styleUtils.ts (1 hunks)
  • packages/mobile-sdk-alpha/tsup.config.ts (3 hunks)
💤 Files with no reviewable changes (8)
  • app/src/components/typography/Caption.tsx
  • app/src/components/typography/SubHeader.tsx
  • app/src/components/typography/Description.tsx
  • app/src/components/buttons/PrimaryButtonLongHold.web.tsx
  • app/src/components/typography/BodyText.ts
  • app/src/components/flag/RoundFlag.tsx
  • app/src/components/typography/DescriptionTitle.tsx
  • app/src/components/typography/Title.tsx
🧰 Additional context used
📓 Path-based instructions (9)
packages/mobile-sdk-alpha/**/*.{ts,tsx}

📄 CodeRabbit inference engine (packages/mobile-sdk-alpha/AGENTS.md)

packages/mobile-sdk-alpha/**/*.{ts,tsx}: Use strict TypeScript type checking across the codebase
Follow ESLint TypeScript-specific rules
Avoid introducing circular dependencies

Files:

  • packages/mobile-sdk-alpha/src/components/typography/Title.tsx
  • packages/mobile-sdk-alpha/src/components/typography/DescriptionTitle.tsx
  • packages/mobile-sdk-alpha/tsup.config.ts
  • packages/mobile-sdk-alpha/src/components/typography/Description.tsx
  • packages/mobile-sdk-alpha/src/components/typography/styles.ts
  • packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx
  • packages/mobile-sdk-alpha/src/components/typography/Caution.tsx
  • packages/mobile-sdk-alpha/src/components/typography/SubHeader.tsx
  • packages/mobile-sdk-alpha/src/components/typography/Caption.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/PrimaryButton.tsx
  • packages/mobile-sdk-alpha/src/utils/fonts.ts
  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx
  • packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/SecondaryButton.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.web.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.shared.ts
  • packages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx
  • packages/mobile-sdk-alpha/src/components/screens/PassportCameraScreen.tsx
  • packages/mobile-sdk-alpha/src/components/typography/Additional.tsx
  • packages/mobile-sdk-alpha/src/components/screens/QRCodeScreen.tsx
  • packages/mobile-sdk-alpha/src/components/index.ts
  • packages/mobile-sdk-alpha/src/utils/styleUtils.ts
  • packages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsx
**/*.{js,ts,tsx,jsx,sol,nr}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{js,ts,tsx,jsx,sol,nr}: NEVER log sensitive data including PII (names, DOB, passport numbers, addresses), credentials, tokens, API keys, private keys, or session identifiers.
ALWAYS redact/mask sensitive fields in logs using consistent patterns (e.g., ***-***-1234 for passport numbers, J*** D*** for names).

Files:

  • packages/mobile-sdk-alpha/src/components/typography/Title.tsx
  • packages/mobile-sdk-alpha/src/components/typography/DescriptionTitle.tsx
  • app/src/screens/recovery/RecoverWithPhraseScreen.tsx
  • packages/mobile-sdk-alpha/tsup.config.ts
  • app/src/components/FeedbackModalScreen.tsx
  • app/src/screens/document/DocumentNFCScanScreen.web.tsx
  • packages/mobile-sdk-alpha/src/components/typography/Description.tsx
  • packages/mobile-sdk-alpha/src/components/typography/styles.ts
  • app/src/screens/document/DocumentCameraTroubleScreen.tsx
  • packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx
  • app/src/screens/settings/DocumentDataInfoScreen.tsx
  • app/src/screens/document/aadhaar/AadhaarUploadedSuccessScreen.tsx
  • app/src/components/NavBar/DocumentFlowNavBar.tsx
  • packages/mobile-sdk-alpha/src/components/typography/Caution.tsx
  • packages/mobile-sdk-alpha/src/components/typography/SubHeader.tsx
  • packages/mobile-sdk-alpha/src/components/typography/Caption.tsx
  • app/src/components/NavBar/AadhaarNavBar.tsx
  • app/src/screens/system/LaunchScreen.tsx
  • app/src/screens/document/aadhaar/AadhaarUploadErrorScreen.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/PrimaryButton.tsx
  • app/src/screens/prove/ProofRequestStatusScreen.tsx
  • app/src/screens/document/DocumentNFCMethodSelectionScreen.tsx
  • app/src/screens/document/aadhaar/AadhaarUploadScreen.tsx
  • packages/mobile-sdk-alpha/src/utils/fonts.ts
  • app/src/components/Tips.tsx
  • app/src/screens/document/DocumentOnboardingScreen.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx
  • packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx
  • app/src/screens/recovery/AccountRecoveryScreen.tsx
  • app/src/screens/document/IDPickerScreen.tsx
  • app/src/screens/settings/CloudBackupScreen.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/SecondaryButton.tsx
  • app/src/screens/dev/CreateMockScreen.tsx
  • app/src/screens/recovery/SaveRecoveryPhraseScreen.tsx
  • app/src/components/Disclosures.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.tsx
  • app/src/screens/document/ConfirmBelongingScreen.tsx
  • app/src/screens/document/CountryPickerScreen.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.web.tsx
  • app/src/screens/settings/ShowRecoveryPhraseScreen.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.shared.ts
  • app/src/screens/home/ProofHistoryScreen.tsx
  • app/src/screens/dev/CreateMockScreenDeepLink.tsx
  • app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx
  • app/src/screens/settings/SettingsScreen.tsx
  • app/src/screens/system/DeferredLinkingInfoScreen.tsx
  • app/src/screens/home/ProofHistoryList.tsx
  • app/src/screens/prove/QRCodeTroubleScreen.tsx
  • app/src/screens/settings/ManageDocumentsScreen.tsx
  • app/src/screens/prove/QRCodeViewFinderScreen.tsx
  • app/src/components/NavBar/IdDetailsNavBar.tsx
  • app/src/components/NavBar/HomeNavBar.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx
  • app/src/screens/system/ModalScreen.tsx
  • packages/mobile-sdk-alpha/src/components/screens/PassportCameraScreen.tsx
  • app/src/components/FeedbackModal.tsx
  • app/src/components/NavBar/BaseNavBar.tsx
  • app/src/screens/document/DocumentCameraScreen.tsx
  • packages/mobile-sdk-alpha/src/components/typography/Additional.tsx
  • packages/mobile-sdk-alpha/src/components/screens/QRCodeScreen.tsx
  • app/src/screens/document/DocumentNFCTroubleScreen.tsx
  • app/src/screens/recovery/DocumentDataNotFoundScreen.tsx
  • packages/mobile-sdk-alpha/src/components/index.ts
  • packages/mobile-sdk-alpha/src/utils/styleUtils.ts
  • packages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsx
  • app/src/layouts/SimpleScrolledTitleLayout.tsx
  • app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx
  • app/src/screens/home/DisclaimerScreen.tsx
  • app/src/screens/document/DocumentNFCScanScreen.tsx
  • app/src/screens/prove/ProveScreen.tsx
  • app/src/screens/document/ComingSoonScreen.tsx
  • app/index.js
packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}: Review alpha mobile SDK code for:

  • API consistency with core SDK
  • Platform-neutral abstractions
  • Performance considerations
  • Clear experimental notes or TODOs

Files:

  • packages/mobile-sdk-alpha/src/components/typography/Title.tsx
  • packages/mobile-sdk-alpha/src/components/typography/DescriptionTitle.tsx
  • packages/mobile-sdk-alpha/tsup.config.ts
  • packages/mobile-sdk-alpha/src/components/typography/Description.tsx
  • packages/mobile-sdk-alpha/src/components/typography/styles.ts
  • packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx
  • packages/mobile-sdk-alpha/src/components/typography/Caution.tsx
  • packages/mobile-sdk-alpha/src/components/typography/SubHeader.tsx
  • packages/mobile-sdk-alpha/src/components/typography/Caption.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/PrimaryButton.tsx
  • packages/mobile-sdk-alpha/src/utils/fonts.ts
  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx
  • packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/SecondaryButton.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.web.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.shared.ts
  • packages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx
  • packages/mobile-sdk-alpha/src/components/screens/PassportCameraScreen.tsx
  • packages/mobile-sdk-alpha/src/components/typography/Additional.tsx
  • packages/mobile-sdk-alpha/src/components/screens/QRCodeScreen.tsx
  • packages/mobile-sdk-alpha/src/components/index.ts
  • packages/mobile-sdk-alpha/src/utils/styleUtils.ts
  • packages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsx
app/**/*.{ts,tsx}

📄 CodeRabbit inference engine (app/AGENTS.md)

Type checking must pass before PRs (yarn types)

Files:

  • app/src/screens/recovery/RecoverWithPhraseScreen.tsx
  • app/src/components/FeedbackModalScreen.tsx
  • app/src/screens/document/DocumentNFCScanScreen.web.tsx
  • app/src/screens/document/DocumentCameraTroubleScreen.tsx
  • app/src/screens/settings/DocumentDataInfoScreen.tsx
  • app/src/screens/document/aadhaar/AadhaarUploadedSuccessScreen.tsx
  • app/src/components/NavBar/DocumentFlowNavBar.tsx
  • app/src/components/NavBar/AadhaarNavBar.tsx
  • app/src/screens/system/LaunchScreen.tsx
  • app/src/screens/document/aadhaar/AadhaarUploadErrorScreen.tsx
  • app/src/screens/prove/ProofRequestStatusScreen.tsx
  • app/src/screens/document/DocumentNFCMethodSelectionScreen.tsx
  • app/src/screens/document/aadhaar/AadhaarUploadScreen.tsx
  • app/src/components/Tips.tsx
  • app/src/screens/document/DocumentOnboardingScreen.tsx
  • app/src/screens/recovery/AccountRecoveryScreen.tsx
  • app/src/screens/document/IDPickerScreen.tsx
  • app/src/screens/settings/CloudBackupScreen.tsx
  • app/src/screens/dev/CreateMockScreen.tsx
  • app/src/screens/recovery/SaveRecoveryPhraseScreen.tsx
  • app/src/components/Disclosures.tsx
  • app/src/screens/document/ConfirmBelongingScreen.tsx
  • app/src/screens/document/CountryPickerScreen.tsx
  • app/src/screens/settings/ShowRecoveryPhraseScreen.tsx
  • app/src/screens/home/ProofHistoryScreen.tsx
  • app/src/screens/dev/CreateMockScreenDeepLink.tsx
  • app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx
  • app/src/screens/settings/SettingsScreen.tsx
  • app/src/screens/system/DeferredLinkingInfoScreen.tsx
  • app/src/screens/home/ProofHistoryList.tsx
  • app/src/screens/prove/QRCodeTroubleScreen.tsx
  • app/src/screens/settings/ManageDocumentsScreen.tsx
  • app/src/screens/prove/QRCodeViewFinderScreen.tsx
  • app/src/components/NavBar/IdDetailsNavBar.tsx
  • app/src/components/NavBar/HomeNavBar.tsx
  • app/src/screens/system/ModalScreen.tsx
  • app/src/components/FeedbackModal.tsx
  • app/src/components/NavBar/BaseNavBar.tsx
  • app/src/screens/document/DocumentCameraScreen.tsx
  • app/src/screens/document/DocumentNFCTroubleScreen.tsx
  • app/src/screens/recovery/DocumentDataNotFoundScreen.tsx
  • app/src/layouts/SimpleScrolledTitleLayout.tsx
  • app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx
  • app/src/screens/home/DisclaimerScreen.tsx
  • app/src/screens/document/DocumentNFCScanScreen.tsx
  • app/src/screens/prove/ProveScreen.tsx
  • app/src/screens/document/ComingSoonScreen.tsx
app/src/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

app/src/**/*.{ts,tsx,js,jsx}: Review React Native TypeScript code for:

  • Component architecture and reusability
  • State management patterns
  • Performance optimizations
  • TypeScript type safety
  • React hooks usage and dependencies
  • Navigation patterns

Files:

  • app/src/screens/recovery/RecoverWithPhraseScreen.tsx
  • app/src/components/FeedbackModalScreen.tsx
  • app/src/screens/document/DocumentNFCScanScreen.web.tsx
  • app/src/screens/document/DocumentCameraTroubleScreen.tsx
  • app/src/screens/settings/DocumentDataInfoScreen.tsx
  • app/src/screens/document/aadhaar/AadhaarUploadedSuccessScreen.tsx
  • app/src/components/NavBar/DocumentFlowNavBar.tsx
  • app/src/components/NavBar/AadhaarNavBar.tsx
  • app/src/screens/system/LaunchScreen.tsx
  • app/src/screens/document/aadhaar/AadhaarUploadErrorScreen.tsx
  • app/src/screens/prove/ProofRequestStatusScreen.tsx
  • app/src/screens/document/DocumentNFCMethodSelectionScreen.tsx
  • app/src/screens/document/aadhaar/AadhaarUploadScreen.tsx
  • app/src/components/Tips.tsx
  • app/src/screens/document/DocumentOnboardingScreen.tsx
  • app/src/screens/recovery/AccountRecoveryScreen.tsx
  • app/src/screens/document/IDPickerScreen.tsx
  • app/src/screens/settings/CloudBackupScreen.tsx
  • app/src/screens/dev/CreateMockScreen.tsx
  • app/src/screens/recovery/SaveRecoveryPhraseScreen.tsx
  • app/src/components/Disclosures.tsx
  • app/src/screens/document/ConfirmBelongingScreen.tsx
  • app/src/screens/document/CountryPickerScreen.tsx
  • app/src/screens/settings/ShowRecoveryPhraseScreen.tsx
  • app/src/screens/home/ProofHistoryScreen.tsx
  • app/src/screens/dev/CreateMockScreenDeepLink.tsx
  • app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx
  • app/src/screens/settings/SettingsScreen.tsx
  • app/src/screens/system/DeferredLinkingInfoScreen.tsx
  • app/src/screens/home/ProofHistoryList.tsx
  • app/src/screens/prove/QRCodeTroubleScreen.tsx
  • app/src/screens/settings/ManageDocumentsScreen.tsx
  • app/src/screens/prove/QRCodeViewFinderScreen.tsx
  • app/src/components/NavBar/IdDetailsNavBar.tsx
  • app/src/components/NavBar/HomeNavBar.tsx
  • app/src/screens/system/ModalScreen.tsx
  • app/src/components/FeedbackModal.tsx
  • app/src/components/NavBar/BaseNavBar.tsx
  • app/src/screens/document/DocumentCameraScreen.tsx
  • app/src/screens/document/DocumentNFCTroubleScreen.tsx
  • app/src/screens/recovery/DocumentDataNotFoundScreen.tsx
  • app/src/layouts/SimpleScrolledTitleLayout.tsx
  • app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx
  • app/src/screens/home/DisclaimerScreen.tsx
  • app/src/screens/document/DocumentNFCScanScreen.tsx
  • app/src/screens/prove/ProveScreen.tsx
  • app/src/screens/document/ComingSoonScreen.tsx
app/**/*.{ios,android,web}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (app/AGENTS.md)

Explain platform-specific code paths in the PR description (files with .ios, .android, or .web extensions)

Files:

  • app/src/screens/document/DocumentNFCScanScreen.web.tsx
packages/mobile-sdk-alpha/package.json

📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)

packages/mobile-sdk-alpha/package.json: Expose a 'test:build' script in the SDK's package.json that runs build, test, types, and lint
Enable tree shaking for the SDK (e.g., ensure 'sideEffects' is correctly set in package.json and exports are ESM-friendly)

Files:

  • packages/mobile-sdk-alpha/package.json
packages/mobile-sdk-alpha/**/package.json

📄 CodeRabbit inference engine (packages/mobile-sdk-alpha/AGENTS.md)

packages/mobile-sdk-alpha/**/package.json: Ensure package exports are properly configured
Verify package conditions are valid (e.g., exports conditions)

Files:

  • packages/mobile-sdk-alpha/package.json
**/package.json

📄 CodeRabbit inference engine (AGENTS.md)

Use Yarn only for package management (yarn install/add/remove); do not use npm or pnpm in scripts

Files:

  • packages/mobile-sdk-alpha/package.json
🧠 Learnings (16)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Update the app to consume the mobile-sdk-alpha package and replace local modules with SDK imports
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/index.ts : Re-export new SDK modules via packages/mobile-sdk-alpha/src/index.ts

Applied to files:

  • packages/mobile-sdk-alpha/tsup.config.ts
  • packages/mobile-sdk-alpha/src/utils/fonts.ts
  • packages/mobile-sdk-alpha/src/components/index.ts
📚 Learning: 2025-08-25T14:25:57.586Z
Learnt from: aaronmgdr
PR: selfxyz/self#951
File: app/src/providers/authProvider.web.tsx:17-18
Timestamp: 2025-08-25T14:25:57.586Z
Learning: The selfxyz/mobile-sdk-alpha/constants/analytics import path is properly configured with SDK exports, Metro aliases, and TypeScript resolution. Import changes from @/consts/analytics to this path are part of valid analytics migration, not TypeScript resolution issues.

Applied to files:

  • packages/mobile-sdk-alpha/src/components/typography/styles.ts
  • app/src/screens/prove/QRCodeViewFinderScreen.tsx
  • packages/mobile-sdk-alpha/src/components/typography/Additional.tsx
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests

Applied to files:

  • packages/mobile-sdk-alpha/src/components/typography/styles.ts
  • app/src/screens/document/DocumentOnboardingScreen.tsx
  • app/src/screens/recovery/AccountRecoveryScreen.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/SecondaryButton.tsx
  • app/src/screens/document/CountryPickerScreen.tsx
  • app/src/screens/dev/CreateMockScreenDeepLink.tsx
  • app/src/screens/system/DeferredLinkingInfoScreen.tsx
  • app/src/screens/prove/QRCodeViewFinderScreen.tsx
  • app/src/screens/document/DocumentCameraScreen.tsx
  • packages/mobile-sdk-alpha/src/components/typography/Additional.tsx
  • packages/mobile-sdk-alpha/src/components/screens/QRCodeScreen.tsx
  • packages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-26T14:49:11.190Z
Learnt from: shazarre
PR: selfxyz/self#936
File: app/src/screens/passport/PassportNFCScanScreen.tsx:28-31
Timestamp: 2025-08-26T14:49:11.190Z
Learning: SelfClientProvider is wrapped in app/App.tsx, providing context for useSelfClient() hook usage throughout the React Native app navigation stacks.

Applied to files:

  • app/src/screens/document/aadhaar/AadhaarUploadedSuccessScreen.tsx
  • app/src/screens/document/DocumentNFCMethodSelectionScreen.tsx
  • app/src/screens/document/aadhaar/AadhaarUploadScreen.tsx
📚 Learning: 2025-08-26T12:48:14.120Z
Learnt from: aaronmgdr
PR: selfxyz/self#951
File: app/src/screens/passport/PassportNFCScanScreen.web.tsx:8-9
Timestamp: 2025-08-26T12:48:14.120Z
Learning: SecondaryButton forwards the trackEvent prop to AbstractButton via prop spreading (...props). AbstractButton handles analytics tracking in its handlePress method using the legacy analytics() system rather than the new Self SDK approach, ensuring button analytics work consistently across the app.

Applied to files:

  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx
📚 Learning: 2025-08-26T12:48:14.120Z
Learnt from: aaronmgdr
PR: selfxyz/self#951
File: app/src/screens/passport/PassportNFCScanScreen.web.tsx:8-9
Timestamp: 2025-08-26T12:48:14.120Z
Learning: SecondaryButton in the app forwards the trackEvent prop to AbstractButton, which handles analytics integration. SecondaryButton does not need separate trackEvent prop handling as it delegates to AbstractButton.

Applied to files:

  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Do NOT mock selfxyz/mobile-sdk-alpha in tests (avoid jest.mock('selfxyz/mobile-sdk-alpha') and replacing real functions with mocks)

Applied to files:

  • app/src/screens/dev/CreateMockScreenDeepLink.tsx
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Test isPassportDataValid() with realistic synthetic passport data (never real user data)

Applied to files:

  • app/src/screens/dev/CreateMockScreenDeepLink.tsx
  • app/src/screens/document/DocumentNFCScanScreen.tsx
📚 Learning: 2025-09-22T11:10:22.019Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-09-22T11:10:22.019Z
Learning: Applies to src/**/*.{js,ts,tsx,jsx} : Use `react-navigation/native` with `createStaticNavigation` for type-safe navigation in React Native.

Applied to files:

  • app/src/screens/system/ModalScreen.tsx
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/**/package.json : Ensure package exports are properly configured

Applied to files:

  • packages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/package.json : Enable tree shaking for the SDK (e.g., ensure 'sideEffects' is correctly set in package.json and exports are ESM-friendly)

Applied to files:

  • packages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{ts,tsx} : Avoid introducing circular dependencies

Applied to files:

  • packages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Update the app to consume the mobile-sdk-alpha package and replace local modules with SDK imports

Applied to files:

  • packages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/**/package.json : Verify package conditions are valid (e.g., exports conditions)

Applied to files:

  • packages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Verify extractMRZInfo() using published sample MRZ strings (e.g., ICAO examples)

Applied to files:

  • packages/mobile-sdk-alpha/src/components/index.ts
🧬 Code graph analysis (46)
packages/mobile-sdk-alpha/src/components/typography/Title.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • Title (33-33)
packages/mobile-sdk-alpha/src/utils/fonts.ts (1)
  • advercase (7-7)
packages/mobile-sdk-demo/tests/mocks/react-native.ts (1)
  • Text (31-31)
packages/mobile-sdk-alpha/src/components/typography/DescriptionTitle.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • DescriptionTitle (14-14)
packages/mobile-sdk-demo/tests/mocks/react-native.ts (1)
  • Text (31-31)
packages/mobile-sdk-alpha/src/utils/fonts.ts (1)
  • dinot (8-8)
app/src/screens/recovery/RecoverWithPhraseScreen.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate300 (37-37)
app/src/components/FeedbackModalScreen.tsx (1)
packages/mobile-sdk-alpha/src/components/typography/Title.tsx (1)
  • Title (16-36)
app/src/screens/document/DocumentNFCScanScreen.web.tsx (2)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • BodyText (6-6)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/components/typography/Description.tsx (3)
packages/mobile-sdk-demo/tests/mocks/react-native.ts (2)
  • Text (31-31)
  • StyleSheet (27-29)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate500 (43-43)
packages/mobile-sdk-alpha/src/utils/fonts.ts (1)
  • dinot (8-8)
app/src/screens/document/DocumentCameraTroubleScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • Caption (8-8)
packages/mobile-sdk-alpha/src/components/typography/Caption.tsx (1)
  • Caption (15-19)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate500 (43-43)
packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx (2)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • RoundFlag (27-27)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate300 (37-37)
app/src/screens/settings/DocumentDataInfoScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • Caption (8-8)
packages/mobile-sdk-alpha/src/components/typography/Caption.tsx (1)
  • Caption (15-19)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • black (8-8)
app/src/screens/document/aadhaar/AadhaarUploadedSuccessScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • BodyText (6-6)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • black (8-8)
  • slate500 (43-43)
app/src/components/NavBar/DocumentFlowNavBar.tsx (1)
app/src/components/NavBar/BaseNavBar.tsx (1)
  • NavBar (133-138)
packages/mobile-sdk-alpha/src/components/typography/SubHeader.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • SubHeader (31-31)
packages/mobile-sdk-demo/tests/mocks/react-native.ts (1)
  • Text (31-31)
packages/mobile-sdk-alpha/src/utils/fonts.ts (1)
  • dinot (8-8)
packages/mobile-sdk-alpha/src/components/typography/Caption.tsx (2)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate400 (39-39)
app/src/components/NavBar/AadhaarNavBar.tsx (2)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • black (8-8)
packages/mobile-sdk-alpha/src/utils/fonts.ts (1)
  • dinot (8-8)
app/src/screens/system/LaunchScreen.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate300 (37-37)
app/src/screens/document/aadhaar/AadhaarUploadErrorScreen.tsx (2)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • BodyText (6-6)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
app/src/screens/prove/ProofRequestStatusScreen.tsx (2)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • Title (33-33)
packages/mobile-sdk-alpha/src/components/typography/Title.tsx (1)
  • Title (16-36)
app/src/screens/document/aadhaar/AadhaarUploadScreen.tsx (2)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • slate500 (43-43)
  • slate400 (39-39)
packages/mobile-sdk-alpha/src/utils/fonts.ts (1)
packages/mobile-sdk-demo/tests/mocks/react-native.ts (1)
  • Platform (14-25)
app/src/components/Tips.tsx (2)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • Caption (8-8)
packages/mobile-sdk-alpha/src/components/typography/Caption.tsx (1)
  • Caption (15-19)
packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx (1)
packages/mobile-sdk-alpha/src/components/buttons/pressedStyle.tsx (1)
  • pressedStyle (5-5)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • BodyText (6-6)
packages/mobile-sdk-demo/tests/mocks/react-native.ts (1)
  • Text (31-31)
packages/mobile-sdk-alpha/src/utils/fonts.ts (1)
  • dinot (8-8)
app/src/screens/document/IDPickerScreen.tsx (4)
packages/mobile-sdk-alpha/src/utils/fonts.ts (2)
  • advercase (7-7)
  • dinot (8-8)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • BodyText (6-6)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • black (8-8)
  • slate400 (39-39)
app/src/screens/dev/CreateMockScreen.tsx (4)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • Caption (8-8)
packages/mobile-sdk-alpha/src/components/typography/Caption.tsx (1)
  • Caption (15-19)
packages/mobile-sdk-alpha/src/utils/fonts.ts (1)
  • dinot (8-8)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • zinc400 (63-63)
app/src/screens/recovery/SaveRecoveryPhraseScreen.tsx (4)
packages/mobile-sdk-alpha/src/components/index.ts (2)
  • Title (33-33)
  • Caption (8-8)
packages/mobile-sdk-alpha/src/components/typography/Title.tsx (1)
  • Title (16-36)
packages/mobile-sdk-alpha/src/components/typography/Caption.tsx (1)
  • Caption (15-19)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate400 (39-39)
app/src/components/Disclosures.tsx (2)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • BodyText (6-6)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.tsx (3)
packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.web.tsx (1)
  • HeldPrimaryButton (13-93)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • HeldPrimaryButton (16-16)
packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.shared.ts (1)
  • HeldPrimaryButtonProps (7-9)
app/src/screens/document/ConfirmBelongingScreen.tsx (2)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • Title (33-33)
packages/mobile-sdk-alpha/src/components/typography/Title.tsx (1)
  • Title (16-36)
app/src/screens/document/CountryPickerScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • black (8-8)
  • slate500 (43-43)
packages/mobile-sdk-alpha/src/utils/fonts.ts (2)
  • advercase (7-7)
  • dinot (8-8)
packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.web.tsx (3)
packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.tsx (1)
  • HeldPrimaryButton (13-95)
packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.shared.ts (3)
  • HeldPrimaryButtonProps (7-9)
  • ACTION_TIMER (13-13)
  • COLORS (15-15)
packages/mobile-sdk-alpha/src/components/buttons/PrimaryButton.tsx (1)
  • PrimaryButton (10-30)
app/src/screens/home/ProofHistoryScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • BodyText (6-6)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • black (8-8)
  • slate300 (37-37)
app/src/screens/dev/CreateMockScreenDeepLink.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • black (8-8)
app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx (2)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • Title (33-33)
packages/mobile-sdk-alpha/src/components/typography/Title.tsx (1)
  • Title (16-36)
app/src/screens/settings/SettingsScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • BodyText (6-6)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • white (59-59)
  • amber500 (7-7)
app/src/screens/home/ProofHistoryList.tsx (3)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • black (8-8)
  • slate400 (39-39)
app/src/utils/fonts.ts (1)
  • plexMono (9-10)
app/src/screens/prove/QRCodeTroubleScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • Caption (8-8)
packages/mobile-sdk-alpha/src/components/typography/Caption.tsx (1)
  • Caption (15-19)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate500 (43-43)
app/src/components/NavBar/IdDetailsNavBar.tsx (2)
app/src/components/NavBar/BaseNavBar.tsx (1)
  • NavBar (133-138)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • black (8-8)
app/src/components/NavBar/HomeNavBar.tsx (2)
app/src/components/NavBar/BaseNavBar.tsx (1)
  • NavBar (133-138)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • black (8-8)
packages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx (1)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • HeldPrimaryButtonProveScreen (18-18)
app/src/screens/system/ModalScreen.tsx (2)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • Title (33-33)
packages/mobile-sdk-alpha/src/components/typography/Title.tsx (1)
  • Title (16-36)
app/src/screens/document/DocumentNFCTroubleScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • Caption (8-8)
packages/mobile-sdk-alpha/src/components/typography/Caption.tsx (1)
  • Caption (15-19)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate500 (43-43)
app/src/screens/recovery/DocumentDataNotFoundScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • Title (33-33)
packages/mobile-sdk-alpha/src/components/typography/Title.tsx (1)
  • Title (16-36)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • white (59-59)
  • slate200 (35-35)
app/src/layouts/SimpleScrolledTitleLayout.tsx (2)
packages/mobile-sdk-alpha/src/components/buttons/SecondaryButton.tsx (1)
  • SecondaryButton (10-30)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • SecondaryButton (29-29)
app/src/screens/document/DocumentNFCScanScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (2)
  • BodyText (6-6)
  • Title (33-33)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/components/typography/Title.tsx (1)
  • Title (16-36)
app/src/screens/prove/ProveScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • BodyText (6-6)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • slate300 (37-37)
  • black (8-8)
app/src/screens/document/ComingSoonScreen.tsx (3)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • black (8-8)
  • slate500 (43-43)
packages/mobile-sdk-alpha/src/components/typography/Title.tsx (1)
  • Title (16-36)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
🪛 GitHub Actions: Mobile CI
app/src/screens/dev/CreateMockScreenDeepLink.tsx

[error] 20-20: '/Users/runner/work/self/self/packages/mobile-sdk-alpha/dist/esm/components/index.d.ts' imported multiple times import/no-duplicates

🪛 GitHub Actions: Workspace CI
packages/mobile-sdk-alpha/src/components/index.ts

[error] 1-1: License header missing or incorrect in file. Run 'yarn lint --fix' or update header to satisfy license checks.

🪛 GitHub Check: build-deps
app/src/screens/document/DocumentNFCScanScreen.web.tsx

[failure] 15-15:
'/Users/runner/work/self/self/packages/mobile-sdk-alpha/dist/esm/components/index.d.ts' imported multiple times

app/src/screens/document/DocumentNFCMethodSelectionScreen.tsx

[failure] 18-18:
'/Users/runner/work/self/self/packages/mobile-sdk-alpha/dist/esm/components/index.d.ts' imported multiple times


[failure] 16-16:
'/Users/runner/work/self/self/packages/mobile-sdk-alpha/dist/esm/components/index.d.ts' imported multiple times

app/src/screens/dev/CreateMockScreenDeepLink.tsx

[failure] 22-22:
'/Users/runner/work/self/self/packages/mobile-sdk-alpha/dist/esm/components/index.d.ts' imported multiple times


[failure] 20-20:
'/Users/runner/work/self/self/packages/mobile-sdk-alpha/dist/esm/components/index.d.ts' imported multiple times

app/src/screens/document/DocumentNFCScanScreen.tsx

[failure] 44-44:
'/Users/runner/work/self/self/packages/mobile-sdk-alpha/dist/esm/components/index.d.ts' imported multiple times


[failure] 42-42:
'/Users/runner/work/self/self/packages/mobile-sdk-alpha/dist/esm/components/index.d.ts' imported multiple times

app/src/screens/document/ComingSoonScreen.tsx

[failure] 23-23:
'/Users/runner/work/self/self/packages/mobile-sdk-alpha/dist/esm/components/index.d.ts' imported multiple times


[failure] 21-21:
'/Users/runner/work/self/self/packages/mobile-sdk-alpha/dist/esm/components/index.d.ts' imported multiple times


[failure] 19-19:
'/Users/runner/work/self/self/packages/mobile-sdk-alpha/dist/esm/components/index.d.ts' imported multiple times

⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: e2e-ios
  • GitHub Check: android-build-test
  • GitHub Check: analyze-ios
  • GitHub Check: analyze-android

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
packages/mobile-sdk-alpha/src/components/index.ts (1)

24-26: Remove duplicate SPDX header.

The duplicate SPDX license header at lines 24-26 will cause license lint failures. The header should only appear once at the top of the file (lines 1-3).

Apply this diff to remove the duplicate header:

 export { HeldPrimaryButtonProveScreen } from './buttons/HeldPrimaryButtonProveScreen';
 
-// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc.
-// SPDX-License-Identifier: BUSL-1.1
-// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE.
 export { MRZScannerView } from './MRZScannerView';
 // Button components
🧹 Nitpick comments (2)
app/src/screens/system/ModalScreen.tsx (1)

118-123: Consider removing unnecessary type casts or updating the interface.

Lines 119 and 122 cast params?.titleText and params?.bodyText to React.ReactNode, but the ModalParams interface (line 44-45) declares both as string. This creates a type mismatch:

  1. If these fields should accept only strings, remove the casts (they're unnecessary).
  2. If they should accept ReactNode elements, update the interface: titleText: React.ReactNode; and bodyText: React.ReactNode;.

The current approach undermines TypeScript's type safety guarantees.

Apply this diff to remove unnecessary casts (if strings are sufficient):

-            <Title style={{ textAlign: 'left' }}>
-              {params?.titleText as React.ReactNode}
-            </Title>
+            <Title style={{ textAlign: 'left' }}>
+              {params?.titleText}
+            </Title>
             <Description style={{ textAlign: 'left' }}>
-              {params?.bodyText as React.ReactNode}
+              {params?.bodyText}
             </Description>

Or update the interface if ReactNode is needed:

 export interface ModalParams extends Record<string, unknown> {
-  titleText: string;
-  bodyText: string;
+  titleText: React.ReactNode;
+  bodyText: React.ReactNode;
   buttonText: React.ReactNode;
app/src/screens/document/CountryPickerScreen.tsx (1)

47-47: Consider extracting inline styles to StyleSheet.

Multiple inline style objects are defined throughout the component (lines 47, 128, 131, 143-149, 160-167). For better performance, consider extracting repeated or complex styles to a StyleSheet:

  • Inline objects are recreated on every render
  • StyleSheet.create() pre-compiles styles and provides better performance in React Native
  • Shared styles (e.g., the repeated "SUGGESTION" and "SELECT AN ISSUING COUNTRY" styles) could be unified

Example refactor:

+const styles = StyleSheet.create({
+  countryName: {
+    fontSize: 16,
+    color: black,
+    flex: 1,
+  },
+  title: {
+    fontSize: 29,
+    fontFamily: advercase,
+  },
+  subtitle: {
+    fontSize: 16,
+    color: slate500,
+    marginTop: 20,
+  },
+  sectionHeader: {
+    fontSize: 16,
+    color: black,
+    fontFamily: dinot,
+    letterSpacing: 0.8,
+  },
+});

Then use: <BodyText style={styles.countryName}>, etc.

Also applies to: 128-131, 143-149, 160-167

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 11ba15c and e02e67f.

📒 Files selected for processing (39)
  • app/src/components/Disclosures.tsx (2 hunks)
  • app/src/components/FeedbackModal.tsx (1 hunks)
  • app/src/components/NavBar/BaseNavBar.tsx (1 hunks)
  • app/src/components/Tips.tsx (2 hunks)
  • app/src/layouts/SimpleScrolledTitleLayout.tsx (2 hunks)
  • app/src/screens/dev/CreateMockScreen.tsx (2 hunks)
  • app/src/screens/dev/CreateMockScreenDeepLink.tsx (2 hunks)
  • app/src/screens/document/ComingSoonScreen.tsx (2 hunks)
  • app/src/screens/document/ConfirmBelongingScreen.tsx (2 hunks)
  • app/src/screens/document/CountryPickerScreen.tsx (5 hunks)
  • app/src/screens/document/DocumentCameraScreen.tsx (1 hunks)
  • app/src/screens/document/DocumentCameraTroubleScreen.tsx (2 hunks)
  • app/src/screens/document/DocumentNFCMethodSelectionScreen.tsx (2 hunks)
  • app/src/screens/document/DocumentNFCScanScreen.tsx (3 hunks)
  • app/src/screens/document/DocumentNFCScanScreen.web.tsx (2 hunks)
  • app/src/screens/document/DocumentNFCTroubleScreen.tsx (3 hunks)
  • app/src/screens/document/DocumentOnboardingScreen.tsx (1 hunks)
  • app/src/screens/document/IDPickerScreen.tsx (3 hunks)
  • app/src/screens/document/aadhaar/AadhaarUploadErrorScreen.tsx (2 hunks)
  • app/src/screens/document/aadhaar/AadhaarUploadScreen.tsx (2 hunks)
  • app/src/screens/document/aadhaar/AadhaarUploadedSuccessScreen.tsx (2 hunks)
  • app/src/screens/home/DisclaimerScreen.tsx (1 hunks)
  • app/src/screens/home/ProofHistoryList.tsx (2 hunks)
  • app/src/screens/home/ProofHistoryScreen.tsx (2 hunks)
  • app/src/screens/prove/ProofRequestStatusScreen.tsx (2 hunks)
  • app/src/screens/prove/ProveScreen.tsx (8 hunks)
  • app/src/screens/prove/QRCodeTroubleScreen.tsx (2 hunks)
  • app/src/screens/prove/QRCodeViewFinderScreen.tsx (1 hunks)
  • app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx (1 hunks)
  • app/src/screens/recovery/AccountRecoveryScreen.tsx (1 hunks)
  • app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx (2 hunks)
  • app/src/screens/recovery/DocumentDataNotFoundScreen.tsx (2 hunks)
  • app/src/screens/recovery/SaveRecoveryPhraseScreen.tsx (3 hunks)
  • app/src/screens/settings/DocumentDataInfoScreen.tsx (2 hunks)
  • app/src/screens/settings/SettingsScreen.tsx (3 hunks)
  • app/src/screens/system/DeferredLinkingInfoScreen.tsx (1 hunks)
  • app/src/screens/system/LaunchScreen.tsx (2 hunks)
  • app/src/screens/system/ModalScreen.tsx (2 hunks)
  • packages/mobile-sdk-alpha/src/components/index.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (23)
  • app/src/screens/prove/QRCodeTroubleScreen.tsx
  • app/src/screens/dev/CreateMockScreenDeepLink.tsx
  • app/src/screens/document/aadhaar/AadhaarUploadErrorScreen.tsx
  • app/src/components/FeedbackModal.tsx
  • app/src/screens/recovery/AccountRecoveryScreen.tsx
  • app/src/screens/document/DocumentCameraTroubleScreen.tsx
  • app/src/screens/prove/ProofRequestStatusScreen.tsx
  • app/src/screens/settings/DocumentDataInfoScreen.tsx
  • app/src/screens/dev/CreateMockScreen.tsx
  • app/src/components/Disclosures.tsx
  • app/src/screens/document/ComingSoonScreen.tsx
  • app/src/layouts/SimpleScrolledTitleLayout.tsx
  • app/src/screens/system/LaunchScreen.tsx
  • app/src/screens/home/ProofHistoryList.tsx
  • app/src/screens/recovery/DocumentDataNotFoundScreen.tsx
  • app/src/screens/document/ConfirmBelongingScreen.tsx
  • app/src/screens/document/aadhaar/AadhaarUploadedSuccessScreen.tsx
  • app/src/screens/settings/SettingsScreen.tsx
  • app/src/screens/document/DocumentNFCMethodSelectionScreen.tsx
  • app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx
  • app/src/screens/document/DocumentNFCTroubleScreen.tsx
  • app/src/screens/recovery/SaveRecoveryPhraseScreen.tsx
  • app/src/screens/document/IDPickerScreen.tsx
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{js,ts,tsx,jsx,sol,nr}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{js,ts,tsx,jsx,sol,nr}: NEVER log sensitive data including PII (names, DOB, passport numbers, addresses), credentials, tokens, API keys, private keys, or session identifiers.
ALWAYS redact/mask sensitive fields in logs using consistent patterns (e.g., ***-***-1234 for passport numbers, J*** D*** for names).

Files:

  • app/src/screens/prove/QRCodeViewFinderScreen.tsx
  • app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx
  • app/src/screens/system/DeferredLinkingInfoScreen.tsx
  • app/src/screens/document/aadhaar/AadhaarUploadScreen.tsx
  • packages/mobile-sdk-alpha/src/components/index.ts
  • app/src/screens/document/DocumentCameraScreen.tsx
  • app/src/screens/document/DocumentNFCScanScreen.web.tsx
  • app/src/screens/home/DisclaimerScreen.tsx
  • app/src/components/Tips.tsx
  • app/src/screens/document/DocumentOnboardingScreen.tsx
  • app/src/components/NavBar/BaseNavBar.tsx
  • app/src/screens/document/CountryPickerScreen.tsx
  • app/src/screens/document/DocumentNFCScanScreen.tsx
  • app/src/screens/system/ModalScreen.tsx
  • app/src/screens/home/ProofHistoryScreen.tsx
  • app/src/screens/prove/ProveScreen.tsx
app/**/*.{ts,tsx}

📄 CodeRabbit inference engine (app/AGENTS.md)

Type checking must pass before PRs (yarn types)

Files:

  • app/src/screens/prove/QRCodeViewFinderScreen.tsx
  • app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx
  • app/src/screens/system/DeferredLinkingInfoScreen.tsx
  • app/src/screens/document/aadhaar/AadhaarUploadScreen.tsx
  • app/src/screens/document/DocumentCameraScreen.tsx
  • app/src/screens/document/DocumentNFCScanScreen.web.tsx
  • app/src/screens/home/DisclaimerScreen.tsx
  • app/src/components/Tips.tsx
  • app/src/screens/document/DocumentOnboardingScreen.tsx
  • app/src/components/NavBar/BaseNavBar.tsx
  • app/src/screens/document/CountryPickerScreen.tsx
  • app/src/screens/document/DocumentNFCScanScreen.tsx
  • app/src/screens/system/ModalScreen.tsx
  • app/src/screens/home/ProofHistoryScreen.tsx
  • app/src/screens/prove/ProveScreen.tsx
app/src/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

app/src/**/*.{ts,tsx,js,jsx}: Review React Native TypeScript code for:

  • Component architecture and reusability
  • State management patterns
  • Performance optimizations
  • TypeScript type safety
  • React hooks usage and dependencies
  • Navigation patterns

Files:

  • app/src/screens/prove/QRCodeViewFinderScreen.tsx
  • app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx
  • app/src/screens/system/DeferredLinkingInfoScreen.tsx
  • app/src/screens/document/aadhaar/AadhaarUploadScreen.tsx
  • app/src/screens/document/DocumentCameraScreen.tsx
  • app/src/screens/document/DocumentNFCScanScreen.web.tsx
  • app/src/screens/home/DisclaimerScreen.tsx
  • app/src/components/Tips.tsx
  • app/src/screens/document/DocumentOnboardingScreen.tsx
  • app/src/components/NavBar/BaseNavBar.tsx
  • app/src/screens/document/CountryPickerScreen.tsx
  • app/src/screens/document/DocumentNFCScanScreen.tsx
  • app/src/screens/system/ModalScreen.tsx
  • app/src/screens/home/ProofHistoryScreen.tsx
  • app/src/screens/prove/ProveScreen.tsx
packages/mobile-sdk-alpha/**/*.{ts,tsx}

📄 CodeRabbit inference engine (packages/mobile-sdk-alpha/AGENTS.md)

packages/mobile-sdk-alpha/**/*.{ts,tsx}: Use strict TypeScript type checking across the codebase
Follow ESLint TypeScript-specific rules
Avoid introducing circular dependencies

Files:

  • packages/mobile-sdk-alpha/src/components/index.ts
packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}: Review alpha mobile SDK code for:

  • API consistency with core SDK
  • Platform-neutral abstractions
  • Performance considerations
  • Clear experimental notes or TODOs

Files:

  • packages/mobile-sdk-alpha/src/components/index.ts
app/**/*.{ios,android,web}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (app/AGENTS.md)

Explain platform-specific code paths in the PR description (files with .ios, .android, or .web extensions)

Files:

  • app/src/screens/document/DocumentNFCScanScreen.web.tsx
🧠 Learnings (9)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Update the app to consume the mobile-sdk-alpha package and replace local modules with SDK imports
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/index.ts : Re-export new SDK modules via packages/mobile-sdk-alpha/src/index.ts
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/README.md : Document new/updated SDK modules and usage in packages/mobile-sdk-alpha/README.md
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests

Applied to files:

  • app/src/screens/prove/QRCodeViewFinderScreen.tsx
  • app/src/screens/system/DeferredLinkingInfoScreen.tsx
  • app/src/screens/document/DocumentCameraScreen.tsx
  • app/src/screens/document/DocumentNFCScanScreen.web.tsx
  • app/src/screens/home/DisclaimerScreen.tsx
  • app/src/screens/document/DocumentOnboardingScreen.tsx
  • app/src/screens/document/CountryPickerScreen.tsx
📚 Learning: 2025-08-26T14:49:11.190Z
Learnt from: shazarre
PR: selfxyz/self#936
File: app/src/screens/passport/PassportNFCScanScreen.tsx:28-31
Timestamp: 2025-08-26T14:49:11.190Z
Learning: SelfClientProvider is wrapped in app/App.tsx, providing context for useSelfClient() hook usage throughout the React Native app navigation stacks.

Applied to files:

  • app/src/screens/document/aadhaar/AadhaarUploadScreen.tsx
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/index.ts : Re-export new SDK modules via packages/mobile-sdk-alpha/src/index.ts

Applied to files:

  • packages/mobile-sdk-alpha/src/components/index.ts
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Verify extractMRZInfo() using published sample MRZ strings (e.g., ICAO examples)

Applied to files:

  • packages/mobile-sdk-alpha/src/components/index.ts
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{ts,tsx} : Avoid introducing circular dependencies

Applied to files:

  • app/src/screens/document/DocumentNFCScanScreen.web.tsx
📚 Learning: 2025-08-25T14:25:57.586Z
Learnt from: aaronmgdr
PR: selfxyz/self#951
File: app/src/providers/authProvider.web.tsx:17-18
Timestamp: 2025-08-25T14:25:57.586Z
Learning: The selfxyz/mobile-sdk-alpha/constants/analytics import path is properly configured with SDK exports, Metro aliases, and TypeScript resolution. Import changes from @/consts/analytics to this path are part of valid analytics migration, not TypeScript resolution issues.

Applied to files:

  • app/src/screens/document/DocumentNFCScanScreen.web.tsx
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Test isPassportDataValid() with realistic synthetic passport data (never real user data)

Applied to files:

  • app/src/screens/document/DocumentNFCScanScreen.tsx
📚 Learning: 2025-09-22T11:10:22.019Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-09-22T11:10:22.019Z
Learning: Applies to src/**/*.{js,ts,tsx,jsx} : Use `react-navigation/native` with `createStaticNavigation` for type-safe navigation in React Native.

Applied to files:

  • app/src/screens/system/ModalScreen.tsx
🧬 Code graph analysis (8)
app/src/screens/document/aadhaar/AadhaarUploadScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • BodyText (10-10)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • slate500 (43-43)
  • slate400 (39-39)
app/src/screens/document/DocumentNFCScanScreen.web.tsx (2)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • BodyText (10-10)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
app/src/components/Tips.tsx (2)
packages/mobile-sdk-alpha/src/components/typography/Caption.tsx (1)
  • Caption (15-19)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate500 (43-43)
app/src/screens/document/CountryPickerScreen.tsx (4)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • BodyText (10-10)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • black (8-8)
  • slate500 (43-43)
packages/mobile-sdk-alpha/src/utils/fonts.ts (2)
  • advercase (7-7)
  • dinot (8-8)
app/src/screens/document/DocumentNFCScanScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (2)
  • BodyText (10-10)
  • Title (37-37)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/components/typography/Title.tsx (1)
  • Title (16-36)
app/src/screens/system/ModalScreen.tsx (2)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • Title (37-37)
packages/mobile-sdk-alpha/src/components/typography/Title.tsx (1)
  • Title (16-36)
app/src/screens/home/ProofHistoryScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • BodyText (10-10)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • black (8-8)
  • slate300 (37-37)
app/src/screens/prove/ProveScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • BodyText (10-10)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • slate300 (37-37)
  • black (8-8)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: build-deps
  • GitHub Check: e2e-ios
  • GitHub Check: analyze-ios
  • GitHub Check: analyze-android
🔇 Additional comments (14)
app/src/screens/document/DocumentNFCScanScreen.web.tsx (1)

12-16: LGTM!

The import consolidation from @selfxyz/mobile-sdk-alpha/components is correct and aligns with the SDK migration pattern across the codebase.

app/src/components/Tips.tsx (2)

8-9: LGTM!

The Caption import has been successfully migrated to the SDK package, aligning with the project-wide component consolidation.


43-43: LGTM!

The migration from size/color props to an inline style object is consistent with the SDK component API changes. The styling remains functionally equivalent.

app/src/screens/prove/QRCodeViewFinderScreen.tsx (1)

16-20: LGTM!

The typography component imports have been successfully consolidated from the SDK package, maintaining consistency with the broader migration effort.

app/src/screens/document/DocumentOnboardingScreen.tsx (1)

11-17: LGTM!

The component imports have been properly migrated to the SDK package, consistent with the project-wide refactoring.

app/src/screens/document/CountryPickerScreen.tsx (1)

15-15: LGTM!

The component imports have been successfully migrated to the SDK package.

app/src/screens/home/DisclaimerScreen.tsx (1)

10-14: LGTM!

The component imports have been properly consolidated from the SDK package, consistent with the migration pattern across the codebase.

app/src/screens/document/DocumentCameraScreen.tsx (1)

14-19: LGTM!

The import consolidation from local paths to the centralized SDK components is clean and maintains type compatibility. No behavioral changes detected.

app/src/components/NavBar/BaseNavBar.tsx (1)

6-6: LGTM!

The type realignment from Tamagui's TextProps to React Native's TextProps is appropriate for the Tamagui removal effort. The Title component from the SDK should work correctly with the standard RN text props.

Also applies to: 13-13, 29-29

app/src/screens/system/DeferredLinkingInfoScreen.tsx (1)

9-13: LGTM!

Clean import consolidation to the SDK components barrel. No behavioral changes detected.

app/src/screens/document/aadhaar/AadhaarUploadScreen.tsx (1)

12-12: LGTM!

The import migration and style object consolidation maintain visual equivalence. The styling changes from individual props to consolidated style objects are consistent with the broader pattern in this PR.

Also applies to: 170-189

app/src/screens/document/DocumentNFCScanScreen.tsx (1)

38-43: LGTM!

The import migration and style refactoring are clean. The use of style arrays for composition (e.g., style={[styles.title, { marginTop: 8 }]}) follows React Native best practices for merging base and dynamic styles.

Also applies to: 554-607

app/src/screens/prove/ProveScreen.tsx (1)

26-30: LGTM!

The extensive style consolidation maintains visual equivalence throughout. The conditional styling logic for fontFamily and flexWrap (lines 307-311) is preserved correctly in the style object format.

Also applies to: 240-384

packages/mobile-sdk-alpha/src/components/index.ts (1)

5-41: Validate barrel exports and test coverage.

  • All exports in packages/mobile-sdk-alpha/src/components/index.ts resolve to existing files and named exports.
  • Ensure each newly exposed component has corresponding unit or integration tests in the SDK.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/mobile-sdk-alpha/package.json (1)

104-104: Switch prepublishOnly script to Yarn commands

prepublishOnly still shells out through npm run …, which violates our repo rule to use Yarn exclusively in scripts and risks picking up the wrong toolchain. Please rewrite it to call the Yarn equivalents directly.

Apply this diff:

-    "prepublishOnly": "npm run build && npm run typecheck && npm run validate:exports && npm run validate:pkg",
+    "prepublishOnly": "yarn build && yarn typecheck && yarn validate:exports && yarn validate:pkg",
packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx (1)

25-50: Unsafe type casting bypasses TypeScript safety.

Line 50 uses a double type assertion (as unknown as CountryFlagsRecord) to force the CountryFlags module into the expected record type. This pattern bypasses TypeScript's type checking and could lead to runtime errors if the module structure doesn't match the expected interface.

Additionally, passing CountryFlags as a parameter (lines 25, 33) when it's already imported at module scope seems unnecessary and adds complexity.

Consider these alternatives:

Option 1 (Recommended): Remove the parameter and access CountryFlags directly from the module scope:

-const findFlagComponent = (CountryFlags: CountryFlagsRecord, formattedCode: string) => {
+const findFlagComponent = (formattedCode: string) => {
   const patterns = [
     formattedCode,
     formattedCode.toLowerCase(),
     formattedCode.charAt(0).toUpperCase() + formattedCode.charAt(1).toLowerCase(),
   ];
 
   for (const pattern of patterns) {
-    const component = CountryFlags[pattern];
+    const component = (CountryFlags as Record<string, CountryFlagComponent>)[pattern];
     if (component) {
       return component;
     }
   }
   return null;
 };
 
 const getCountryFlag = (countryCode: string): CountryFlagComponent | null => {
   try {
     const normalizedCountryCode = countryCode === 'D<<' ? 'DEU' : countryCode;
     const iso2 = alpha3ToAlpha2(normalizedCountryCode);
     if (!iso2) {
       return null;
     }
 
     const formattedCode = iso2.toUpperCase();
-    return findFlagComponent(CountryFlags as unknown as CountryFlagsRecord, formattedCode);
+    return findFlagComponent(formattedCode);
   } catch (error) {

Option 2: If the parameter pattern is intentional for testability, properly type the import:

Create a type definition for the react-native-svg-circle-country-flags module in a .d.ts file, or use proper typing at the import level to avoid the unsafe cast.

As per coding guidelines for mobile-sdk-alpha: Use strict TypeScript type checking.

🧹 Nitpick comments (2)
app/src/screens/prove/QRCodeTroubleScreen.tsx (1)

14-14: Consider importing slate500 from SDK for consistency.

While the Caption component is now sourced from @selfxyz/mobile-sdk-alpha/components, the slate500 color constant is still imported from local utils. Since the SDK also exports slate500 in its constants (as shown in packages/mobile-sdk-alpha/src/constants/colors.ts), importing the color from the SDK would ensure consistency and prevent potential color divergence as the SDK evolves.

Apply this diff to import slate500 from the SDK:

-import { slate500 } from '@/utils/colors';
+import { slate500 } from '@selfxyz/mobile-sdk-alpha/constants';

Also applies to: 59-59

app/src/components/Tips.tsx (1)

10-10: Consider importing color from the SDK for consistency.

The slate500 constant is imported from local utils, but it's also available in the SDK (@selfxyz/mobile-sdk-alpha/constants). For consistency with the component migration to the SDK, consider using the SDK's color constants.

Apply this diff:

-import { slate500 } from '@/utils/colors';
+import { slate500 } from '@selfxyz/mobile-sdk-alpha/constants';
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e02e67f and 4a44ad1.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (11)
  • app/package.json (0 hunks)
  • app/src/components/Tips.tsx (2 hunks)
  • app/src/screens/document/DocumentCameraTroubleScreen.tsx (2 hunks)
  • app/src/screens/document/DocumentNFCTroubleScreen.tsx (3 hunks)
  • app/src/screens/home/ProofHistoryScreen.tsx (2 hunks)
  • app/src/screens/prove/ProofRequestStatusScreen.tsx (1 hunks)
  • app/src/screens/prove/QRCodeTroubleScreen.tsx (2 hunks)
  • app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx (1 hunks)
  • packages/mobile-sdk-alpha/package.json (2 hunks)
  • packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx (4 hunks)
  • packages/mobile-sdk-alpha/src/components/index.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • app/package.json
🚧 Files skipped from review as they are similar to previous changes (4)
  • app/src/screens/document/DocumentNFCTroubleScreen.tsx
  • app/src/screens/document/DocumentCameraTroubleScreen.tsx
  • packages/mobile-sdk-alpha/src/components/index.ts
  • app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{js,ts,tsx,jsx,sol,nr}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{js,ts,tsx,jsx,sol,nr}: NEVER log sensitive data including PII (names, DOB, passport numbers, addresses), credentials, tokens, API keys, private keys, or session identifiers.
ALWAYS redact/mask sensitive fields in logs using consistent patterns (e.g., ***-***-1234 for passport numbers, J*** D*** for names).

Files:

  • app/src/screens/prove/ProofRequestStatusScreen.tsx
  • packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx
  • app/src/components/Tips.tsx
  • app/src/screens/prove/QRCodeTroubleScreen.tsx
  • app/src/screens/home/ProofHistoryScreen.tsx
app/**/*.{ts,tsx}

📄 CodeRabbit inference engine (app/AGENTS.md)

Type checking must pass before PRs (yarn types)

Files:

  • app/src/screens/prove/ProofRequestStatusScreen.tsx
  • app/src/components/Tips.tsx
  • app/src/screens/prove/QRCodeTroubleScreen.tsx
  • app/src/screens/home/ProofHistoryScreen.tsx
app/src/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

app/src/**/*.{ts,tsx,js,jsx}: Review React Native TypeScript code for:

  • Component architecture and reusability
  • State management patterns
  • Performance optimizations
  • TypeScript type safety
  • React hooks usage and dependencies
  • Navigation patterns

Files:

  • app/src/screens/prove/ProofRequestStatusScreen.tsx
  • app/src/components/Tips.tsx
  • app/src/screens/prove/QRCodeTroubleScreen.tsx
  • app/src/screens/home/ProofHistoryScreen.tsx
packages/mobile-sdk-alpha/package.json

📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)

packages/mobile-sdk-alpha/package.json: Expose a 'test:build' script in the SDK's package.json that runs build, test, types, and lint
Enable tree shaking for the SDK (e.g., ensure 'sideEffects' is correctly set in package.json and exports are ESM-friendly)

Files:

  • packages/mobile-sdk-alpha/package.json
packages/mobile-sdk-alpha/**/package.json

📄 CodeRabbit inference engine (packages/mobile-sdk-alpha/AGENTS.md)

packages/mobile-sdk-alpha/**/package.json: Ensure package exports are properly configured
Verify package conditions are valid (e.g., exports conditions)

Files:

  • packages/mobile-sdk-alpha/package.json
**/package.json

📄 CodeRabbit inference engine (AGENTS.md)

Use Yarn only for package management (yarn install/add/remove); do not use npm or pnpm in scripts

Files:

  • packages/mobile-sdk-alpha/package.json
packages/mobile-sdk-alpha/**/*.{ts,tsx}

📄 CodeRabbit inference engine (packages/mobile-sdk-alpha/AGENTS.md)

packages/mobile-sdk-alpha/**/*.{ts,tsx}: Use strict TypeScript type checking across the codebase
Follow ESLint TypeScript-specific rules
Avoid introducing circular dependencies

Files:

  • packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx
packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}: Review alpha mobile SDK code for:

  • API consistency with core SDK
  • Platform-neutral abstractions
  • Performance considerations
  • Clear experimental notes or TODOs

Files:

  • packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Update the app to consume the mobile-sdk-alpha package and replace local modules with SDK imports
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/README.md : Document new/updated SDK modules and usage in packages/mobile-sdk-alpha/README.md
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{ts,tsx} : Avoid introducing circular dependencies

Applied to files:

  • packages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/**/package.json : Ensure package exports are properly configured

Applied to files:

  • packages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/package.json : Enable tree shaking for the SDK (e.g., ensure 'sideEffects' is correctly set in package.json and exports are ESM-friendly)

Applied to files:

  • packages/mobile-sdk-alpha/package.json
🧬 Code graph analysis (3)
app/src/components/Tips.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • Caption (12-12)
packages/mobile-sdk-alpha/src/components/typography/Caption.tsx (1)
  • Caption (15-19)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate500 (43-43)
app/src/screens/prove/QRCodeTroubleScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • Caption (12-12)
packages/mobile-sdk-alpha/src/components/typography/Caption.tsx (1)
  • Caption (15-19)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate500 (43-43)
app/src/screens/home/ProofHistoryScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • BodyText (10-10)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • black (8-8)
  • slate300 (37-37)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: build-deps
  • GitHub Check: analyze-android
  • GitHub Check: analyze-ios
  • GitHub Check: e2e-ios
🔇 Additional comments (6)
app/src/screens/prove/QRCodeTroubleScreen.tsx (1)

7-8: LGTM! Import successfully migrated to SDK.

The Caption component import from @selfxyz/mobile-sdk-alpha aligns with the PR objective to consolidate UI components in the SDK and remove Tamagui dependencies.

app/src/components/Tips.tsx (1)

8-8: LGTM on SDK import and style usage.

The Caption import from the SDK and the inline style prop usage correctly align with the migration objectives.

Also applies to: 43-43

app/src/screens/home/ProofHistoryScreen.tsx (1)

17-18: LGTM! Migration to SDK component completed correctly.

The changes successfully migrate BodyText to the SDK package and consolidate style props appropriately. The gap property flagged in the previous review has been removed from line 244, which is correct since BodyText wraps React Native's Text component that doesn't support layout properties like gap.

All style properties (fontSize, color, fontWeight) are valid for Text components and the visual styling is preserved.

Also applies to: 239-241, 244-246

packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx (2)

11-11: LGTM: Import path updated for SDK structure.

The relative import path correctly reflects the component's migration to the SDK package structure.


66-66: LGTM: Rounded flag placeholder.

The borderRadius: size / 2 creates a circular placeholder, consistent with the component's "RoundFlag" naming.

app/src/screens/prove/ProofRequestStatusScreen.tsx (1)

13-19: Approve import migration—exports verified. All required components (BodyText, Description, PrimaryButton, Title, typography) are properly exported from @selfxyz/mobile-sdk-alpha/components.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (10)
packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx (1)

5-11: Fix ESLint error: use import type for type-only imports.

The pipeline reports that all imports in the declaration on line 5 are only used as types. GestureResponderEvent, LayoutChangeEvent, PressableProps, and ViewStyle are used exclusively as type annotations and should be imported with import type.

Apply this diff:

-import type {
+import {
+  Platform,
+  Pressable,
+  StyleSheet,
+  Text,
+} from 'react-native';
+import type {
   GestureResponderEvent,
   LayoutChangeEvent,
   PressableProps,
   ViewStyle,
 } from 'react-native';
-import { Platform, Pressable, StyleSheet, Text } from 'react-native';
app/src/screens/account/settings/CloudBackupScreen.tsx (1)

6-6: Remove all remaining Tamagui imports

  • Numerous files still import components (YStack, XStack, View, Spinner, etc.) from ‘tamagui’ (e.g. DisclaimerScreen.tsx, ComingSoonScreen.tsx, RecoverWithPhraseScreen.tsx, ProveScreen.tsx, CloudBackupScreen.tsx, and many more). Replace these with the SDK’s stack/view primitives or React Native built-ins to fully eliminate the Tamagui dependency.
app/src/screens/documents/aadhaar/AadhaarUploadErrorScreen.tsx (1)

6-6: Remove all remaining Tamagui imports
Multiple files across screens, components, and layouts still import from ‘tamagui’. Replace these with React Native primitives or SDK components to complete the PR objective.

packages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsx (2)

21-42: Critical: Hardcoded sessionId and missing useCallback dependency.

Three issues in this callback:

  1. Line 29: The hardcoded sessionId: '123' is a critical security and correctness issue. Each NFC scan must have a unique session identifier to prevent replay attacks and ensure proper audit trails for passport verification.

  2. Line 41: The useCallback dependency array is missing mrzData. Since mrzData is captured in the closure and used on lines 26-28, omitting it can lead to stale closure bugs where the callback uses outdated MRZ data.

  3. Line 22: Using _nfcData: any defeats strict TypeScript checking required by the coding guidelines. Define a proper type for NFC scan input.

Apply this diff to address the sessionId and dependency issues:

+import { v4 as uuidv4 } from 'uuid'; // or use crypto.randomUUID() if available
+
 const onNFCScan = useCallback(
   async (_nfcData: any) => {
     try {
       // scan the document
       const scanResult = await client.scanNFC({
         passportNumber: mrzData.documentNumber,
         dateOfBirth: mrzData.dateOfBirth,
         dateOfExpiry: mrzData.dateOfExpiry,
-        sessionId: '123', // TODO: generate a unique session id
+        sessionId: uuidv4(),
       });

       const skiPem = await getSKIPEM('production');
       const _parsedPassportData = initPassportDataParsing((scanResult as NFCScanResult).passportData, skiPem);

       // register the document
       onSuccess();
     } catch (error) {
       onFailure(error as Error);
     }
   },
-  [client, onSuccess, onFailure],
+  [client, mrzData, onSuccess, onFailure],
 );

For the any type, define a proper NFC data interface or use unknown with type guards.

As per coding guidelines.


32-32: Parameterize getSKIPEM environment instead of hardcoding
Replace the hardcoded 'production' in getSKIPEM at packages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsx:32 with a value derived from your app’s configuration or client context to match other environment‐based calls.

app/src/screens/documents/management/DocumentDataInfoScreen.tsx (1)

7-7: Migrate remaining Tamagui layout imports
The SDK doesn’t export XStack, YStack, ScrollView or Separator, yet many screens under app/src/screens (e.g. DocumentDataInfoScreen, ManageDocumentsScreen, QRCodeViewFinderScreen) still import these from Tamagui. Replace all remaining Tamagui layout component imports with SDK or React Native equivalents.

app/src/screens/documents/aadhaar/AadhaarUploadedSuccessScreen.tsx (2)

17-17: Use SDK color constants instead of local imports.

Based on relevant snippets, the SDK exports black and slate500 at packages/mobile-sdk-alpha/src/constants/colors.ts. Importing colors from local utils defeats the purpose of centralizing components in the SDK.

Apply this diff:

-import { black, slate100, slate200, slate500, white } from '@/utils/colors';
+import { black, slate100, slate200, slate500, white } from '@selfxyz/mobile-sdk-alpha/constants/colors';

6-6: Replace YStack import with SDK layout primitives

Importing YStack from ‘tamagui’ contradicts the PR’s Tamagui removal goal—the mobile SDK doesn’t export stack primitives. Remove this import and use the SDK’s layout component (or a native View) instead.

app/src/screens/documents/aadhaar/AadhaarUploadScreen.tsx (1)

21-21: Use SDK color constants instead of local imports.

Based on relevant snippets, the SDK exports slate400 and slate500 at packages/mobile-sdk-alpha/src/constants/colors.ts. Align with the SDK architecture by importing colors from the centralized location.

Apply this diff:

-import { slate100, slate200, slate400, slate500, white } from '@/utils/colors';
+import { slate100, slate200, slate400, slate500, white } from '@selfxyz/mobile-sdk-alpha/constants/colors';
app/src/screens/onboarding/DisclaimerScreen.tsx (1)

7-7: Replace Tamagui YStack with SDK layout component

  • In DisclaimerScreen.tsx (lines 7, 46, 51), swap out YStack from 'tamagui' for the corresponding layout component in @selfxyz/mobile-sdk-alpha/components; ensure it supports your style props or adjust usage.
♻️ Duplicate comments (2)
app/src/screens/account/recovery/RecoverWithPhraseScreen.tsx (1)

120-120: Style prop usage is consistent.

The Description component correctly uses the style prop pattern seen across other migrated files. The same consideration regarding local vs SDK color constants applies here as mentioned in DocumentDataNotFoundScreen.tsx.

app/src/screens/documents/aadhaar/AadhaarUploadScreen.tsx (1)

8-8: Incomplete Tamagui removal.

Similar to AadhaarUploadedSuccessScreen.tsx, this file still imports YStack, XStack, and Image from Tamagui while the PR claims to remove Tamagui as a dependency. This creates inconsistent component sourcing.

🧹 Nitpick comments (17)
app/src/screens/documents/selection/ConfirmBelongingScreen.tsx (1)

149-150: LGTM! Style props correctly updated.

The migration from Tamagui-specific props to standard React Native style props is correct and functional.

Optional optimization: Consider extracting these style objects to module-level constants to avoid recreating them on every render:

+const centerTextStyle = { textAlign: 'center' as const };
+const descriptionStyle = { textAlign: 'center' as const, paddingBottom: 20 };
+
 const ConfirmBelongingScreen: React.FC<ConfirmBelongingScreenProps> = () => {
   // ...
   return (
     <>
       <ExpandableBottomLayout.Layout backgroundColor={black}>
         {/* ... */}
         <ExpandableBottomLayout.BottomSection
           gap={20}
           paddingBottom={20}
           backgroundColor={white}
         >
-          <Title style={{ textAlign: 'center' }}>Confirm your identity</Title>
-          <Description style={{ textAlign: 'center', paddingBottom: 20 }}>
+          <Title style={centerTextStyle}>Confirm your identity</Title>
+          <Description style={descriptionStyle}>
             {getPreRegistrationDescription()}
           </Description>

This is a micro-optimization that prevents object allocation on each render, though the impact is negligible for this simple screen.

app/src/screens/documents/scanning/DocumentCameraTroubleScreen.tsx (1)

19-19: Prefer the SDK color constant for consistency.

The slate500 constant is imported from local utils but also exists in the SDK (packages/mobile-sdk-alpha/src/constants/colors.ts). Since other components are migrating to the SDK, consider importing slate500 from @selfxyz/mobile-sdk-alpha/constants to reduce duplication and ensure consistency.

Apply this diff to use the SDK color constant:

-import { slate500 } from '@/utils/colors';
+import { slate500 } from '@selfxyz/mobile-sdk-alpha/constants';
app/src/screens/dev/CreateMockScreenDeepLink.tsx (1)

201-201: Consider using SDK color constants for consistency.

While the current implementation works, the file imports black from @/utils/colors (line 29) while using components from @selfxyz/mobile-sdk-alpha/components. For consistency with the SDK migration, consider importing color constants from the SDK package instead.

The SDK exports color constants at @selfxyz/mobile-sdk-alpha/constants/colors:

import { black } from '@selfxyz/mobile-sdk-alpha/constants/colors';

This would align color usage with the component migration pattern.

app/src/screens/dev/CreateMockScreen.tsx (1)

90-90: Consider SDK constants and Caption's size prop for consistency.

The inline style approach works, but there are two optional improvements for better consistency with the SDK migration:

  1. Font and color constants: Import from SDK instead of local utils
  2. Caption's size prop: The component provides a size prop that maps to specific fontSize values (14/15/16), but the current implementation uses fontSize: 20 directly

Option 1: Use SDK constants

-import { dinot, plexMono } from '@/utils/fonts';
+import { dinot, plexMono } from '@selfxyz/mobile-sdk-alpha/utils/fonts';

 import {
   black,
   borderColor,
   separatorColor,
   slate100,
   slate200,
   slate400,
   slate500,
   textBlack,
   white,
-  zinc400,
 } from '@/utils/colors';
+import { zinc400 } from '@selfxyz/mobile-sdk-alpha/constants/colors';

Option 2: If fontSize 20 is not a strict requirement, use Caption's size prop

The Caption component's built-in sizes are 14 (small), 15 (default), or 16 (large). If 20px is required for design purposes, the current inline style approach is appropriate.

<Caption size="large" style={{ fontFamily: dinot, color: zinc400 }}>
app/src/screens/documents/aadhaar/AadhaarUploadErrorScreen.tsx (2)

21-21: Consider using SDK colors for consistency.

Colors are imported from local utils, but the SDK exports color constants (black, slate500 shown in snippets). Centralizing color imports from the SDK would reduce duplication and align with the PR's goal of moving shared utilities to the SDK.

Apply this diff to use SDK colors:

-import { black, slate100, slate200, slate500, white } from '@/utils/colors';
+import { black, slate100, slate200, slate500, white } from '@selfxyz/mobile-sdk-alpha/constants/colors';

Verify that all required colors are exported by the SDK:

#!/bin/bash
# Check SDK color exports
cat packages/mobile-sdk-alpha/src/constants/colors.ts

100-100: Offer to implement help functionality.

The TODO comment indicates missing help functionality. This could improve user experience when document upload fails.

Do you want me to generate an implementation for the help functionality or open a new issue to track this task?

app/src/screens/onboarding/SaveRecoveryPhraseScreen.tsx (2)

48-54: Consider extracting inline styles to constants for performance.

The inline style objects are recreated on every render, which can cause unnecessary re-renders of the Title and Description components if they're not internally memoized. For better performance, extract these to constants or use StyleSheet.create.

Apply this diff to extract styles:

+import { StyleSheet } from 'react-native';
+
 import {
   Caption,
   Description,
   PrimaryButton,
   SecondaryButton,
   Title,
 } from '@selfxyz/mobile-sdk-alpha/components';

+const styles = StyleSheet.create({
+  title: {
+    paddingTop: 20,
+    textAlign: 'center',
+  },
+  description: {
+    paddingBottom: 10,
+  },
+  caption: {
+    color: slate400,
+  },
+});
+
 const SaveRecoveryPhraseScreen: React.FC = () => {
   // ...
   return (
     <ExpandableBottomLayout.Layout backgroundColor={black}>
       <ExpandableBottomLayout.TopSection
         roundTop
         backgroundColor={white}
         justifyContent="space-between"
         gap={10}
       >
-        <Title style={{ paddingTop: 20, textAlign: 'center' }}>
+        <Title style={styles.title}>
           Save your recovery phrase
         </Title>
-        <Description style={{ paddingBottom: 10 }}>
+        <Description style={styles.description}>
           This phrase is the only way to recover your account. Keep it secret,
           keep it safe.
         </Description>
       </ExpandableBottomLayout.TopSection>
       <ExpandableBottomLayout.BottomSection
         style={{ paddingTop: 0 }}
         gap={10}
         backgroundColor={white}
       >
         <Mnemonic words={mnemonic} onRevealWords={onRevealWords} />
-        <Caption style={{ color: slate400 }}>
+        <Caption style={styles.caption}>
           You can reveal your recovery phrase in settings.
         </Caption>

21-21: Consider using SDK color constants for consistency.

Since the components are now sourced from the SDK, you might want to use the SDK's color constants as well. The SDK exports slate400 from packages/mobile-sdk-alpha/src/constants/colors.ts, which could reduce the dependency on local color utilities.

Optionally, update the import:

-import { black, slate400, white } from '@/utils/colors';
+import { black, slate400, white } from '@selfxyz/mobile-sdk-alpha/constants';
app/src/screens/shared/ComingSoonScreen.tsx (2)

27-27: Consider migrating to SDK color constants.

The file imports black and slate500 from local utils (@/utils/colors), but the SDK already exports these same constants (packages/mobile-sdk-alpha/src/constants/colors.ts). Centralizing color definitions in the SDK would reduce duplication and align with the migration objective.

Apply this diff to use SDK colors:

-import { black, slate500, white } from '@/utils/colors';
+import { black, slate500, white } from '@selfxyz/mobile-sdk-alpha/constants/colors';

Then verify that white is also exported from the SDK colors module, or add it if missing.

Also applies to: 140-145, 150-156, 163-169


139-172: Optional: Extract inline styles for performance.

The Title and BodyText components use inline style objects (lines 140-145, 150-156, 163-169), which create new objects on every render. While React Native optimizes this in most cases, extracting these styles using StyleSheet.create outside the component would eliminate unnecessary object allocations.

Example refactor:

import { StyleSheet } from 'react-native';

const styles = StyleSheet.create({
  title: {
    fontSize: 32,
    textAlign: 'center',
    color: black,
    marginBottom: 16,
  },
  bodyPrimary: {
    fontSize: 17,
    textAlign: 'center',
    color: black,
    marginBottom: 10,
    paddingHorizontal: 10,
  },
  bodySecondary: {
    fontSize: 17,
    textAlign: 'center',
    color: slate500,
    marginBottom: 40,
    paddingHorizontal: 10,
  },
});

// Then use:
<Title style={styles.title}>Coming Soon</Title>
<BodyText style={styles.bodyPrimary}>...</BodyText>
<BodyText style={styles.bodySecondary}>...</BodyText>
app/src/screens/documents/selection/IDPickerScreen.tsx (2)

134-139: Consider extracting inline styles to StyleSheet for better performance.

Multiple inline style objects are created on every render. While React Native handles this reasonably well, extracting these to StyleSheet.create() at the bottom of the file would eliminate repeated object allocations and improve performance slightly.

Example refactor:

+const styles = StyleSheet.create({
+  headerText: {
+    marginTop: 48,
+    fontSize: 29,
+    fontFamily: advercase,
+    textAlign: 'center',
+  },
+  documentTitle: {
+    fontSize: 24,
+    fontFamily: dinot,
+    color: black,
+  },
+  // ... other styles
+});

-          <BodyText
-            style={{
-              marginTop: 48,
-              fontSize: 29,
-              fontFamily: advercase,
-              textAlign: 'center',
-            }}
-          >
+          <BodyText style={styles.headerText}>

Also applies to: 160-163, 165-173, 178-187


160-174: Consider using color constant for consistency.

Line 169 uses a hardcoded color '#9193A2'. For better maintainability, consider using a color constant from @/utils/colors if this matches an existing palette color.

app/src/screens/documents/selection/CountryPickerScreen.tsx (1)

47-47: Consider extracting inline styles to StyleSheet for better performance.

Multiple inline style objects are created on every render. Extracting these to StyleSheet.create() would eliminate repeated object allocations and provide a minor performance improvement.

Example refactor:

+const styles = StyleSheet.create({
+  countryName: {
+    fontSize: 16,
+    color: black,
+    flex: 1,
+  },
+  headerText: {
+    fontSize: 29,
+    fontFamily: advercase,
+  },
+  // ... other styles
+});

-        <BodyText style={{ fontSize: 16, color: black, flex: 1 }}>
+        <BodyText style={styles.countryName}>

Also applies to: 128-128, 131-131, 142-149, 159-169

app/src/screens/documents/aadhaar/AadhaarUploadedSuccessScreen.tsx (1)

47-59: Extract inline style objects to avoid recreation on every render.

Inline style objects are recreated on each render, which is a performance anti-pattern in React Native. Consider using StyleSheet.create or defining styles outside the component.

Apply this diff:

+const styles = {
+  successTitle: { fontSize: 19, textAlign: 'center' as const, color: black },
+  successBody: {
+    marginTop: 6,
+    fontSize: 17,
+    textAlign: 'center' as const,
+    color: slate500,
+  },
+};
+
 const AadhaarUploadedSuccessScreen: React.FC = () => {
   // ... existing code ...
-        <BodyText style={{ fontSize: 19, textAlign: 'center', color: black }}>
+        <BodyText style={styles.successTitle}>
           QR code upload successful
         </BodyText>
-        <BodyText
-          style={{
-            marginTop: 6,
-            fontSize: 17,
-            textAlign: 'center',
-            color: slate500,
-          }}
-        >
+        <BodyText style={styles.successBody}>
           You are ready to register your Aadhaar card with Self.
         </BodyText>
app/src/screens/documents/aadhaar/AadhaarUploadScreen.tsx (1)

172-191: Extract inline style objects for better performance.

Three inline style objects are recreated on every render. This compounds the performance impact compared to the previous file.

Apply this diff:

+const styles = {
+  instructionTitle: { fontWeight: 'bold' as const, fontSize: 18, textAlign: 'center' as const },
+  instructionBody: { fontSize: 16, textAlign: 'center' as const, color: slate500 },
+  disclaimer: {
+    fontSize: 12,
+    textAlign: 'center' as const,
+    color: slate400,
+    marginTop: 20,
+  },
+};
+
 const AadhaarUploadScreen: React.FC = () => {
   // ... existing code ...
-        <BodyText
-          style={{ fontWeight: 'bold', fontSize: 18, textAlign: 'center' }}
-        >
+        <BodyText style={styles.instructionTitle}>
           Generate a QR code from the mAadaar app
         </BodyText>
-        <BodyText
-          style={{ fontSize: 16, textAlign: 'center', color: slate500 }}
-        >
+        <BodyText style={styles.instructionBody}>
           Save the QR code to your photo library and upload it here.
         </BodyText>
-        <BodyText
-          style={{
-            fontSize: 12,
-            textAlign: 'center',
-            color: slate400,
-            marginTop: 20,
-          }}
-        >
+        <BodyText style={styles.disclaimer}>
           SELF DOES NOT STORE THIS INFORMATION.
         </BodyText>
app/src/screens/documents/scanning/DocumentNFCScanScreen.tsx (1)

593-608: Consider consolidating inline style overrides into StyleSheet.

While the array-merge pattern style={[styles.x, { marginTop: 8 }]} is valid React Native, it creates new style objects on each render. For margins that appear repeatedly (e.g., { marginTop: 16 } on lines 602 and 608), consider defining them as named styles in the StyleSheet to improve performance and maintainability.

Example refactor:

 const styles = StyleSheet.create({
   title: {
     fontFamily: dinot,
     fontSize: 18,
     fontWeight: '500',
     textAlign: 'center',
   },
+  titleWithMargin: {
+    fontFamily: dinot,
+    fontSize: 18,
+    fontWeight: '500',
+    textAlign: 'center',
+    marginTop: 8,
+  },
   bodyText: {
     fontFamily: dinot,
     fontSize: 16,
     fontWeight: '500',
     textAlign: 'center',
     color: slate500,
   },
+  bodyTextWithMargin: {
+    fontFamily: dinot,
+    fontSize: 16,
+    fontWeight: '500',
+    textAlign: 'center',
+    color: slate500,
+    marginTop: 8,
+    marginBottom: 8,
+  },
   disclaimer: {
     fontFamily: dinot,
     fontSize: 11,
     fontWeight: '500',
     textAlign: 'center',
     color: slate400,
     letterSpacing: 0.44,
   },
+  disclaimerWithMargin: {
+    fontFamily: dinot,
+    fontSize: 11,
+    fontWeight: '500',
+    textAlign: 'center',
+    color: slate400,
+    letterSpacing: 0.44,
+    marginTop: 16,
+  },

Then use the named styles instead of inline overrides:

-<Title style={[styles.title, { marginTop: 8 }]}>
+<Title style={styles.titleWithMargin}>
app/src/screens/app/ModalScreen.tsx (1)

118-123: Unnecessary type casts may mask type issues.

The explicit as React.ReactNode casts are redundant since:

  • titleText and bodyText are already typed as string (lines 44-45)
  • Strings are valid React.ReactNode values

These casts might indicate the SDK components have unexpected type constraints. Consider removing the casts or updating the interface types if the SDK components require React.ReactNode instead of string.

Apply this diff to remove the unnecessary casts:

-            <Title style={{ textAlign: 'left' }}>
-              {params?.titleText as React.ReactNode}
-            </Title>
+            <Title style={{ textAlign: 'left' }}>{params?.titleText}</Title>
             <Description style={{ textAlign: 'left' }}>
-              {params?.bodyText as React.ReactNode}
+              {params?.bodyText}
             </Description>

Alternatively, if the SDK components require React.ReactNode, update the interface:

 export interface ModalParams extends Record<string, unknown> {
-  titleText: string;
-  bodyText: string;
+  titleText: React.ReactNode;
+  bodyText: React.ReactNode;
   buttonText: React.ReactNode;
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4a44ad1 and 60f5bf6.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (40)
  • app/package.json (0 hunks)
  • app/src/screens/account/recovery/AccountRecoveryChoiceScreen.tsx (1 hunks)
  • app/src/screens/account/recovery/AccountRecoveryScreen.tsx (1 hunks)
  • app/src/screens/account/recovery/DocumentDataNotFoundScreen.tsx (2 hunks)
  • app/src/screens/account/recovery/RecoverWithPhraseScreen.tsx (2 hunks)
  • app/src/screens/account/settings/CloudBackupScreen.tsx (1 hunks)
  • app/src/screens/account/settings/SettingsScreen.tsx (3 hunks)
  • app/src/screens/account/settings/ShowRecoveryPhraseScreen.tsx (1 hunks)
  • app/src/screens/app/DeferredLinkingInfoScreen.tsx (1 hunks)
  • app/src/screens/app/LaunchScreen.tsx (2 hunks)
  • app/src/screens/app/ModalScreen.tsx (2 hunks)
  • app/src/screens/dev/CreateMockScreen.tsx (2 hunks)
  • app/src/screens/dev/CreateMockScreenDeepLink.tsx (2 hunks)
  • app/src/screens/documents/aadhaar/AadhaarUploadErrorScreen.tsx (2 hunks)
  • app/src/screens/documents/aadhaar/AadhaarUploadScreen.tsx (2 hunks)
  • app/src/screens/documents/aadhaar/AadhaarUploadedSuccessScreen.tsx (2 hunks)
  • app/src/screens/documents/management/DocumentDataInfoScreen.tsx (2 hunks)
  • app/src/screens/documents/management/ManageDocumentsScreen.tsx (1 hunks)
  • app/src/screens/documents/scanning/DocumentCameraScreen.tsx (1 hunks)
  • app/src/screens/documents/scanning/DocumentCameraTroubleScreen.tsx (2 hunks)
  • app/src/screens/documents/scanning/DocumentNFCMethodSelectionScreen.tsx (2 hunks)
  • app/src/screens/documents/scanning/DocumentNFCScanScreen.tsx (3 hunks)
  • app/src/screens/documents/scanning/DocumentNFCScanScreen.web.tsx (2 hunks)
  • app/src/screens/documents/scanning/DocumentNFCTroubleScreen.tsx (3 hunks)
  • app/src/screens/documents/selection/ConfirmBelongingScreen.tsx (2 hunks)
  • app/src/screens/documents/selection/CountryPickerScreen.tsx (5 hunks)
  • app/src/screens/documents/selection/DocumentOnboardingScreen.tsx (1 hunks)
  • app/src/screens/documents/selection/IDPickerScreen.tsx (3 hunks)
  • app/src/screens/home/ProofHistoryList.tsx (2 hunks)
  • app/src/screens/home/ProofHistoryScreen.tsx (2 hunks)
  • app/src/screens/onboarding/AccountVerifiedSuccessScreen.tsx (1 hunks)
  • app/src/screens/onboarding/DisclaimerScreen.tsx (1 hunks)
  • app/src/screens/onboarding/SaveRecoveryPhraseScreen.tsx (3 hunks)
  • app/src/screens/shared/ComingSoonScreen.tsx (2 hunks)
  • app/src/screens/verification/ProofRequestStatusScreen.tsx (1 hunks)
  • app/src/screens/verification/ProveScreen.tsx (8 hunks)
  • app/src/screens/verification/QRCodeTroubleScreen.tsx (2 hunks)
  • app/src/screens/verification/QRCodeViewFinderScreen.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx (4 hunks)
  • packages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsx (1 hunks)
💤 Files with no reviewable changes (1)
  • app/package.json
✅ Files skipped from review due to trivial changes (1)
  • app/src/screens/account/settings/SettingsScreen.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/screens/home/ProofHistoryList.tsx
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{js,ts,tsx,jsx,sol,nr}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{js,ts,tsx,jsx,sol,nr}: NEVER log sensitive data including PII (names, DOB, passport numbers, addresses), credentials, tokens, API keys, private keys, or session identifiers.
ALWAYS redact/mask sensitive fields in logs using consistent patterns (e.g., ***-***-1234 for passport numbers, J*** D*** for names).

Files:

  • app/src/screens/account/recovery/AccountRecoveryChoiceScreen.tsx
  • app/src/screens/onboarding/DisclaimerScreen.tsx
  • app/src/screens/account/settings/ShowRecoveryPhraseScreen.tsx
  • app/src/screens/shared/ComingSoonScreen.tsx
  • app/src/screens/documents/scanning/DocumentCameraScreen.tsx
  • app/src/screens/documents/scanning/DocumentNFCMethodSelectionScreen.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx
  • app/src/screens/app/ModalScreen.tsx
  • app/src/screens/verification/ProveScreen.tsx
  • app/src/screens/verification/QRCodeViewFinderScreen.tsx
  • app/src/screens/onboarding/AccountVerifiedSuccessScreen.tsx
  • app/src/screens/documents/selection/CountryPickerScreen.tsx
  • app/src/screens/documents/aadhaar/AadhaarUploadErrorScreen.tsx
  • app/src/screens/documents/management/DocumentDataInfoScreen.tsx
  • app/src/screens/app/DeferredLinkingInfoScreen.tsx
  • app/src/screens/app/LaunchScreen.tsx
  • app/src/screens/dev/CreateMockScreenDeepLink.tsx
  • app/src/screens/verification/ProofRequestStatusScreen.tsx
  • app/src/screens/documents/management/ManageDocumentsScreen.tsx
  • app/src/screens/documents/aadhaar/AadhaarUploadedSuccessScreen.tsx
  • app/src/screens/documents/selection/DocumentOnboardingScreen.tsx
  • packages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsx
  • app/src/screens/account/recovery/RecoverWithPhraseScreen.tsx
  • app/src/screens/home/ProofHistoryScreen.tsx
  • app/src/screens/account/recovery/AccountRecoveryScreen.tsx
  • app/src/screens/documents/aadhaar/AadhaarUploadScreen.tsx
  • app/src/screens/documents/selection/ConfirmBelongingScreen.tsx
  • app/src/screens/documents/selection/IDPickerScreen.tsx
  • app/src/screens/documents/scanning/DocumentNFCScanScreen.tsx
  • app/src/screens/documents/scanning/DocumentNFCTroubleScreen.tsx
  • app/src/screens/documents/scanning/DocumentCameraTroubleScreen.tsx
  • app/src/screens/dev/CreateMockScreen.tsx
  • app/src/screens/verification/QRCodeTroubleScreen.tsx
  • app/src/screens/account/settings/CloudBackupScreen.tsx
  • app/src/screens/onboarding/SaveRecoveryPhraseScreen.tsx
  • app/src/screens/documents/scanning/DocumentNFCScanScreen.web.tsx
  • app/src/screens/account/recovery/DocumentDataNotFoundScreen.tsx
app/**/*.{ts,tsx}

📄 CodeRabbit inference engine (app/AGENTS.md)

Type checking must pass before PRs (yarn types)

Files:

  • app/src/screens/account/recovery/AccountRecoveryChoiceScreen.tsx
  • app/src/screens/onboarding/DisclaimerScreen.tsx
  • app/src/screens/account/settings/ShowRecoveryPhraseScreen.tsx
  • app/src/screens/shared/ComingSoonScreen.tsx
  • app/src/screens/documents/scanning/DocumentCameraScreen.tsx
  • app/src/screens/documents/scanning/DocumentNFCMethodSelectionScreen.tsx
  • app/src/screens/app/ModalScreen.tsx
  • app/src/screens/verification/ProveScreen.tsx
  • app/src/screens/verification/QRCodeViewFinderScreen.tsx
  • app/src/screens/onboarding/AccountVerifiedSuccessScreen.tsx
  • app/src/screens/documents/selection/CountryPickerScreen.tsx
  • app/src/screens/documents/aadhaar/AadhaarUploadErrorScreen.tsx
  • app/src/screens/documents/management/DocumentDataInfoScreen.tsx
  • app/src/screens/app/DeferredLinkingInfoScreen.tsx
  • app/src/screens/app/LaunchScreen.tsx
  • app/src/screens/dev/CreateMockScreenDeepLink.tsx
  • app/src/screens/verification/ProofRequestStatusScreen.tsx
  • app/src/screens/documents/management/ManageDocumentsScreen.tsx
  • app/src/screens/documents/aadhaar/AadhaarUploadedSuccessScreen.tsx
  • app/src/screens/documents/selection/DocumentOnboardingScreen.tsx
  • app/src/screens/account/recovery/RecoverWithPhraseScreen.tsx
  • app/src/screens/home/ProofHistoryScreen.tsx
  • app/src/screens/account/recovery/AccountRecoveryScreen.tsx
  • app/src/screens/documents/aadhaar/AadhaarUploadScreen.tsx
  • app/src/screens/documents/selection/ConfirmBelongingScreen.tsx
  • app/src/screens/documents/selection/IDPickerScreen.tsx
  • app/src/screens/documents/scanning/DocumentNFCScanScreen.tsx
  • app/src/screens/documents/scanning/DocumentNFCTroubleScreen.tsx
  • app/src/screens/documents/scanning/DocumentCameraTroubleScreen.tsx
  • app/src/screens/dev/CreateMockScreen.tsx
  • app/src/screens/verification/QRCodeTroubleScreen.tsx
  • app/src/screens/account/settings/CloudBackupScreen.tsx
  • app/src/screens/onboarding/SaveRecoveryPhraseScreen.tsx
  • app/src/screens/documents/scanning/DocumentNFCScanScreen.web.tsx
  • app/src/screens/account/recovery/DocumentDataNotFoundScreen.tsx
app/src/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

app/src/**/*.{ts,tsx,js,jsx}: Review React Native TypeScript code for:

  • Component architecture and reusability
  • State management patterns
  • Performance optimizations
  • TypeScript type safety
  • React hooks usage and dependencies
  • Navigation patterns

Files:

  • app/src/screens/account/recovery/AccountRecoveryChoiceScreen.tsx
  • app/src/screens/onboarding/DisclaimerScreen.tsx
  • app/src/screens/account/settings/ShowRecoveryPhraseScreen.tsx
  • app/src/screens/shared/ComingSoonScreen.tsx
  • app/src/screens/documents/scanning/DocumentCameraScreen.tsx
  • app/src/screens/documents/scanning/DocumentNFCMethodSelectionScreen.tsx
  • app/src/screens/app/ModalScreen.tsx
  • app/src/screens/verification/ProveScreen.tsx
  • app/src/screens/verification/QRCodeViewFinderScreen.tsx
  • app/src/screens/onboarding/AccountVerifiedSuccessScreen.tsx
  • app/src/screens/documents/selection/CountryPickerScreen.tsx
  • app/src/screens/documents/aadhaar/AadhaarUploadErrorScreen.tsx
  • app/src/screens/documents/management/DocumentDataInfoScreen.tsx
  • app/src/screens/app/DeferredLinkingInfoScreen.tsx
  • app/src/screens/app/LaunchScreen.tsx
  • app/src/screens/dev/CreateMockScreenDeepLink.tsx
  • app/src/screens/verification/ProofRequestStatusScreen.tsx
  • app/src/screens/documents/management/ManageDocumentsScreen.tsx
  • app/src/screens/documents/aadhaar/AadhaarUploadedSuccessScreen.tsx
  • app/src/screens/documents/selection/DocumentOnboardingScreen.tsx
  • app/src/screens/account/recovery/RecoverWithPhraseScreen.tsx
  • app/src/screens/home/ProofHistoryScreen.tsx
  • app/src/screens/account/recovery/AccountRecoveryScreen.tsx
  • app/src/screens/documents/aadhaar/AadhaarUploadScreen.tsx
  • app/src/screens/documents/selection/ConfirmBelongingScreen.tsx
  • app/src/screens/documents/selection/IDPickerScreen.tsx
  • app/src/screens/documents/scanning/DocumentNFCScanScreen.tsx
  • app/src/screens/documents/scanning/DocumentNFCTroubleScreen.tsx
  • app/src/screens/documents/scanning/DocumentCameraTroubleScreen.tsx
  • app/src/screens/dev/CreateMockScreen.tsx
  • app/src/screens/verification/QRCodeTroubleScreen.tsx
  • app/src/screens/account/settings/CloudBackupScreen.tsx
  • app/src/screens/onboarding/SaveRecoveryPhraseScreen.tsx
  • app/src/screens/documents/scanning/DocumentNFCScanScreen.web.tsx
  • app/src/screens/account/recovery/DocumentDataNotFoundScreen.tsx
packages/mobile-sdk-alpha/**/*.{ts,tsx}

📄 CodeRabbit inference engine (packages/mobile-sdk-alpha/AGENTS.md)

packages/mobile-sdk-alpha/**/*.{ts,tsx}: Use strict TypeScript type checking across the codebase
Follow ESLint TypeScript-specific rules
Avoid introducing circular dependencies

Files:

  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx
  • packages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsx
packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}: Review alpha mobile SDK code for:

  • API consistency with core SDK
  • Platform-neutral abstractions
  • Performance considerations
  • Clear experimental notes or TODOs

Files:

  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx
  • packages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsx
app/**/*.{ios,android,web}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (app/AGENTS.md)

Explain platform-specific code paths in the PR description (files with .ios, .android, or .web extensions)

Files:

  • app/src/screens/documents/scanning/DocumentNFCScanScreen.web.tsx
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Update the app to consume the mobile-sdk-alpha package and replace local modules with SDK imports
📚 Learning: 2025-09-22T11:10:22.019Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-09-22T11:10:22.019Z
Learning: Applies to src/**/*.{js,ts,tsx,jsx} : Use `react-navigation/native` with `createStaticNavigation` for type-safe navigation in React Native.

Applied to files:

  • app/src/screens/onboarding/DisclaimerScreen.tsx
  • app/src/screens/app/ModalScreen.tsx
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests

Applied to files:

  • app/src/screens/shared/ComingSoonScreen.tsx
  • app/src/screens/verification/QRCodeViewFinderScreen.tsx
  • app/src/screens/onboarding/AccountVerifiedSuccessScreen.tsx
  • app/src/screens/dev/CreateMockScreenDeepLink.tsx
  • app/src/screens/verification/ProofRequestStatusScreen.tsx
  • app/src/screens/documents/selection/DocumentOnboardingScreen.tsx
  • app/src/screens/account/recovery/AccountRecoveryScreen.tsx
📚 Learning: 2025-08-26T14:49:11.190Z
Learnt from: shazarre
PR: selfxyz/self#936
File: app/src/screens/passport/PassportNFCScanScreen.tsx:28-31
Timestamp: 2025-08-26T14:49:11.190Z
Learning: SelfClientProvider is wrapped in app/App.tsx, providing context for useSelfClient() hook usage throughout the React Native app navigation stacks.

Applied to files:

  • app/src/screens/documents/scanning/DocumentNFCMethodSelectionScreen.tsx
  • app/src/screens/verification/QRCodeViewFinderScreen.tsx
  • app/src/screens/documents/aadhaar/AadhaarUploadedSuccessScreen.tsx
  • app/src/screens/documents/aadhaar/AadhaarUploadScreen.tsx
📚 Learning: 2025-08-26T12:48:14.120Z
Learnt from: aaronmgdr
PR: selfxyz/self#951
File: app/src/screens/passport/PassportNFCScanScreen.web.tsx:8-9
Timestamp: 2025-08-26T12:48:14.120Z
Learning: SecondaryButton forwards the trackEvent prop to AbstractButton via prop spreading (...props). AbstractButton handles analytics tracking in its handlePress method using the legacy analytics() system rather than the new Self SDK approach, ensuring button analytics work consistently across the app.

Applied to files:

  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx
📚 Learning: 2025-08-26T12:48:14.120Z
Learnt from: aaronmgdr
PR: selfxyz/self#951
File: app/src/screens/passport/PassportNFCScanScreen.web.tsx:8-9
Timestamp: 2025-08-26T12:48:14.120Z
Learning: SecondaryButton in the app forwards the trackEvent prop to AbstractButton, which handles analytics integration. SecondaryButton does not need separate trackEvent prop handling as it delegates to AbstractButton.

Applied to files:

  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/index.ts : Re-export new SDK modules via packages/mobile-sdk-alpha/src/index.ts

Applied to files:

  • app/src/screens/verification/QRCodeViewFinderScreen.tsx
📚 Learning: 2025-08-25T14:25:57.586Z
Learnt from: aaronmgdr
PR: selfxyz/self#951
File: app/src/providers/authProvider.web.tsx:17-18
Timestamp: 2025-08-25T14:25:57.586Z
Learning: The selfxyz/mobile-sdk-alpha/constants/analytics import path is properly configured with SDK exports, Metro aliases, and TypeScript resolution. Import changes from @/consts/analytics to this path are part of valid analytics migration, not TypeScript resolution issues.

Applied to files:

  • app/src/screens/onboarding/AccountVerifiedSuccessScreen.tsx
  • app/src/screens/dev/CreateMockScreenDeepLink.tsx
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{ts,tsx} : Avoid introducing circular dependencies

Applied to files:

  • app/src/screens/dev/CreateMockScreenDeepLink.tsx
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Test isPassportDataValid() with realistic synthetic passport data (never real user data)

Applied to files:

  • app/src/screens/dev/CreateMockScreenDeepLink.tsx
🧬 Code graph analysis (19)
app/src/screens/shared/ComingSoonScreen.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • black (8-8)
  • slate500 (43-43)
packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx (1)
packages/mobile-sdk-alpha/src/components/buttons/pressedStyle.tsx (1)
  • pressedStyle (5-5)
app/src/screens/verification/ProveScreen.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • slate300 (37-37)
  • black (8-8)
app/src/screens/documents/selection/CountryPickerScreen.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • black (8-8)
  • slate500 (43-43)
app/src/screens/documents/aadhaar/AadhaarUploadErrorScreen.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • black (8-8)
  • slate500 (43-43)
app/src/screens/documents/management/DocumentDataInfoScreen.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • black (8-8)
app/src/screens/app/LaunchScreen.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate300 (37-37)
app/src/screens/dev/CreateMockScreenDeepLink.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • black (8-8)
app/src/screens/documents/aadhaar/AadhaarUploadedSuccessScreen.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • black (8-8)
  • slate500 (43-43)
app/src/screens/account/recovery/RecoverWithPhraseScreen.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate300 (37-37)
app/src/screens/home/ProofHistoryScreen.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • BodyText (10-10)
packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1)
  • BodyText (11-13)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • black (8-8)
  • slate300 (37-37)
app/src/screens/documents/aadhaar/AadhaarUploadScreen.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • slate500 (43-43)
  • slate400 (39-39)
app/src/screens/documents/selection/IDPickerScreen.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • black (8-8)
  • slate400 (39-39)
app/src/screens/documents/scanning/DocumentNFCTroubleScreen.tsx (2)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate500 (43-43)
app/src/components/Tips.tsx (1)
  • Tips (55-63)
app/src/screens/documents/scanning/DocumentCameraTroubleScreen.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate500 (43-43)
app/src/screens/dev/CreateMockScreen.tsx (4)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • Caption (12-12)
packages/mobile-sdk-alpha/src/components/typography/Caption.tsx (1)
  • Caption (15-19)
packages/mobile-sdk-alpha/src/utils/fonts.ts (1)
  • dinot (8-8)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • zinc400 (63-63)
app/src/screens/verification/QRCodeTroubleScreen.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate500 (43-43)
app/src/screens/onboarding/SaveRecoveryPhraseScreen.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate400 (39-39)
app/src/screens/account/recovery/DocumentDataNotFoundScreen.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (2)
  • white (59-59)
  • slate200 (35-35)
🪛 GitHub Actions: Mobile SDK CI
packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx

[warning] 1-1: Prettier reported formatting issues. Run 'prettier --write' to fix.

🪛 GitHub Actions: Workspace CI
packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx

[error] 5-5: ESLint: All imports in the declaration are only used as types. Use import type.

⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: ios-e2e
  • GitHub Check: android-e2e
  • GitHub Check: build-deps
  • GitHub Check: e2e-ios
  • GitHub Check: android-build-test
  • GitHub Check: analyze-ios
  • GitHub Check: analyze-android
🔇 Additional comments (54)
app/src/screens/account/settings/ShowRecoveryPhraseScreen.tsx (1)

7-7: Approve SDK import for Description: Verified Description is exported by @selfxyz/mobile-sdk-alpha/components; usage is correct, no changes needed.

packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx (2)

51-66: Analytics migration from legacy to SDK pattern completed.

The migration from the legacy analytics() system to selfClient.trackEvent aligns with the SDK approach and is correctly implemented. The handlePress method properly:

  • Parses and cleans the event name (removing category prefix)
  • Tracks the event via the new SDK client
  • Preserves the original onPress callback behavior

Based on learnings: Previous feedback noted AbstractButton used the legacy analytics system; this change modernizes it to use the Self SDK's trackEvent API.


69-88: Verify press interaction UX across platforms.

The functional style prop correctly applies pressedStyle only when animatedComponent is absent. However, ensure that:

  1. The pressed state provides adequate visual feedback on both iOS and Android
  2. The animatedComponent path (when present) has its own press feedback mechanism

Test the press interaction on both platforms to confirm the UX meets expectations, particularly for buttons with and without animatedComponent.

app/src/screens/documents/selection/ConfirmBelongingScreen.tsx (1)

11-15: LGTM! SDK migration implemented correctly.

The import changes successfully migrate UI components to the centralized SDK package, aligning with the PR's objective to remove Tamagui dependency and consolidate shared components.

app/src/screens/documents/scanning/DocumentCameraTroubleScreen.tsx (3)

7-7: LGTM! SDK migration complete.

The Caption component import from the SDK aligns with the PR objective to centralize shared components.


64-66: LGTM! Clean style migration.

The conversion from prop-based styling to inline styles is correctly implemented.


69-69: Caption supports the size prop
CaptionProps includes size?: 'small' | 'large'; using size="large" is valid.

app/src/screens/documents/management/ManageDocumentsScreen.tsx (2)

18-21: LGTM! Clean migration to SDK components.

The import change properly consolidates button components from the mobile SDK package. The usage at lines 321 and 324 is correct.


8-8: Clarify Tamagui migration scope

The PR states “removes Tamagui as a dependency,” yet 60+ files still import from ‘tamagui’ and package.json retains it. Should the remaining Tamagui components be migrated now or is full removal planned in a follow-up? Update the PR description or migrate the rest accordingly.

app/src/screens/account/settings/CloudBackupScreen.tsx (1)

12-18: SDK buttons accept trackEvent
PrimaryButton and SecondaryButton inherit the optional trackEvent prop from ButtonProps via AbstractButton.

app/src/screens/dev/CreateMockScreenDeepLink.tsx (1)

17-22: LGTM! Component migration complete.

The consolidation of SDK component imports is correct and the past duplicate import issue has been resolved.

app/src/screens/dev/CreateMockScreen.tsx (1)

32-32: LGTM! SDK component imports correct.

The migration to SDK components (Caption and PrimaryButton) is properly implemented.

app/src/screens/home/ProofHistoryScreen.tsx (1)

18-18: LGTM! Clean migration to SDK components.

The import source change and style prop consolidation follow the expected migration pattern. The previous gap property concern has been resolved.

Also applies to: 242-249

app/src/screens/app/LaunchScreen.tsx (1)

11-15: LGTM! Consistent SDK component migration.

The consolidated import and style prop usage align with the broader migration strategy.

Also applies to: 68-79

app/src/screens/verification/QRCodeTroubleScreen.tsx (1)

7-7: LGTM! Caption migration follows the pattern.

Clean import source change and style-based color application.

Also applies to: 59-61

app/src/screens/verification/ProofRequestStatusScreen.tsx (1)

14-20: LGTM! Import consolidation complete.

Clean migration of typography components to the SDK package.

app/src/screens/verification/QRCodeViewFinderScreen.tsx (1)

17-21: LGTM! Typography import migration complete.

The import source update aligns with the SDK component consolidation.

app/src/screens/verification/ProveScreen.tsx (2)

27-31: LGTM! SDK component imports consolidated.

Clean migration of BodyText, Caption, and HeldPrimaryButtonProveScreen to the SDK package.


243-253: LGTM! Style prop migrations are correct.

The remaining BodyText and Caption style prop consolidations follow the migration pattern and use valid React Native style properties.

Also applies to: 275-282, 332-339, 353-360, 369-371, 379-388

app/src/screens/documents/aadhaar/AadhaarUploadErrorScreen.tsx (1)

63-75: LGTM! Style conversion is correct.

The migration from Tamagui prop-based styling to React Native style objects preserves the visual output correctly. The inline styles match the original intent.

app/src/screens/onboarding/SaveRecoveryPhraseScreen.tsx (1)

7-13: SDK component style-prop support confirmed
Typography components (Title, Description, Caption) declare style?: StyleProp<…>, and ButtonProps extends PressableProps, so PrimaryButton and SecondaryButton also accept and forward a style prop.

app/src/screens/shared/ComingSoonScreen.tsx (1)

6-6: Replace Tamagui layout imports in ComingSoonScreen.tsx
XStack/YStack still imported from Tamagui; no equivalents found in the SDK—switch to React Native View or confirm and import the correct SDK layout components.

app/src/screens/onboarding/AccountVerifiedSuccessScreen.tsx (1)

10-14: SDK component API compatibility confirmed. TitleProps supports size="large", DescriptionProps accepts children, and PrimaryButton’s ButtonProps include trackEvent and inherit onPress from PressableProps.

packages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsx (1)

6-6: LGTM: Import consolidation aligns with Tamagui removal.

The change to import View from react-native instead of Tamagui is correct and consistent with the PR's objective to remove Tamagui dependencies.

app/src/screens/documents/management/DocumentDataInfoScreen.tsx (1)

66-67: Caption component style prop correctly typed
CaptionProps extends React Native TextProps (including StyleProp), so the style prop is already properly supported.

app/src/screens/account/recovery/AccountRecoveryScreen.tsx (1)

8-13: LGTM! Clean migration to SDK components.

The centralized import from @selfxyz/mobile-sdk-alpha/components aligns with the broader refactor to consolidate UI components in the SDK.

app/src/screens/account/recovery/AccountRecoveryChoiceScreen.tsx (1)

12-18: LGTM! Consistent migration pattern.

The import consolidation follows the same pattern established across the codebase, centralizing UI components in the SDK.

app/src/screens/account/recovery/DocumentDataNotFoundScreen.tsx (2)

11-15: LGTM! Import migration is correct.

The components are now sourced from the centralized SDK, consistent with the migration strategy.


46-54: Approve style prop usage & color constants
Style props are appropriate for React Native, and importing from @/utils/colors centralizes SDK constants—no further changes needed.

app/src/screens/account/recovery/RecoverWithPhraseScreen.tsx (1)

15-18: LGTM! Import migration follows established pattern.

The centralized SDK imports are consistent with the broader refactor across the codebase.

app/src/screens/documents/selection/DocumentOnboardingScreen.tsx (2)

11-17: LGTM! Import consolidation is clean.

The migration to SDK-sourced components is correctly implemented. All component imports are properly consolidated from the external package, and component usage remains unchanged.


11-17: LGTM!

The import consolidation from local components to the SDK package is clean and aligns with the PR objective. Component usage remains unchanged.

app/src/screens/documents/selection/IDPickerScreen.tsx (4)

12-12: LGTM! SDK component imports are correct.

The migration from local imports to SDK-sourced BodyText and RoundFlag is properly implemented.


12-12: LGTM!

Import consolidation to SDK components is clean and consistent with the broader refactor.


134-142: LGTM!

The style prop migration preserves the intended visual styling correctly.


179-187: LGTM!

The style prop migration for the footer text is correctly implemented.

app/src/screens/documents/selection/CountryPickerScreen.tsx (5)

15-15: LGTM! SDK component imports are correct.

The migration to SDK-sourced BodyText and RoundFlag is properly implemented and consistent with the broader migration effort.


15-15: LGTM!

Import consolidation to SDK components is consistent with the broader refactor.


47-50: LGTM!

The inline style approach correctly preserves the intended text styling.


128-134: LGTM!

Header and subheader text styling is correctly migrated to inline style objects.


143-169: LGTM!

Suggestion section text styling is correctly implemented with inline style objects, maintaining consistent typography across the component.

app/src/screens/onboarding/DisclaimerScreen.tsx (1)

11-15: SDK component APIs are compatible. Caution and SubHeader accept style and children, and PrimaryButton forwards both style and trackEvent through to AbstractButton as expected.

app/src/screens/documents/scanning/DocumentNFCScanScreen.web.tsx (2)

12-16: LGTM: Clean migration to SDK components.

The import consolidation from @selfxyz/mobile-sdk-alpha/components aligns with the PR's objective to centralize UI primitives in the SDK package.


53-53: Inline style usage is acceptable for web platform.

The shift from textAlign prop to style={{ textAlign: 'center' }} is consistent with the broader migration pattern across the codebase. For platform-specific files like this (.web.tsx), inline styles are a reasonable approach.

app/src/screens/documents/scanning/DocumentNFCMethodSelectionScreen.tsx (2)

12-18: LGTM: SDK component imports consolidated.

The migration to @selfxyz/mobile-sdk-alpha/components for typography and button components is clean and consistent with the broader refactor.


178-180: Inline style for error color is appropriate.

The change from color="red" prop to style={{ color: 'red' }} maintains the same visual result while aligning with the SDK component's API surface.

app/src/screens/documents/scanning/DocumentCameraScreen.tsx (1)

14-19: LGTM: Import consolidation to SDK components.

The migration of Additional, Description, SecondaryButton, and Title to the SDK package is clean and maintains existing functionality.

app/src/screens/documents/scanning/DocumentNFCScanScreen.tsx (1)

39-44: LGTM: SDK component imports consolidated.

The migration to @selfxyz/mobile-sdk-alpha/components is consistent with the broader refactor pattern.

app/src/screens/documents/scanning/DocumentNFCTroubleScreen.tsx (3)

10-10: LGTM: SDK component imports consolidated.

The migration of Caption and SecondaryButton to @selfxyz/mobile-sdk-alpha/components is clean and consistent with the broader refactor.


98-98: Style prop usage is consistent with migration pattern.

The change from color prop to style={{ color: slate500 }} aligns with the SDK component's API surface and maintains the same visual result.

Also applies to: 104-104


83-83: Verify necessity of explicit marginBottom: 0 override. Check the SDK’s SecondaryButton implementation—if it doesn’t include a default bottom margin, you can remove this override for cleaner code.

app/src/screens/app/DeferredLinkingInfoScreen.tsx (2)

9-13: LGTM! Clean SDK migration.

The consolidated import from @selfxyz/mobile-sdk-alpha/components aligns with the PR objective to move components to the SDK package.


26-26: Confirmed style prop support on Title and Description. Both components extend React Native’s TextProps (including style?: StyleProp<TextStyle>), so the existing usage is valid.

app/src/screens/app/ModalScreen.tsx (1)

10-15: LGTM! Consistent SDK migration.

The consolidated import follows the same clean pattern as other migrated screens.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx (1)

46-56: Add defensive null check for selfClient.

The useSelfClient() hook is called without verifying that the context is properly initialized. If the component is rendered outside the provider or the context returns null/undefined, line 56 will throw a runtime error.

Apply this diff to add a null check:

  const selfClient = useSelfClient();
  const hasBorder = borderColor ? true : false;

  const handlePress = (e: GestureResponderEvent) => {
    if (trackEvent) {
      // attempt to remove event category from click event
      const parsedEvent = trackEvent?.split(':')?.[1]?.trim();
      if (parsedEvent) {
        trackEvent = parsedEvent;
      }
-     selfClient.trackEvent(`Click: ${trackEvent}`);
+     selfClient?.trackEvent(`Click: ${trackEvent}`);
    }
    if (onPress) {
      onPress(e);
    }
  };
🧹 Nitpick comments (2)
packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx (1)

52-55: Avoid mutating function parameters.

Reassigning the trackEvent parameter reduces code clarity. Use a separate variable for the parsed event name.

Apply this diff:

  if (trackEvent) {
    // attempt to remove event category from click event
    const parsedEvent = trackEvent?.split(':')?.[1]?.trim();
-   if (parsedEvent) {
-     trackEvent = parsedEvent;
-   }
-   selfClient?.trackEvent(`Click: ${trackEvent}`);
+   const eventName = parsedEvent || trackEvent;
+   selfClient?.trackEvent(`Click: ${eventName}`);
  }
app/jest.setup.js (1)

685-731: Refactor to eliminate mock duplication.

The same SVG component mocks are defined twice with only the module path differing. This violates DRY principles and creates a maintenance burden.

Apply this refactor to define the mock once:

-// Mock react-native-svg
-jest.mock('react-native-svg', () => {
-  const React = require('react');
-  return {
-    Svg: props => React.createElement('Svg', props, props.children),
-    Circle: props => React.createElement('Circle', props, props.children),
-    Path: props => React.createElement('Path', props, props.children),
-    G: props => React.createElement('G', props, props.children),
-    Rect: props => React.createElement('Rect', props, props.children),
-    Defs: props => React.createElement('Defs', props, props.children),
-    LinearGradient: props =>
-      React.createElement('LinearGradient', props, props.children),
-    Stop: props => React.createElement('Stop', props, props.children),
-    ClipPath: props => React.createElement('ClipPath', props, props.children),
-    Polygon: props => React.createElement('Polygon', props, props.children),
-    Polyline: props => React.createElement('Polyline', props, props.children),
-    Line: props => React.createElement('Line', props, props.children),
-    Text: props => React.createElement('Text', props, props.children),
-    TSpan: props => React.createElement('TSpan', props, props.children),
-  };
-});
-
-// Mock mobile-sdk-alpha's react-native-svg
-jest.mock(
-  '../packages/mobile-sdk-alpha/node_modules/react-native-svg',
-  () => {
-    const React = require('react');
-    return {
-      Svg: props => React.createElement('Svg', props, props.children),
-      Circle: props => React.createElement('Circle', props, props.children),
-      Path: props => React.createElement('Path', props, props.children),
-      G: props => React.createElement('G', props, props.children),
-      Rect: props => React.createElement('Rect', props, props.children),
-      Defs: props => React.createElement('Defs', props, props.children),
-      LinearGradient: props =>
-        React.createElement('LinearGradient', props, props.children),
-      Stop: props => React.createElement('Stop', props, props.children),
-      ClipPath: props => React.createElement('ClipPath', props, props.children),
-      Polygon: props => React.createElement('Polygon', props, props.children),
-      Polyline: props => React.createElement('Polyline', props, props.children),
-      Line: props => React.createElement('Line', props, props.children),
-      Text: props => React.createElement('Text', props, props.children),
-      TSpan: props => React.createElement('TSpan', props, props.children),
-    };
-  },
-  { virtual: true },
-);
+// Mock react-native-svg - shared factory for both standard and mobile-sdk-alpha paths
+const createSvgMock = () => {
+  const React = require('react');
+  return {
+    Svg: props => React.createElement('Svg', props, props.children),
+    Circle: props => React.createElement('Circle', props, props.children),
+    Path: props => React.createElement('Path', props, props.children),
+    G: props => React.createElement('G', props, props.children),
+    Rect: props => React.createElement('Rect', props, props.children),
+    Defs: props => React.createElement('Defs', props, props.children),
+    LinearGradient: props =>
+      React.createElement('LinearGradient', props, props.children),
+    Stop: props => React.createElement('Stop', props, props.children),
+    ClipPath: props => React.createElement('ClipPath', props, props.children),
+    Polygon: props => React.createElement('Polygon', props, props.children),
+    Polyline: props => React.createElement('Polyline', props, props.children),
+    Line: props => React.createElement('Line', props, props.children),
+    Text: props => React.createElement('Text', props, props.children),
+    TSpan: props => React.createElement('TSpan', props, props.children),
+  };
+};
+
+jest.mock('react-native-svg', createSvgMock);
+jest.mock(
+  '../packages/mobile-sdk-alpha/node_modules/react-native-svg',
+  createSvgMock,
+  { virtual: true },
+);
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 60f5bf6 and ec723d9.

⛔ Files ignored due to path filters (2)
  • app/Gemfile.lock is excluded by !**/*.lock
  • app/ios/Podfile.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • app/jest.config.cjs (2 hunks)
  • app/jest.setup.js (1 hunks)
  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx (4 hunks)
  • packages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx (2 hunks)
  • packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx (4 hunks)
  • packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/typography/Caption.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/typography/DescriptionTitle.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/typography/SubHeader.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/typography/Title.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/mobile-sdk-alpha/src/components/typography/Caption.tsx
  • packages/mobile-sdk-alpha/src/components/typography/SubHeader.tsx
  • packages/mobile-sdk-alpha/src/components/typography/Title.tsx
  • packages/mobile-sdk-alpha/src/components/typography/BodyText.tsx
🧰 Additional context used
📓 Path-based instructions (5)
packages/mobile-sdk-alpha/**/*.{ts,tsx}

📄 CodeRabbit inference engine (packages/mobile-sdk-alpha/AGENTS.md)

packages/mobile-sdk-alpha/**/*.{ts,tsx}: Use strict TypeScript type checking across the codebase
Follow ESLint TypeScript-specific rules
Avoid introducing circular dependencies

Files:

  • packages/mobile-sdk-alpha/src/components/typography/DescriptionTitle.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx
  • packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx
**/*.{js,ts,tsx,jsx,sol,nr}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{js,ts,tsx,jsx,sol,nr}: NEVER log sensitive data including PII (names, DOB, passport numbers, addresses), credentials, tokens, API keys, private keys, or session identifiers.
ALWAYS redact/mask sensitive fields in logs using consistent patterns (e.g., ***-***-1234 for passport numbers, J*** D*** for names).

Files:

  • packages/mobile-sdk-alpha/src/components/typography/DescriptionTitle.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx
  • packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx
  • app/jest.setup.js
packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}: Review alpha mobile SDK code for:

  • API consistency with core SDK
  • Platform-neutral abstractions
  • Performance considerations
  • Clear experimental notes or TODOs

Files:

  • packages/mobile-sdk-alpha/src/components/typography/DescriptionTitle.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx
  • packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx
  • packages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx
app/jest.config.cjs

📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)

app/jest.config.cjs: Use Jest in the app with a React Native preset configured in app/jest.config.cjs
Configure moduleNameMapper in app/jest.config.cjs to map '@/'' to 'src/' and '@tests/' to 'tests/src/'

Files:

  • app/jest.config.cjs
app/jest.setup.js

📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)

Provide comprehensive Jest setup in app/jest.setup.js with required mocks

Files:

  • app/jest.setup.js
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests
📚 Learning: 2025-08-26T12:48:14.120Z
Learnt from: aaronmgdr
PR: selfxyz/self#951
File: app/src/screens/passport/PassportNFCScanScreen.web.tsx:8-9
Timestamp: 2025-08-26T12:48:14.120Z
Learning: SecondaryButton forwards the trackEvent prop to AbstractButton via prop spreading (...props). AbstractButton handles analytics tracking in its handlePress method using the legacy analytics() system rather than the new Self SDK approach, ensuring button analytics work consistently across the app.

Applied to files:

  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx
📚 Learning: 2025-08-26T12:48:14.120Z
Learnt from: aaronmgdr
PR: selfxyz/self#951
File: app/src/screens/passport/PassportNFCScanScreen.web.tsx:8-9
Timestamp: 2025-08-26T12:48:14.120Z
Learning: SecondaryButton in the app forwards the trackEvent prop to AbstractButton, which handles analytics integration. SecondaryButton does not need separate trackEvent prop handling as it delegates to AbstractButton.

Applied to files:

  • packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to app/jest.config.cjs : Configure moduleNameMapper in app/jest.config.cjs to map '@/'' to 'src/' and 'tests/' to 'tests/src/'

Applied to files:

  • app/jest.config.cjs
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Do NOT mock selfxyz/mobile-sdk-alpha in tests (avoid jest.mock('selfxyz/mobile-sdk-alpha') and replacing real functions with mocks)

Applied to files:

  • app/jest.config.cjs
  • app/jest.setup.js
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests

Applied to files:

  • app/jest.config.cjs
  • app/jest.setup.js
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to app/jest.config.cjs : Use Jest in the app with a React Native preset configured in app/jest.config.cjs

Applied to files:

  • app/jest.config.cjs
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{ts,tsx} : Avoid introducing circular dependencies

Applied to files:

  • app/jest.config.cjs
📚 Learning: 2025-09-22T11:10:22.019Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-09-22T11:10:22.019Z
Learning: Module mapping `@/` → `src/`, `tests/` → `tests/src/` must be maintained across the project.

Applied to files:

  • app/jest.config.cjs
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to app/jest.setup.js : Provide comprehensive Jest setup in app/jest.setup.js with required mocks

Applied to files:

  • app/jest.setup.js
📚 Learning: 2025-09-22T11:10:22.019Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-09-22T11:10:22.019Z
Learning: Applies to jest.setup.js : Comprehensive mocks for all native modules must be set up in `jest.setup.js`.

Applied to files:

  • app/jest.setup.js
🧬 Code graph analysis (3)
packages/mobile-sdk-alpha/src/components/typography/DescriptionTitle.tsx (3)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • DescriptionTitle (18-18)
packages/mobile-sdk-demo/tests/mocks/react-native.ts (1)
  • Text (31-31)
packages/mobile-sdk-alpha/src/utils/fonts.ts (1)
  • dinot (8-8)
packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx (1)
packages/mobile-sdk-alpha/src/components/buttons/pressedStyle.tsx (1)
  • pressedStyle (5-5)
packages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx (1)
packages/mobile-sdk-alpha/src/components/index.ts (1)
  • HeldPrimaryButtonProveScreen (22-22)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: e2e-ios
  • GitHub Check: android-build-test
  • GitHub Check: ios-e2e
  • GitHub Check: analyze-android
  • GitHub Check: build-deps
  • GitHub Check: analyze-ios
🔇 Additional comments (7)
packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx (1)

64-83: Migration to Pressable looks correct.

The replacement of Button with Pressable is properly implemented, including:

  • Press state handling via the functional style prop
  • Conditional pressedStyle application when not using animated components
  • Proper prop forwarding to Pressable

The style array allocation on each render is acceptable for a button component and does not require optimization.

packages/mobile-sdk-alpha/src/components/typography/DescriptionTitle.tsx (1)

15-16: Verify if the large line-height ratio is intentional.

The line-height of 35px with fontSize 18px creates a ratio of ~1.94, which is notably large. While this may be intentional for visual spacing in your design system, please confirm this matches your typography specifications.

packages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx (1)

260-266: Ensure analytics event doesn’t include sensitive data
Confirm that trackEvent(PROOF_VERIFY_LONG_PRESS) only records the event name and attaches no PII, credentials, or proof content.

packages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsx (3)

52-52: Verify error logging doesn't expose sensitive data.

While the console.error appears to log generic error objects from country code conversion or flag lookup, ensure that error messages don't inadvertently include user-submitted country codes or other potentially sensitive identifiers that could be considered PII in certain contexts.

As per coding guidelines: Never log sensitive data including PII. If there's any risk the error object contains user data, redact it before logging.


66-66: LGTM! Proper circular styling added.

The borderRadius: size / 2 correctly creates a circular appearance for the flag container, which aligns well with the component name "RoundFlag".


29-29: Drop mixed-case fallback in findFlagComponent
The third pattern (charAt(0).toUpperCase() + charAt(1).toLowerCase()) yields strings like “Us” that won’t match standard ISO codes (“US”/“us”). Remove this fallback or confirm your CountryFlagsRecord actually uses mixed-case keys.

app/jest.config.cjs (1)

9-9: LGTM!

The addition of react-native-svg and react-native-svg-circle-country-flags to the ignore patterns correctly aligns with the mocks defined in app/jest.setup.js and prevents Jest from attempting to transform native SVG modules.

"react-native-screens": "4.15.3",
"react-native-sqlite-storage": "^6.0.1",
"react-native-svg": "15.12.1",
"react-native-svg-circle-country-flags": "^0.2.2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

color={black}
fontWeight="600"
fontFamily={dinot}
style={{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gonna miss the convienence

@@ -0,0 +1,93 @@
// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat

// SPDX-License-Identifier: BUSL-1.1
// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE.

export { default as AbstractButton } from './buttons/AbstractButton';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/mobile-sdk-alpha/react-native.config.cjs (1)

24-24: Consider using absolute path for consistency.

The relative path './assets/fonts' will work, but for consistency with the rest of the file's pattern (lines 15, 18), consider using path.join(packageRoot, 'assets/fonts') instead. This makes path resolution more explicit and aligns with the existing style.

Apply this diff:

-  assets: ['./assets/fonts'],
+  assets: [path.join(packageRoot, 'assets/fonts')],
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0f1e373 and aa36b72.

⛔ Files ignored due to path filters (3)
  • packages/mobile-sdk-alpha/assets/fonts/Advercase-Regular.otf is excluded by !**/*.otf
  • packages/mobile-sdk-alpha/assets/fonts/DINOT-Medium.otf is excluded by !**/*.otf
  • packages/mobile-sdk-alpha/assets/fonts/IBMPlexMono-Regular.otf is excluded by !**/*.otf
📒 Files selected for processing (3)
  • packages/mobile-sdk-alpha/README.md (1 hunks)
  • packages/mobile-sdk-alpha/package.json (3 hunks)
  • packages/mobile-sdk-alpha/react-native.config.cjs (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/mobile-sdk-alpha/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/mobile-sdk-alpha/package.json
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Update the app to consume the mobile-sdk-alpha package and replace local modules with SDK imports
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: build-deps
  • GitHub Check: ios-e2e
  • GitHub Check: analyze-ios
  • GitHub Check: analyze-android
  • GitHub Check: android-build-test
  • GitHub Check: e2e-ios

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/src/screens/documents/selection/IDPickerScreen.tsx (1)

134-184: Extract repeated inline style patterns to constants.

The inline style objects show duplication, particularly the fontFamily: dinot pattern which appears in three separate BodyText components (lines 160-162, 165-173, 178-184). Additionally, the combination { fontFamily: dinot, color: slate400 } is repeated twice (lines 165-173, 178-184).

Consider extracting common style patterns to constants at the top of the file to improve maintainability and adhere to DRY principles.

Apply this diff to extract common styles:

+const styles = {
+  header: {
+    marginTop: 48,
+    fontSize: 29,
+    fontFamily: advercase,
+    textAlign: 'center' as const,
+  },
+  documentTitle: {
+    fontSize: 24,
+    fontFamily: dinot,
+    color: black,
+  },
+  documentDescription: {
+    fontSize: 14,
+    fontFamily: dinot,
+    color: slate400,
+  },
+  instruction: {
+    fontSize: 18,
+    fontFamily: dinot,
+    color: slate400,
+    textAlign: 'center' as const,
+  },
+};
+
 const IDPickerScreen: React.FC = () => {

Then update the BodyText components:

-          <BodyText
-            style={{
-              marginTop: 48,
-              fontSize: 29,
-              fontFamily: advercase,
-              textAlign: 'center',
-            }}
-          >
+          <BodyText style={styles.header}>
             Select an ID type
           </BodyText>
-                  <BodyText
-                    style={{ fontSize: 24, fontFamily: dinot, color: black }}
-                  >
+                  <BodyText style={styles.documentTitle}>
                     {getDocumentName(docType)}
                   </BodyText>
-                  <BodyText
-                    style={{
-                      fontSize: 14,
-                      fontFamily: dinot,
-                      color: slate400,
-                    }}
-                  >
+                  <BodyText style={styles.documentDescription}>
                     {getDocumentDescription(docType)}
                   </BodyText>
-          <BodyText
-            style={{
-              fontSize: 18,
-              fontFamily: dinot,
-              color: slate400,
-              textAlign: 'center',
-            }}
-          >
+          <BodyText style={styles.instruction}>
             Be sure your document is ready to scan
           </BodyText>
♻️ Duplicate comments (1)
app/src/screens/documents/selection/IDPickerScreen.tsx (1)

165-173: Past issue resolved.

The previous review comment about the hardcoded hex color '#9193A2' has been addressed. The code now correctly uses the slate400 constant from the project's color definitions.

🧹 Nitpick comments (1)
app/src/screens/documents/selection/IDPickerScreen.tsx (1)

12-12: Use SDK-provided styling tokens instead of local utils.
The SDK already defines fonts.ts and constants/colors.ts; re-export these in its main entrypoint (e.g. @selfxyz/mobile-sdk-alpha) and update your imports to pull fonts and colors from the SDK rather than @/utils/fonts and @/utils/colors to ensure a single source of truth.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aa36b72 and c2bb656.

📒 Files selected for processing (3)
  • app/src/components/homeScreen/idCard.tsx (1 hunks)
  • app/src/screens/documents/selection/IDPickerScreen.tsx (3 hunks)
  • app/src/screens/verification/ProveScreen.tsx (8 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/screens/verification/ProveScreen.tsx
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{js,ts,tsx,jsx,sol,nr}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{js,ts,tsx,jsx,sol,nr}: NEVER log sensitive data including PII (names, DOB, passport numbers, addresses), credentials, tokens, API keys, private keys, or session identifiers.
ALWAYS redact/mask sensitive fields in logs using consistent patterns (e.g., ***-***-1234 for passport numbers, J*** D*** for names).

Files:

  • app/src/components/homeScreen/idCard.tsx
  • app/src/screens/documents/selection/IDPickerScreen.tsx
app/**/*.{ts,tsx}

📄 CodeRabbit inference engine (app/AGENTS.md)

Type checking must pass before PRs (yarn types)

Files:

  • app/src/components/homeScreen/idCard.tsx
  • app/src/screens/documents/selection/IDPickerScreen.tsx
app/src/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

app/src/**/*.{ts,tsx,js,jsx}: Review React Native TypeScript code for:

  • Component architecture and reusability
  • State management patterns
  • Performance optimizations
  • TypeScript type safety
  • React hooks usage and dependencies
  • Navigation patterns

Files:

  • app/src/components/homeScreen/idCard.tsx
  • app/src/screens/documents/selection/IDPickerScreen.tsx
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Update the app to consume the mobile-sdk-alpha package and replace local modules with SDK imports
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests
🧬 Code graph analysis (1)
app/src/components/homeScreen/idCard.tsx (1)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
  • slate400 (39-39)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: build-deps
  • GitHub Check: analyze-ios
  • GitHub Check: e2e-ios
  • GitHub Check: android-build-test
  • GitHub Check: analyze-android
  • GitHub Check: ios-e2e
  • GitHub Check: android-e2e
🔇 Additional comments (1)
app/src/components/homeScreen/idCard.tsx (1)

145-145: Verify the color change is intentional.

Replacing the hardcoded hex color with slate400 is good practice for maintainability. However, the color value changed from #9193A2 to #94A3B8 (per the SDK definition). This is a subtle but user-visible change to the "Verified" text color.

Please confirm this color shift is intentional and aligns with the design system.

@transphorm
Copy link
Member

will merge this pull request after releasing a new build; later on today

@transphorm transphorm merged commit 6bdc4ae into dev Oct 10, 2025
30 checks passed
@transphorm transphorm deleted the aaronmgdr/untamagui branch October 10, 2025 23:52
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.

3 participants