-
Notifications
You must be signed in to change notification settings - Fork 179
Move components to sdk for future use #1243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughReplaces 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
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
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
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
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 inhandlePress.Line 53 tries to assign back to
trackEvent, buttrackEventis aconstfrom props destructuring. When a colon-delimited event hits this path, the assignment throwsTypeError: Assignment to constant variable, breaking every press. Please keeptrackEventimmutable 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
sizeprop ('small' | 'large' | default) that maps to fontSize values, but this code now uses inlinestyle={{ 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
⛔ Files ignored due to path filters (1)
yarn.lockis 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.tsxpackages/mobile-sdk-alpha/src/components/typography/DescriptionTitle.tsxpackages/mobile-sdk-alpha/tsup.config.tspackages/mobile-sdk-alpha/src/components/typography/Description.tsxpackages/mobile-sdk-alpha/src/components/typography/styles.tspackages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsxpackages/mobile-sdk-alpha/src/components/typography/Caution.tsxpackages/mobile-sdk-alpha/src/components/typography/SubHeader.tsxpackages/mobile-sdk-alpha/src/components/typography/Caption.tsxpackages/mobile-sdk-alpha/src/components/buttons/PrimaryButton.tsxpackages/mobile-sdk-alpha/src/utils/fonts.tspackages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsxpackages/mobile-sdk-alpha/src/components/typography/BodyText.tsxpackages/mobile-sdk-alpha/src/components/buttons/SecondaryButton.tsxpackages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.tsxpackages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.web.tsxpackages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.shared.tspackages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsxpackages/mobile-sdk-alpha/src/components/screens/PassportCameraScreen.tsxpackages/mobile-sdk-alpha/src/components/typography/Additional.tsxpackages/mobile-sdk-alpha/src/components/screens/QRCodeScreen.tsxpackages/mobile-sdk-alpha/src/components/index.tspackages/mobile-sdk-alpha/src/utils/styleUtils.tspackages/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.,***-***-1234for passport numbers,J*** D***for names).
Files:
packages/mobile-sdk-alpha/src/components/typography/Title.tsxpackages/mobile-sdk-alpha/src/components/typography/DescriptionTitle.tsxapp/src/screens/recovery/RecoverWithPhraseScreen.tsxpackages/mobile-sdk-alpha/tsup.config.tsapp/src/components/FeedbackModalScreen.tsxapp/src/screens/document/DocumentNFCScanScreen.web.tsxpackages/mobile-sdk-alpha/src/components/typography/Description.tsxpackages/mobile-sdk-alpha/src/components/typography/styles.tsapp/src/screens/document/DocumentCameraTroubleScreen.tsxpackages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsxapp/src/screens/settings/DocumentDataInfoScreen.tsxapp/src/screens/document/aadhaar/AadhaarUploadedSuccessScreen.tsxapp/src/components/NavBar/DocumentFlowNavBar.tsxpackages/mobile-sdk-alpha/src/components/typography/Caution.tsxpackages/mobile-sdk-alpha/src/components/typography/SubHeader.tsxpackages/mobile-sdk-alpha/src/components/typography/Caption.tsxapp/src/components/NavBar/AadhaarNavBar.tsxapp/src/screens/system/LaunchScreen.tsxapp/src/screens/document/aadhaar/AadhaarUploadErrorScreen.tsxpackages/mobile-sdk-alpha/src/components/buttons/PrimaryButton.tsxapp/src/screens/prove/ProofRequestStatusScreen.tsxapp/src/screens/document/DocumentNFCMethodSelectionScreen.tsxapp/src/screens/document/aadhaar/AadhaarUploadScreen.tsxpackages/mobile-sdk-alpha/src/utils/fonts.tsapp/src/components/Tips.tsxapp/src/screens/document/DocumentOnboardingScreen.tsxpackages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsxpackages/mobile-sdk-alpha/src/components/typography/BodyText.tsxapp/src/screens/recovery/AccountRecoveryScreen.tsxapp/src/screens/document/IDPickerScreen.tsxapp/src/screens/settings/CloudBackupScreen.tsxpackages/mobile-sdk-alpha/src/components/buttons/SecondaryButton.tsxapp/src/screens/dev/CreateMockScreen.tsxapp/src/screens/recovery/SaveRecoveryPhraseScreen.tsxapp/src/components/Disclosures.tsxpackages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.tsxapp/src/screens/document/ConfirmBelongingScreen.tsxapp/src/screens/document/CountryPickerScreen.tsxpackages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.web.tsxapp/src/screens/settings/ShowRecoveryPhraseScreen.tsxpackages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.shared.tsapp/src/screens/home/ProofHistoryScreen.tsxapp/src/screens/dev/CreateMockScreenDeepLink.tsxapp/src/screens/recovery/AccountVerifiedSuccessScreen.tsxapp/src/screens/settings/SettingsScreen.tsxapp/src/screens/system/DeferredLinkingInfoScreen.tsxapp/src/screens/home/ProofHistoryList.tsxapp/src/screens/prove/QRCodeTroubleScreen.tsxapp/src/screens/settings/ManageDocumentsScreen.tsxapp/src/screens/prove/QRCodeViewFinderScreen.tsxapp/src/components/NavBar/IdDetailsNavBar.tsxapp/src/components/NavBar/HomeNavBar.tsxpackages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsxapp/src/screens/system/ModalScreen.tsxpackages/mobile-sdk-alpha/src/components/screens/PassportCameraScreen.tsxapp/src/components/FeedbackModal.tsxapp/src/components/NavBar/BaseNavBar.tsxapp/src/screens/document/DocumentCameraScreen.tsxpackages/mobile-sdk-alpha/src/components/typography/Additional.tsxpackages/mobile-sdk-alpha/src/components/screens/QRCodeScreen.tsxapp/src/screens/document/DocumentNFCTroubleScreen.tsxapp/src/screens/recovery/DocumentDataNotFoundScreen.tsxpackages/mobile-sdk-alpha/src/components/index.tspackages/mobile-sdk-alpha/src/utils/styleUtils.tspackages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsxapp/src/layouts/SimpleScrolledTitleLayout.tsxapp/src/screens/recovery/AccountRecoveryChoiceScreen.tsxapp/src/screens/home/DisclaimerScreen.tsxapp/src/screens/document/DocumentNFCScanScreen.tsxapp/src/screens/prove/ProveScreen.tsxapp/src/screens/document/ComingSoonScreen.tsxapp/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.tsxpackages/mobile-sdk-alpha/src/components/typography/DescriptionTitle.tsxpackages/mobile-sdk-alpha/tsup.config.tspackages/mobile-sdk-alpha/src/components/typography/Description.tsxpackages/mobile-sdk-alpha/src/components/typography/styles.tspackages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsxpackages/mobile-sdk-alpha/src/components/typography/Caution.tsxpackages/mobile-sdk-alpha/src/components/typography/SubHeader.tsxpackages/mobile-sdk-alpha/src/components/typography/Caption.tsxpackages/mobile-sdk-alpha/src/components/buttons/PrimaryButton.tsxpackages/mobile-sdk-alpha/src/utils/fonts.tspackages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsxpackages/mobile-sdk-alpha/src/components/typography/BodyText.tsxpackages/mobile-sdk-alpha/src/components/buttons/SecondaryButton.tsxpackages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.tsxpackages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.web.tsxpackages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.shared.tspackages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsxpackages/mobile-sdk-alpha/src/components/screens/PassportCameraScreen.tsxpackages/mobile-sdk-alpha/src/components/typography/Additional.tsxpackages/mobile-sdk-alpha/src/components/screens/QRCodeScreen.tsxpackages/mobile-sdk-alpha/src/components/index.tspackages/mobile-sdk-alpha/src/utils/styleUtils.tspackages/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.tsxapp/src/components/FeedbackModalScreen.tsxapp/src/screens/document/DocumentNFCScanScreen.web.tsxapp/src/screens/document/DocumentCameraTroubleScreen.tsxapp/src/screens/settings/DocumentDataInfoScreen.tsxapp/src/screens/document/aadhaar/AadhaarUploadedSuccessScreen.tsxapp/src/components/NavBar/DocumentFlowNavBar.tsxapp/src/components/NavBar/AadhaarNavBar.tsxapp/src/screens/system/LaunchScreen.tsxapp/src/screens/document/aadhaar/AadhaarUploadErrorScreen.tsxapp/src/screens/prove/ProofRequestStatusScreen.tsxapp/src/screens/document/DocumentNFCMethodSelectionScreen.tsxapp/src/screens/document/aadhaar/AadhaarUploadScreen.tsxapp/src/components/Tips.tsxapp/src/screens/document/DocumentOnboardingScreen.tsxapp/src/screens/recovery/AccountRecoveryScreen.tsxapp/src/screens/document/IDPickerScreen.tsxapp/src/screens/settings/CloudBackupScreen.tsxapp/src/screens/dev/CreateMockScreen.tsxapp/src/screens/recovery/SaveRecoveryPhraseScreen.tsxapp/src/components/Disclosures.tsxapp/src/screens/document/ConfirmBelongingScreen.tsxapp/src/screens/document/CountryPickerScreen.tsxapp/src/screens/settings/ShowRecoveryPhraseScreen.tsxapp/src/screens/home/ProofHistoryScreen.tsxapp/src/screens/dev/CreateMockScreenDeepLink.tsxapp/src/screens/recovery/AccountVerifiedSuccessScreen.tsxapp/src/screens/settings/SettingsScreen.tsxapp/src/screens/system/DeferredLinkingInfoScreen.tsxapp/src/screens/home/ProofHistoryList.tsxapp/src/screens/prove/QRCodeTroubleScreen.tsxapp/src/screens/settings/ManageDocumentsScreen.tsxapp/src/screens/prove/QRCodeViewFinderScreen.tsxapp/src/components/NavBar/IdDetailsNavBar.tsxapp/src/components/NavBar/HomeNavBar.tsxapp/src/screens/system/ModalScreen.tsxapp/src/components/FeedbackModal.tsxapp/src/components/NavBar/BaseNavBar.tsxapp/src/screens/document/DocumentCameraScreen.tsxapp/src/screens/document/DocumentNFCTroubleScreen.tsxapp/src/screens/recovery/DocumentDataNotFoundScreen.tsxapp/src/layouts/SimpleScrolledTitleLayout.tsxapp/src/screens/recovery/AccountRecoveryChoiceScreen.tsxapp/src/screens/home/DisclaimerScreen.tsxapp/src/screens/document/DocumentNFCScanScreen.tsxapp/src/screens/prove/ProveScreen.tsxapp/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.tsxapp/src/components/FeedbackModalScreen.tsxapp/src/screens/document/DocumentNFCScanScreen.web.tsxapp/src/screens/document/DocumentCameraTroubleScreen.tsxapp/src/screens/settings/DocumentDataInfoScreen.tsxapp/src/screens/document/aadhaar/AadhaarUploadedSuccessScreen.tsxapp/src/components/NavBar/DocumentFlowNavBar.tsxapp/src/components/NavBar/AadhaarNavBar.tsxapp/src/screens/system/LaunchScreen.tsxapp/src/screens/document/aadhaar/AadhaarUploadErrorScreen.tsxapp/src/screens/prove/ProofRequestStatusScreen.tsxapp/src/screens/document/DocumentNFCMethodSelectionScreen.tsxapp/src/screens/document/aadhaar/AadhaarUploadScreen.tsxapp/src/components/Tips.tsxapp/src/screens/document/DocumentOnboardingScreen.tsxapp/src/screens/recovery/AccountRecoveryScreen.tsxapp/src/screens/document/IDPickerScreen.tsxapp/src/screens/settings/CloudBackupScreen.tsxapp/src/screens/dev/CreateMockScreen.tsxapp/src/screens/recovery/SaveRecoveryPhraseScreen.tsxapp/src/components/Disclosures.tsxapp/src/screens/document/ConfirmBelongingScreen.tsxapp/src/screens/document/CountryPickerScreen.tsxapp/src/screens/settings/ShowRecoveryPhraseScreen.tsxapp/src/screens/home/ProofHistoryScreen.tsxapp/src/screens/dev/CreateMockScreenDeepLink.tsxapp/src/screens/recovery/AccountVerifiedSuccessScreen.tsxapp/src/screens/settings/SettingsScreen.tsxapp/src/screens/system/DeferredLinkingInfoScreen.tsxapp/src/screens/home/ProofHistoryList.tsxapp/src/screens/prove/QRCodeTroubleScreen.tsxapp/src/screens/settings/ManageDocumentsScreen.tsxapp/src/screens/prove/QRCodeViewFinderScreen.tsxapp/src/components/NavBar/IdDetailsNavBar.tsxapp/src/components/NavBar/HomeNavBar.tsxapp/src/screens/system/ModalScreen.tsxapp/src/components/FeedbackModal.tsxapp/src/components/NavBar/BaseNavBar.tsxapp/src/screens/document/DocumentCameraScreen.tsxapp/src/screens/document/DocumentNFCTroubleScreen.tsxapp/src/screens/recovery/DocumentDataNotFoundScreen.tsxapp/src/layouts/SimpleScrolledTitleLayout.tsxapp/src/screens/recovery/AccountRecoveryChoiceScreen.tsxapp/src/screens/home/DisclaimerScreen.tsxapp/src/screens/document/DocumentNFCScanScreen.tsxapp/src/screens/prove/ProveScreen.tsxapp/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.tspackages/mobile-sdk-alpha/src/utils/fonts.tspackages/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.tsapp/src/screens/prove/QRCodeViewFinderScreen.tsxpackages/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.tsapp/src/screens/document/DocumentOnboardingScreen.tsxapp/src/screens/recovery/AccountRecoveryScreen.tsxpackages/mobile-sdk-alpha/src/components/buttons/SecondaryButton.tsxapp/src/screens/document/CountryPickerScreen.tsxapp/src/screens/dev/CreateMockScreenDeepLink.tsxapp/src/screens/system/DeferredLinkingInfoScreen.tsxapp/src/screens/prove/QRCodeViewFinderScreen.tsxapp/src/screens/document/DocumentCameraScreen.tsxpackages/mobile-sdk-alpha/src/components/typography/Additional.tsxpackages/mobile-sdk-alpha/src/components/screens/QRCodeScreen.tsxpackages/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.tsxapp/src/screens/document/DocumentNFCMethodSelectionScreen.tsxapp/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.tsxapp/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
packages/mobile-sdk-alpha/src/components/buttons/PrimaryButtonLongHold.web.tsx
Show resolved
Hide resolved
There was a problem hiding this 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?.titleTextandparams?.bodyTexttoReact.ReactNode, but theModalParamsinterface (line 44-45) declares both asstring. This creates a type mismatch:
- If these fields should accept only strings, remove the casts (they're unnecessary).
- If they should accept ReactNode elements, update the interface:
titleText: React.ReactNode;andbodyText: 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
📒 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.,***-***-1234for passport numbers,J*** D***for names).
Files:
app/src/screens/prove/QRCodeViewFinderScreen.tsxapp/src/screens/recovery/AccountRecoveryChoiceScreen.tsxapp/src/screens/system/DeferredLinkingInfoScreen.tsxapp/src/screens/document/aadhaar/AadhaarUploadScreen.tsxpackages/mobile-sdk-alpha/src/components/index.tsapp/src/screens/document/DocumentCameraScreen.tsxapp/src/screens/document/DocumentNFCScanScreen.web.tsxapp/src/screens/home/DisclaimerScreen.tsxapp/src/components/Tips.tsxapp/src/screens/document/DocumentOnboardingScreen.tsxapp/src/components/NavBar/BaseNavBar.tsxapp/src/screens/document/CountryPickerScreen.tsxapp/src/screens/document/DocumentNFCScanScreen.tsxapp/src/screens/system/ModalScreen.tsxapp/src/screens/home/ProofHistoryScreen.tsxapp/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.tsxapp/src/screens/recovery/AccountRecoveryChoiceScreen.tsxapp/src/screens/system/DeferredLinkingInfoScreen.tsxapp/src/screens/document/aadhaar/AadhaarUploadScreen.tsxapp/src/screens/document/DocumentCameraScreen.tsxapp/src/screens/document/DocumentNFCScanScreen.web.tsxapp/src/screens/home/DisclaimerScreen.tsxapp/src/components/Tips.tsxapp/src/screens/document/DocumentOnboardingScreen.tsxapp/src/components/NavBar/BaseNavBar.tsxapp/src/screens/document/CountryPickerScreen.tsxapp/src/screens/document/DocumentNFCScanScreen.tsxapp/src/screens/system/ModalScreen.tsxapp/src/screens/home/ProofHistoryScreen.tsxapp/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.tsxapp/src/screens/recovery/AccountRecoveryChoiceScreen.tsxapp/src/screens/system/DeferredLinkingInfoScreen.tsxapp/src/screens/document/aadhaar/AadhaarUploadScreen.tsxapp/src/screens/document/DocumentCameraScreen.tsxapp/src/screens/document/DocumentNFCScanScreen.web.tsxapp/src/screens/home/DisclaimerScreen.tsxapp/src/components/Tips.tsxapp/src/screens/document/DocumentOnboardingScreen.tsxapp/src/components/NavBar/BaseNavBar.tsxapp/src/screens/document/CountryPickerScreen.tsxapp/src/screens/document/DocumentNFCScanScreen.tsxapp/src/screens/system/ModalScreen.tsxapp/src/screens/home/ProofHistoryScreen.tsxapp/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.tsxapp/src/screens/system/DeferredLinkingInfoScreen.tsxapp/src/screens/document/DocumentCameraScreen.tsxapp/src/screens/document/DocumentNFCScanScreen.web.tsxapp/src/screens/home/DisclaimerScreen.tsxapp/src/screens/document/DocumentOnboardingScreen.tsxapp/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/componentsis 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
TextPropsto React Native'sTextPropsis appropriate for the Tamagui removal effort. TheTitlecomponent 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
styleobjects 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
fontFamilyandflexWrap(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.tsresolve to existing files and named exports.- Ensure each newly exposed component has corresponding unit or integration tests in the SDK.
There was a problem hiding this 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
prepublishOnlystill shells out throughnpm 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 theCountryFlagsmodule 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
CountryFlagsas 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
CountryFlagsdirectly 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.tsfile, 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, theslate500color constant is still imported from local utils. Since the SDK also exportsslate500in its constants (as shown inpackages/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
slate500constant 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
⛔ Files ignored due to path filters (1)
yarn.lockis 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.,***-***-1234for passport numbers,J*** D***for names).
Files:
app/src/screens/prove/ProofRequestStatusScreen.tsxpackages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsxapp/src/components/Tips.tsxapp/src/screens/prove/QRCodeTroubleScreen.tsxapp/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.tsxapp/src/components/Tips.tsxapp/src/screens/prove/QRCodeTroubleScreen.tsxapp/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.tsxapp/src/components/Tips.tsxapp/src/screens/prove/QRCodeTroubleScreen.tsxapp/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-alphaaligns 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
BodyTextto the SDK package and consolidate style props appropriately. Thegapproperty flagged in the previous review has been removed from line 244, which is correct sinceBodyTextwraps React Native'sTextcomponent that doesn't support layout properties likegap.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 / 2creates 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.
There was a problem hiding this 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: useimport typefor type-only imports.The pipeline reports that all imports in the declaration on line 5 are only used as types.
GestureResponderEvent,LayoutChangeEvent,PressableProps, andViewStyleare used exclusively as type annotations and should be imported withimport 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:
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.Line 41: The
useCallbackdependency array is missingmrzData. SincemrzDatais 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.Line 22: Using
_nfcData: anydefeats 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
anytype, define a proper NFC data interface or useunknownwith 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
blackandslate500atpackages/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 primitivesImporting
YStackfrom ‘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
slate400andslate500atpackages/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
YStackfrom'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
Descriptioncomponent correctly uses thestyleprop pattern seen across other migrated files. The same consideration regarding local vs SDK color constants applies here as mentioned inDocumentDataNotFoundScreen.tsx.app/src/screens/documents/aadhaar/AadhaarUploadScreen.tsx (1)
8-8: Incomplete Tamagui removal.Similar to
AadhaarUploadedSuccessScreen.tsx, this file still importsYStack,XStack, andImagefrom 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
styleprops 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
slate500constant 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 importingslate500from@selfxyz/mobile-sdk-alpha/constantsto 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
blackfrom@/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:
- Font and color constants: Import from SDK instead of local utils
- Caption's size prop: The component provides a
sizeprop that maps to specific fontSize values (14/15/16), but the current implementation uses fontSize: 20 directlyOption 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,slate500shown 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
TitleandDescriptioncomponents if they're not internally memoized. For better performance, extract these to constants or useStyleSheet.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
slate400frompackages/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
blackandslate500from 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
whiteis 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
TitleandBodyTextcomponents 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 usingStyleSheet.createoutside 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/colorsif 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.createor 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.ReactNodecasts are redundant since:
titleTextandbodyTextare already typed asstring(lines 44-45)- Strings are valid
React.ReactNodevaluesThese 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.ReactNodeinstead ofstring.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
⛔ Files ignored due to path filters (1)
yarn.lockis 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.,***-***-1234for passport numbers,J*** D***for names).
Files:
app/src/screens/account/recovery/AccountRecoveryChoiceScreen.tsxapp/src/screens/onboarding/DisclaimerScreen.tsxapp/src/screens/account/settings/ShowRecoveryPhraseScreen.tsxapp/src/screens/shared/ComingSoonScreen.tsxapp/src/screens/documents/scanning/DocumentCameraScreen.tsxapp/src/screens/documents/scanning/DocumentNFCMethodSelectionScreen.tsxpackages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsxapp/src/screens/app/ModalScreen.tsxapp/src/screens/verification/ProveScreen.tsxapp/src/screens/verification/QRCodeViewFinderScreen.tsxapp/src/screens/onboarding/AccountVerifiedSuccessScreen.tsxapp/src/screens/documents/selection/CountryPickerScreen.tsxapp/src/screens/documents/aadhaar/AadhaarUploadErrorScreen.tsxapp/src/screens/documents/management/DocumentDataInfoScreen.tsxapp/src/screens/app/DeferredLinkingInfoScreen.tsxapp/src/screens/app/LaunchScreen.tsxapp/src/screens/dev/CreateMockScreenDeepLink.tsxapp/src/screens/verification/ProofRequestStatusScreen.tsxapp/src/screens/documents/management/ManageDocumentsScreen.tsxapp/src/screens/documents/aadhaar/AadhaarUploadedSuccessScreen.tsxapp/src/screens/documents/selection/DocumentOnboardingScreen.tsxpackages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsxapp/src/screens/account/recovery/RecoverWithPhraseScreen.tsxapp/src/screens/home/ProofHistoryScreen.tsxapp/src/screens/account/recovery/AccountRecoveryScreen.tsxapp/src/screens/documents/aadhaar/AadhaarUploadScreen.tsxapp/src/screens/documents/selection/ConfirmBelongingScreen.tsxapp/src/screens/documents/selection/IDPickerScreen.tsxapp/src/screens/documents/scanning/DocumentNFCScanScreen.tsxapp/src/screens/documents/scanning/DocumentNFCTroubleScreen.tsxapp/src/screens/documents/scanning/DocumentCameraTroubleScreen.tsxapp/src/screens/dev/CreateMockScreen.tsxapp/src/screens/verification/QRCodeTroubleScreen.tsxapp/src/screens/account/settings/CloudBackupScreen.tsxapp/src/screens/onboarding/SaveRecoveryPhraseScreen.tsxapp/src/screens/documents/scanning/DocumentNFCScanScreen.web.tsxapp/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.tsxapp/src/screens/onboarding/DisclaimerScreen.tsxapp/src/screens/account/settings/ShowRecoveryPhraseScreen.tsxapp/src/screens/shared/ComingSoonScreen.tsxapp/src/screens/documents/scanning/DocumentCameraScreen.tsxapp/src/screens/documents/scanning/DocumentNFCMethodSelectionScreen.tsxapp/src/screens/app/ModalScreen.tsxapp/src/screens/verification/ProveScreen.tsxapp/src/screens/verification/QRCodeViewFinderScreen.tsxapp/src/screens/onboarding/AccountVerifiedSuccessScreen.tsxapp/src/screens/documents/selection/CountryPickerScreen.tsxapp/src/screens/documents/aadhaar/AadhaarUploadErrorScreen.tsxapp/src/screens/documents/management/DocumentDataInfoScreen.tsxapp/src/screens/app/DeferredLinkingInfoScreen.tsxapp/src/screens/app/LaunchScreen.tsxapp/src/screens/dev/CreateMockScreenDeepLink.tsxapp/src/screens/verification/ProofRequestStatusScreen.tsxapp/src/screens/documents/management/ManageDocumentsScreen.tsxapp/src/screens/documents/aadhaar/AadhaarUploadedSuccessScreen.tsxapp/src/screens/documents/selection/DocumentOnboardingScreen.tsxapp/src/screens/account/recovery/RecoverWithPhraseScreen.tsxapp/src/screens/home/ProofHistoryScreen.tsxapp/src/screens/account/recovery/AccountRecoveryScreen.tsxapp/src/screens/documents/aadhaar/AadhaarUploadScreen.tsxapp/src/screens/documents/selection/ConfirmBelongingScreen.tsxapp/src/screens/documents/selection/IDPickerScreen.tsxapp/src/screens/documents/scanning/DocumentNFCScanScreen.tsxapp/src/screens/documents/scanning/DocumentNFCTroubleScreen.tsxapp/src/screens/documents/scanning/DocumentCameraTroubleScreen.tsxapp/src/screens/dev/CreateMockScreen.tsxapp/src/screens/verification/QRCodeTroubleScreen.tsxapp/src/screens/account/settings/CloudBackupScreen.tsxapp/src/screens/onboarding/SaveRecoveryPhraseScreen.tsxapp/src/screens/documents/scanning/DocumentNFCScanScreen.web.tsxapp/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.tsxapp/src/screens/onboarding/DisclaimerScreen.tsxapp/src/screens/account/settings/ShowRecoveryPhraseScreen.tsxapp/src/screens/shared/ComingSoonScreen.tsxapp/src/screens/documents/scanning/DocumentCameraScreen.tsxapp/src/screens/documents/scanning/DocumentNFCMethodSelectionScreen.tsxapp/src/screens/app/ModalScreen.tsxapp/src/screens/verification/ProveScreen.tsxapp/src/screens/verification/QRCodeViewFinderScreen.tsxapp/src/screens/onboarding/AccountVerifiedSuccessScreen.tsxapp/src/screens/documents/selection/CountryPickerScreen.tsxapp/src/screens/documents/aadhaar/AadhaarUploadErrorScreen.tsxapp/src/screens/documents/management/DocumentDataInfoScreen.tsxapp/src/screens/app/DeferredLinkingInfoScreen.tsxapp/src/screens/app/LaunchScreen.tsxapp/src/screens/dev/CreateMockScreenDeepLink.tsxapp/src/screens/verification/ProofRequestStatusScreen.tsxapp/src/screens/documents/management/ManageDocumentsScreen.tsxapp/src/screens/documents/aadhaar/AadhaarUploadedSuccessScreen.tsxapp/src/screens/documents/selection/DocumentOnboardingScreen.tsxapp/src/screens/account/recovery/RecoverWithPhraseScreen.tsxapp/src/screens/home/ProofHistoryScreen.tsxapp/src/screens/account/recovery/AccountRecoveryScreen.tsxapp/src/screens/documents/aadhaar/AadhaarUploadScreen.tsxapp/src/screens/documents/selection/ConfirmBelongingScreen.tsxapp/src/screens/documents/selection/IDPickerScreen.tsxapp/src/screens/documents/scanning/DocumentNFCScanScreen.tsxapp/src/screens/documents/scanning/DocumentNFCTroubleScreen.tsxapp/src/screens/documents/scanning/DocumentCameraTroubleScreen.tsxapp/src/screens/dev/CreateMockScreen.tsxapp/src/screens/verification/QRCodeTroubleScreen.tsxapp/src/screens/account/settings/CloudBackupScreen.tsxapp/src/screens/onboarding/SaveRecoveryPhraseScreen.tsxapp/src/screens/documents/scanning/DocumentNFCScanScreen.web.tsxapp/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.tsxpackages/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.tsxpackages/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.tsxapp/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.tsxapp/src/screens/verification/QRCodeViewFinderScreen.tsxapp/src/screens/onboarding/AccountVerifiedSuccessScreen.tsxapp/src/screens/dev/CreateMockScreenDeepLink.tsxapp/src/screens/verification/ProofRequestStatusScreen.tsxapp/src/screens/documents/selection/DocumentOnboardingScreen.tsxapp/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.tsxapp/src/screens/verification/QRCodeViewFinderScreen.tsxapp/src/screens/documents/aadhaar/AadhaarUploadedSuccessScreen.tsxapp/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.tsxapp/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: VerifiedDescriptionis 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 toselfClient.trackEventaligns with the SDK approach and is correctly implemented. ThehandlePressmethod properly:
- Parses and cleans the event name (removing category prefix)
- Tracks the event via the new SDK client
- Preserves the original
onPresscallback behaviorBased on learnings: Previous feedback noted AbstractButton used the legacy analytics system; this change modernizes it to use the Self SDK's
trackEventAPI.
69-88: Verify press interaction UX across platforms.The functional style prop correctly applies
pressedStyleonly whenanimatedComponentis absent. However, ensure that:
- The
pressedstate provides adequate visual feedback on both iOS and Android- The
animatedComponentpath (when present) has its own press feedback mechanismTest 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 includessize?: 'small' | 'large'; usingsize="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 scopeThe 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
PrimaryButtonandSecondaryButtoninherit the optionaltrackEventprop fromButtonPropsviaAbstractButton.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
gapproperty 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
styleobjects 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) declarestyle?: StyleProp<…>, andButtonPropsextendsPressableProps, soPrimaryButtonandSecondaryButtonalso accept and forward astyleprop.app/src/screens/shared/ComingSoonScreen.tsx (1)
6-6: Replace Tamagui layout imports in ComingSoonScreen.tsx
XStack/YStackstill imported from Tamagui; no equivalents found in the SDK—switch to React NativeViewor confirm and import the correct SDK layout components.app/src/screens/onboarding/AccountVerifiedSuccessScreen.tsx (1)
10-14: SDK component API compatibility confirmed. TitleProps supportssize="large", DescriptionProps accepts children, and PrimaryButton’s ButtonProps includetrackEventand inheritonPressfrom PressableProps.packages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsx (1)
6-6: LGTM: Import consolidation aligns with Tamagui removal.The change to import
Viewfromreact-nativeinstead 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/componentsaligns 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/colorscentralizes 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 acceptstyleand children, and PrimaryButton forwards bothstyleandtrackEventthrough 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/componentsaligns 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
textAlignprop tostyle={{ 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/componentsfor 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 tostyle={{ 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, andTitleto 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/componentsis consistent with the broader refactor pattern.app/src/screens/documents/scanning/DocumentNFCTroubleScreen.tsx (3)
10-10: LGTM: SDK component imports consolidated.The migration of
CaptionandSecondaryButtonto@selfxyz/mobile-sdk-alpha/componentsis clean and consistent with the broader refactor.
98-98: Style prop usage is consistent with migration pattern.The change from
colorprop tostyle={{ 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/componentsaligns with the PR objective to move components to the SDK package.
26-26: Confirmed style prop support onTitleandDescription. Both components extend React Native’sTextProps(includingstyle?: 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.
There was a problem hiding this 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
trackEventparameter 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
⛔ Files ignored due to path filters (2)
app/Gemfile.lockis excluded by!**/*.lockapp/ios/Podfile.lockis 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.tsxpackages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsxpackages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsxpackages/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.,***-***-1234for passport numbers,J*** D***for names).
Files:
packages/mobile-sdk-alpha/src/components/typography/DescriptionTitle.tsxpackages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsxpackages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsxpackages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsxapp/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.tsxpackages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsxpackages/mobile-sdk-alpha/src/components/flag/RoundFlag.tsxpackages/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.cjsapp/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.cjsapp/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
ButtonwithPressableis properly implemented, including:
- Press state handling via the functional style prop
- Conditional
pressedStyleapplication 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 thattrackEvent(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.errorappears 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 / 2correctly 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 yourCountryFlagsRecordactually uses mixed-case keys.app/jest.config.cjs (1)
9-9: LGTM!The addition of
react-native-svgandreact-native-svg-circle-country-flagsto the ignore patterns correctly aligns with the mocks defined inapp/jest.setup.jsand prevents Jest from attempting to transform native SVG modules.
packages/mobile-sdk-alpha/src/components/typography/DescriptionTitle.tsx
Show resolved
Hide resolved
| "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", |
There was a problem hiding this comment.
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={{ |
There was a problem hiding this comment.
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. | |||
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
There was a problem hiding this 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 usingpath.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
⛔ Files ignored due to path filters (3)
packages/mobile-sdk-alpha/assets/fonts/Advercase-Regular.otfis excluded by!**/*.otfpackages/mobile-sdk-alpha/assets/fonts/DINOT-Medium.otfis excluded by!**/*.otfpackages/mobile-sdk-alpha/assets/fonts/IBMPlexMono-Regular.otfis 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
There was a problem hiding this 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: dinotpattern 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 theslate400constant 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 definesfonts.tsandconstants/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/fontsand@/utils/colorsto ensure a single source of truth.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 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.,***-***-1234for passport numbers,J*** D***for names).
Files:
app/src/components/homeScreen/idCard.tsxapp/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.tsxapp/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.tsxapp/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
slate400is good practice for maintainability. However, the color value changed from#9193A2to#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.
|
will merge this pull request after releasing a new build; later on today |
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
Style
Refactor
Chores