-
Notifications
You must be signed in to change notification settings - Fork 180
remove lazy loading #1018
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
remove lazy loading #1018
Conversation
WalkthroughRemoved the lazy-loading helper and React.lazy usage across navigation modules, deleted Suspense fallback, added platform SvgXml and Blur web mocks/wrappers, updated many import paths to new @selfxyz/common public subpaths, introduced a composite CI caching action and workflow changes, adjusted tooling/configs and dependencies (Vite, Jest, ESLint, package.json, .nvmrc). Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant App
participant Navigation
participant Suspense as Suspense (old)
participant Lazy as LazyScreen
Note over App,Suspense: Old flow (lazy + Suspense)
User->>App: Open app
App->>Suspense: Render Navigation inside Suspense
Navigation->>Lazy: First visit → dynamic import()
Lazy-->>Navigation: Async module resolved
Suspense-->>User: Show fallback UI until ready
Navigation-->>User: Render loaded screen
sequenceDiagram
autonumber
actor User
participant App
participant Navigation
participant Screen as StaticScreen
Note over App,Screen: New flow (eager imports)
User->>App: Open app
App->>Navigation: Render directly (no Suspense)
Navigation->>Screen: Use already-imported component
Screen-->>User: Immediate render
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks (3 passed)✅ Passed checks (3 passed)
✨ Finishing Touches
🧪 Generate unit tests
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: 0
🧹 Nitpick comments (4)
app/src/navigation/aesop.ts (1)
9-9: Avoid eager-evaluating Aesop screen when redesign is offStatic import always evaluates the module at startup, even if
shouldShowAesopRedesign()returns false. This can hurt cold start on low-end devices. Defer evaluation by requiring the screen only when the redesign is enabled.Apply this diff to gate evaluation without re-introducing React.lazy:
-import DocumentOnboardingScreen from '@/screens/aesop/DocumentOnboardingScreen'; +// Defer evaluation to runtime when the redesign is enabledAnd update the screen reference:
- screen: DocumentOnboardingScreen, + screen: require('@/screens/aesop/DocumentOnboardingScreen').default,If you prefer to keep imports at top-level, please at least verify cold-start/TTI did not regress.
Also applies to: 12-26
app/src/navigation/document.ts (1)
7-13: Heavy document/NFC flows now evaluated at startupCamera/NFC screens tend to pull large deps. Static imports will evaluate these on app launch, which can regress cold start and memory. Prefer deferring evaluation with inline
requirewhere defined in the screens map (no Suspense needed).Apply this diff to defer evaluation:
- import DocumentCameraScreen from '@/screens/document/DocumentCameraScreen'; - import DocumentCameraTroubleScreen from '@/screens/document/DocumentCameraTroubleScreen'; - import DocumentNFCMethodSelectionScreen from '@/screens/document/DocumentNFCMethodSelectionScreen'; - import DocumentNFCScanScreen from '@/screens/document/DocumentNFCScanScreen'; - import DocumentNFCTroubleScreen from '@/screens/document/DocumentNFCTroubleScreen'; - import DocumentOnboardingScreen from '@/screens/document/DocumentOnboardingScreen'; - import UnsupportedDocumentScreen from '@/screens/document/UnsupportedDocumentScreen'; + // Defer screen module evaluation to when they are actually usedThen update screen refs (outside this hunk), e.g.:
- screen: DocumentCameraScreen, + screen: require('@/screens/document/DocumentCameraScreen').default,Repeat for each document screen.
Please measure cold start on a low-end Android device before/after this PR.
app/src/navigation/prove.ts (1)
7-11: Avoid cold-start regression: heavy screens now eagerly imported (esp. impactful on Web).ProveScreen (socket.io, proof stack) and QR scanner screens likely pull in heavy deps. Eager imports increase initial JS parse/TTI, particularly for Web where you previously benefitted from chunking. Consider Web-only code-splitting that doesn’t require Suspense (e.g., @loadable/component), keeping Native as static.
Example patch (Web-only splitting for the heaviest screens):
import type { NativeStackNavigationOptions } from '@react-navigation/native-stack'; +import { Platform } from 'react-native'; +import loadable from '@loadable/component'; -import ProveScreen from '@/screens/prove/ProveScreen'; -import QRCodeTroubleScreen from '@/screens/prove/QRCodeTroubleScreen'; -import QRCodeViewFinderScreen from '@/screens/prove/QRCodeViewFinderScreen'; +const ProveScreen = + Platform.OS === 'web' + ? loadable(() => import('@/screens/prove/ProveScreen')) + : require('@/screens/prove/ProveScreen').default; +const QRCodeTroubleScreen = + Platform.OS === 'web' + ? loadable(() => import('@/screens/prove/QRCodeTroubleScreen')) + : require('@/screens/prove/QRCodeTroubleScreen').default; +const QRCodeViewFinderScreen = + Platform.OS === 'web' + ? loadable(() => import('@/screens/prove/QRCodeViewFinderScreen')) + : require('@/screens/prove/QRCodeViewFinderScreen').default;app/src/navigation/recovery.web.ts (1)
7-7: Keep Web bundle lean: reintroduce code-splitting without Suspense.This screen is rarely hit; static import inflates initial Web bundle. Use @loadable/component here to preserve chunking while keeping Native static elsewhere.
-import DocumentDataNotFound from '@/screens/recovery/DocumentDataNotFoundScreen'; +import loadable from '@loadable/component'; +const DocumentDataNotFound = loadable( + () => import('@/screens/recovery/DocumentDataNotFoundScreen') +);
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
app/src/navigation/aesop.ts(1 hunks)app/src/navigation/devTools.ts(1 hunks)app/src/navigation/document.ts(1 hunks)app/src/navigation/home.ts(1 hunks)app/src/navigation/index.tsx(2 hunks)app/src/navigation/lazyWithPreload.ts(0 hunks)app/src/navigation/prove.ts(1 hunks)app/src/navigation/recovery.ts(1 hunks)app/src/navigation/recovery.web.ts(1 hunks)app/src/navigation/settings.ts(1 hunks)app/src/navigation/settings.web.ts(1 hunks)app/src/navigation/system.tsx(1 hunks)
💤 Files with no reviewable changes (1)
- app/src/navigation/lazyWithPreload.ts
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/technical-specification.mdc)
**/*.{ts,tsx}: Define IdentityCommitment with fields: commitment (Poseidon hash), nullifier (domain-separated), timestamp (UTC number), version (circuit version), documentType ('passport' | 'eu_id_card')
Define DSCKeyCommitment with fields: publicKeyHash (Poseidon hash), certificateChain (hashes), revocationStatus (boolean), issuer (country code)
Define VerificationConfig with fields: circuitVersion (semver), complianceRules array, timeWindow (seconds, 24h), clockDrift (±5 min), trustAnchors, revocationRoots, timeSource (NTP), nullifierScope (domain separation)
Files:
app/src/navigation/aesop.tsapp/src/navigation/index.tsxapp/src/navigation/document.tsapp/src/navigation/settings.web.tsapp/src/navigation/prove.tsapp/src/navigation/home.tsapp/src/navigation/devTools.tsapp/src/navigation/system.tsxapp/src/navigation/settings.tsapp/src/navigation/recovery.tsapp/src/navigation/recovery.web.ts
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/navigation/aesop.tsapp/src/navigation/index.tsxapp/src/navigation/document.tsapp/src/navigation/settings.web.tsapp/src/navigation/prove.tsapp/src/navigation/home.tsapp/src/navigation/devTools.tsapp/src/navigation/system.tsxapp/src/navigation/settings.tsapp/src/navigation/recovery.tsapp/src/navigation/recovery.web.ts
🧠 Learnings (9)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens using React.lazy()
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/navigation/**/*.{ts,tsx} : Use react-navigation/native with createStaticNavigation for type-safe navigation
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens and components to improve performance
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens and components to improve performance
Applied to files:
app/src/navigation/aesop.tsapp/src/navigation/document.tsapp/src/navigation/settings.web.tsapp/src/navigation/prove.tsapp/src/navigation/home.tsapp/src/navigation/devTools.tsapp/src/navigation/system.tsxapp/src/navigation/settings.tsapp/src/navigation/recovery.tsapp/src/navigation/recovery.web.ts
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens using React.lazy()
Applied to files:
app/src/navigation/aesop.tsapp/src/navigation/index.tsxapp/src/navigation/document.tsapp/src/navigation/settings.web.tsapp/src/navigation/prove.tsapp/src/navigation/home.tsapp/src/navigation/devTools.tsapp/src/navigation/system.tsxapp/src/navigation/settings.tsapp/src/navigation/recovery.tsapp/src/navigation/recovery.web.ts
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/navigation/**/*.{ts,tsx} : Use react-navigation/native with createStaticNavigation for type-safe navigation
Applied to files:
app/src/navigation/aesop.tsapp/src/navigation/index.tsxapp/src/navigation/document.tsapp/src/navigation/settings.web.tsapp/src/navigation/prove.tsapp/src/navigation/home.tsapp/src/navigation/devTools.tsapp/src/navigation/system.tsxapp/src/navigation/settings.tsapp/src/navigation/recovery.tsapp/src/navigation/recovery.web.ts
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/navigation/**/*.{ts,tsx} : Set platform-specific initial routes: web → Home, mobile → Splash
Applied to files:
app/src/navigation/index.tsxapp/src/navigation/home.tsapp/src/navigation/devTools.tsapp/src/navigation/system.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: The main App.tsx file is located at app/App.tsx (not in app/src), and it properly wraps the entire app with SelfClientProvider at the top of the provider hierarchy, enabling useSelfClient() hook usage throughout all navigation screens.
Applied to files:
app/src/navigation/index.tsx
📚 Learning: 2025-08-29T15:30:12.210Z
Learnt from: CR
PR: selfxyz/self#0
File: app/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:12.210Z
Learning: Document complex native module changes for AI review
Applied to files:
app/src/navigation/document.ts
📚 Learning: 2025-08-23T02:02:02.556Z
Learnt from: transphorm
PR: selfxyz/self#942
File: app/vite.config.ts:170-0
Timestamp: 2025-08-23T02:02:02.556Z
Learning: In the selfxyz/self React Native app, devTools from '@/navigation/devTools' are intentionally shipped to production builds for testing purposes, not excluded as is typical in most applications.
Applied to files:
app/src/navigation/devTools.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}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests
Applied to files:
app/src/navigation/devTools.ts
🧬 Code graph analysis (1)
app/src/navigation/prove.ts (1)
app/src/screens/ProveScreen.tsx (3)
generatingProof(21-247)key(200-209)result(83-108)
⏰ 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-android
- GitHub Check: build-ios
- GitHub Check: test
- GitHub Check: build-ios
- GitHub Check: e2e-ios
- GitHub Check: analyze-ios
- GitHub Check: analyze-android
🔇 Additional comments (8)
app/src/navigation/settings.web.ts (1)
7-9: Web bundle size/TTI risk after removing dynamic importsStatic imports will pull these screens into the main web chunk, potentially regressing TTI. If the removal of lazy loading was to address build issues, please validate that web performance remains acceptable (LCP/TTI) and consider route-level code splitting at the bundler layer if needed.
app/src/navigation/devTools.ts (1)
7-12: Restrict production access to dev tools screens
Ensure all devTools routes are gated by__DEV__or a feature flag to prevent production access:
- Wrap the imports and
devScreensexport in app/src/navigation/devTools.ts in anif (__DEV__)or equivalent guard.- Remove or guard the deep link entry for
MockDataDeepLinkin app/src/utils/deeplinks.ts (line 158).- Guard calls to
navigation.navigate('CreateMock')in ManageDocumentsScreen.tsx (line 289) and DevSettingsScreen.tsx (lines 302, 351).⛔ Skipped due to learnings
Learnt from: transphorm PR: selfxyz/self#942 File: app/vite.config.ts:170-0 Timestamp: 2025-08-23T02:02:02.556Z Learning: In the selfxyz/self React Native app, devTools from '@/navigation/devTools' are intentionally shipped to production builds for testing purposes, not excluded as is typical in most applications.Learnt from: CR PR: selfxyz/self#0 File: .cursorrules:0-0 Timestamp: 2025-08-24T18:52:25.796Z Learning: Organize screens by feature modules (passport, home, settings, etc.)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)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 mocksLearnt from: CR PR: selfxyz/self#0 File: .cursorrules:0-0 Timestamp: 2025-08-24T18:52:25.796Z Learning: Applies to jest.setup.js : Maintain comprehensive mocks in jest.setup.js for all native modulesapp/src/navigation/settings.ts (1)
7-11: Eager-loading settings stack—confirm no heavy module side effectsBringing all settings screens into the startup path can increase eval time if any of these modules do expensive work at import time (I/O, crypto, large JSON). Ensure these screens perform initialization inside effects/handlers, not at module top-level.
app/src/navigation/index.tsx (1)
5-6: All lazy/Suspense usage removed — Verified noReact.lazy,<Suspense>, orlazyWithPreloadreferences remain in the codebase; no further action needed.app/src/navigation/system.tsx (1)
9-13: LGTM on eager system screensSystem screens are lightweight and safe to eager-load; header usage with SystemBars remains correct.
app/src/navigation/home.ts (1)
8-11: Home stack static imports look fineCore home views are frequently visited; eager-loading is reasonable here.
app/src/navigation/prove.ts (1)
1-12: Confirm no lazy/Suspense remains
No occurrences of React.lazy , lazy() , or found in app/src.app/src/navigation/recovery.ts (1)
7-12: LGTM for Native.Static imports on Native are acceptable since Metro doesn’t provide meaningful runtime code-splitting; navigation config remains consistent.
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
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/jest.config.cjs(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
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
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens using React.lazy()
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/navigation/**/*.{ts,tsx} : Use react-navigation/native with createStaticNavigation for type-safe navigation
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens and components to improve performance
📚 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-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-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to tests/src/**/*.{ts,tsx,js,jsx} : Use tests/ alias for test imports
Applied to files:
app/jest.config.cjs
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Do NOT mock selfxyz/mobile-sdk-alpha in tests (avoid jest.mock('selfxyz/mobile-sdk-alpha') and replacing real functions with mocks)
Applied to files:
app/jest.config.cjs
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to jest.setup.js : Maintain comprehensive mocks in jest.setup.js for all native modules
Applied to files:
app/jest.config.cjs
⏰ 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-android
- GitHub Check: test
- GitHub Check: build-ios
- GitHub Check: analyze-ios
- GitHub Check: analyze-android
- GitHub Check: e2e-ios
🔇 Additional comments (1)
app/jest.config.cjs (1)
6-7: Jest preset and path aliases look correctreact-native preset is set, and '@/…' plus '@tests/…' mappings match our guidelines. No action needed.
Also applies to: 16-19
|
update the base to dev |
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
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
.github/workflows/web.yml(1 hunks)app/src/components/homeScreen/SvgXmlWrapper.tsx(1 hunks)app/src/components/homeScreen/idCard.tsx(1 hunks)app/src/mocks/react-native-community-blur.ts(1 hunks)app/src/mocks/react-native-svg.ts(1 hunks)app/src/navigation/home.ts(1 hunks)app/src/navigation/index.tsx(2 hunks)app/src/screens/home/HomeScreen.tsx(1 hunks)app/src/screens/home/IdDetailsScreen.tsx(1 hunks)app/vite.config.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- app/src/navigation/index.tsx
- app/src/navigation/home.ts
🧰 Additional context used
📓 Path-based instructions (3)
.github/workflows/**/*.{yml,yaml}
📄 CodeRabbit inference engine (AGENTS.md)
.github/workflows/**/*.{yml,yaml}: In GitHub Actions workflows, use shared composite caching actions from .github/actions (cache-yarn, cache-bundler, cache-gradle, cache-pods)
Do not call actions/cache directly; rely on the shared composite caching actions
When using cache actions, optionally pass cache-version (often with GH_CACHE_VERSION and tool version) for stable keys
Files:
.github/workflows/web.yml
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/technical-specification.mdc)
**/*.{ts,tsx}: Define IdentityCommitment with fields: commitment (Poseidon hash), nullifier (domain-separated), timestamp (UTC number), version (circuit version), documentType ('passport' | 'eu_id_card')
Define DSCKeyCommitment with fields: publicKeyHash (Poseidon hash), certificateChain (hashes), revocationStatus (boolean), issuer (country code)
Define VerificationConfig with fields: circuitVersion (semver), complianceRules array, timeWindow (seconds, 24h), clockDrift (±5 min), trustAnchors, revocationRoots, timeSource (NTP), nullifierScope (domain separation)
Files:
app/src/components/homeScreen/SvgXmlWrapper.tsxapp/vite.config.tsapp/src/screens/home/IdDetailsScreen.tsxapp/src/screens/home/HomeScreen.tsxapp/src/mocks/react-native-community-blur.tsapp/src/mocks/react-native-svg.tsapp/src/components/homeScreen/idCard.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/SvgXmlWrapper.tsxapp/src/screens/home/IdDetailsScreen.tsxapp/src/screens/home/HomeScreen.tsxapp/src/mocks/react-native-community-blur.tsapp/src/mocks/react-native-svg.tsapp/src/components/homeScreen/idCard.tsx
🧠 Learnings (18)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/navigation/**/*.{ts,tsx} : Use react-navigation/native with createStaticNavigation for type-safe navigation
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens using React.lazy()
📚 Learning: 2025-08-29T15:30:12.210Z
Learnt from: CR
PR: selfxyz/self#0
File: app/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:12.210Z
Learning: Verify Web build succeeds via yarn web
Applied to files:
.github/workflows/web.yml
📚 Learning: 2025-08-29T15:29:47.727Z
Learnt from: CR
PR: selfxyz/self#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:29:47.727Z
Learning: Before PRs, ensure yarn build succeeds for all workspaces
Applied to files:
.github/workflows/web.yml
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Use yarn scripts: yarn ios/android for builds, yarn test for unit tests, and Fastlane for deployments
Applied to files:
.github/workflows/web.yml
📚 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 : Expose a 'test:build' script in the SDK's package.json that runs build, test, types, and lint
Applied to files:
.github/workflows/web.yml
📚 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/vite.config.tsapp/src/mocks/react-native-svg.ts
📚 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/vite.config.ts
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to tests/src/**/*.{ts,tsx,js,jsx} : Use tests/ alias for test imports
Applied to files:
app/vite.config.ts
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/*.{ts,tsx,js,jsx} : Use @/ alias for src imports
Applied to files:
app/vite.config.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}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests
Applied to files:
app/vite.config.tsapp/src/screens/home/HomeScreen.tsxapp/src/components/homeScreen/idCard.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/home/IdDetailsScreen.tsxapp/src/screens/home/HomeScreen.tsxapp/src/components/homeScreen/idCard.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: The main App.tsx file is located at app/App.tsx (not in app/src), and it properly wraps the entire app with SelfClientProvider at the top of the provider hierarchy, enabling useSelfClient() hook usage throughout all navigation screens.
Applied to files:
app/src/screens/home/HomeScreen.tsx
📚 Learning: 2025-08-29T15:30:12.210Z
Learnt from: CR
PR: selfxyz/self#0
File: app/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:12.210Z
Learning: Document complex native module changes for AI review
Applied to files:
app/src/screens/home/HomeScreen.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/home/HomeScreen.tsxapp/src/components/homeScreen/idCard.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/home/HomeScreen.tsx
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/navigation/**/*.{ts,tsx} : Use react-navigation/native with createStaticNavigation for type-safe navigation
Applied to files:
app/src/screens/home/HomeScreen.tsx
📚 Learning: 2025-08-23T02:02:02.556Z
Learnt from: transphorm
PR: selfxyz/self#942
File: app/vite.config.ts:170-0
Timestamp: 2025-08-23T02:02:02.556Z
Learning: In the selfxyz/self React Native app, devTools from '@/navigation/devTools' are intentionally shipped to production builds for testing purposes, not excluded as is typical in most applications.
Applied to files:
app/src/screens/home/HomeScreen.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}} : Verify extractMRZInfo() using published sample MRZ strings (e.g., ICAO examples)
Applied to files:
app/src/components/homeScreen/idCard.tsx
🧬 Code graph analysis (1)
app/src/components/homeScreen/SvgXmlWrapper.tsx (1)
app/src/mocks/react-native-svg.ts (1)
SvgXml(45-65)
🪛 ast-grep (0.38.6)
app/src/components/homeScreen/SvgXmlWrapper.tsx
[warning] 27-27: Usage of dangerouslySetInnerHTML detected. This bypasses React's built-in XSS protection. Always sanitize HTML content using libraries like DOMPurify before injecting it into the DOM to prevent XSS attacks.
Context: dangerouslySetInnerHTML
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation [REFERENCES]
- https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml
- https://cwe.mitre.org/data/definitions/79.html
(react-unsafe-html-injection)
🪛 Biome (2.1.2)
app/src/mocks/react-native-svg.ts
[error] 13-14: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 22-23: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
🪛 GitHub Actions: Common CI
app/src/mocks/react-native-svg.ts
[error] 14-14: Command 'yarn types' failed. TS2448: Block-scoped variable 'SvgXml' used before its declaration.
⏰ 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-android
- GitHub Check: build-ios
- GitHub Check: test
- GitHub Check: analyze-ios
- GitHub Check: analyze-android
- GitHub Check: e2e-ios
🔇 Additional comments (5)
.github/workflows/web.yml (1)
25-25: Verified web:build script and Vite root configuration
No changes needed.app/src/screens/home/IdDetailsScreen.tsx (1)
13-13: Import path change looks correct.Switching
DocumentCatalogto@selfxyz/common/utils/typesaligns with the public API and should avoid deep import fragility. No runtime impact.app/vite.config.ts (1)
37-40: Align Jest/TS path mapping for the blur alias.Vite alias resolves builds, but tests/type-checkers may still resolve
@react-native-community/blurto the native module. Add equivalent mappings inapp/jest.config.cjs(moduleNameMapper) and, if needed,tsconfig.web.jsonpaths to prevent test/type drift.app/src/screens/home/HomeScreen.tsx (1)
15-16: Public API imports look good.Type-only import path updates reduce reliance on deep ESM paths; no runtime changes.
app/src/components/homeScreen/idCard.tsx (1)
18-19: Confirm SVG XML sources remain static-only.This screen uses a hardcoded
logoSvg, which is safe. Please ensure any futureSvgXmlusages in this component (and elsewhere) only render trusted, static XML. If dynamic/user-provided SVG becomes necessary, adopt the sanitized web wrapper as recommended.Also applies to: 195-200
| return createElement('div', { | ||
| ref, | ||
| style: { | ||
| width: width || 'auto', | ||
| height: height || 'auto', | ||
| display: 'inline-block', | ||
| ...style, | ||
| }, | ||
| dangerouslySetInnerHTML: { __html: xml }, | ||
| ...props, | ||
| }); | ||
| } |
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.
🛠️ Refactor suggestion
XSS risk: dangerouslySetInnerHTML with untrusted SVG.
Rendering raw XML with dangerouslySetInnerHTML is exploitable if any xml originates outside of trusted, static strings. Mitigate by sanitizing on web and isolating web/native via platform files to keep mobile builds clean.
Recommended approach:
- Split into platform files to safely import a sanitizer only on web.
- Sanitize with DOMPurify on web.
Add these files:
SvgXmlWrapper.web.tsx
// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc.
// SPDX-License-Identifier: BUSL-1.1
import React, { createElement, forwardRef } from 'react';
import DOMPurify from 'dompurify';
type Props = {
xml: string;
width?: number;
height?: number;
style?: React.CSSProperties;
} & React.HTMLAttributes<HTMLDivElement>;
export const SvgXml = forwardRef<HTMLDivElement, Props>(({ xml, width, height, style, ...props }, ref) => {
const safe = DOMPurify.sanitize(xml, { USE_PROFILES: { svg: true, svgFilters: true } });
return createElement('div', {
ref,
style: { width: width || 'auto', height: height || 'auto', display: 'inline-block', ...style },
dangerouslySetInnerHTML: { __html: safe },
...props,
});
});
SvgXml.displayName = 'SvgXml';
export default SvgXml;SvgXmlWrapper.native.tsx
// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc.
// SPDX-License-Identifier: BUSL-1.1
import React, { forwardRef } from 'react';
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { SvgXml: RNSvgXml } = require('react-native-svg');
type Props = {
xml: string;
width?: number;
height?: number;
style?: unknown;
};
export const SvgXml = forwardRef<any, Props>((p, ref) => <RNSvgXml ref={ref} {...p} />);
SvgXml.displayName = 'SvgXml';
export default SvgXml;Also add dompurify to web workspace devDeps and map @/components/homeScreen/SvgXmlWrapper imports to these platform files automatically.
Happy to open a PR commit adding the files and dependency.
🧰 Tools
🪛 ast-grep (0.38.6)
[warning] 27-27: Usage of dangerouslySetInnerHTML detected. This bypasses React's built-in XSS protection. Always sanitize HTML content using libraries like DOMPurify before injecting it into the DOM to prevent XSS attacks.
Context: dangerouslySetInnerHTML
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation [REFERENCES]
- https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml
- https://cwe.mitre.org/data/definitions/79.html
(react-unsafe-html-injection)
🤖 Prompt for AI Agents
In app/src/components/homeScreen/SvgXmlWrapper.tsx around lines 20-31 the code
uses dangerouslySetInnerHTML with raw xml (XSS risk). Replace this single
platform file with two platform-specific files: SvgXmlWrapper.web.tsx — import
DOMPurify, sanitize the xml (use profiles for svg/svgFilters) and render with
dangerouslySetInnerHTML using the sanitized string; SvgXmlWrapper.native.tsx —
re-export/forward to react-native-svg's SvgXml (no DOMPurify) to keep mobile
bundle clean. Add dompurify to the web workspace devDeps and ensure module
resolution maps imports of "@/components/homeScreen/SvgXmlWrapper" to the
platform files so existing imports remain unchanged.
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 (1)
.github/workflows/mobile-ci.yml (1)
231-236: Bundler cache path mismatch; gems won’t be restored.Cache points to app/ios/vendor/bundle but Bundler installs to app/vendor/bundle. Fix to ensure cache hits.
Apply:
- - name: Cache Ruby gems - uses: ./.github/actions/cache-bundler - with: - path: app/ios/vendor/bundle + - name: Cache Ruby gems + uses: ./.github/actions/cache-bundler + with: + path: app/vendor/bundle lock-file: app/Gemfile.lock cache-version: ${{ env.GH_CACHE_VERSION }}-${{ env.GH_GEMS_CACHE_VERSION }}-ruby${{ env.RUBY_VERSION }}No change needed to:
bundle config set --local path 'vendor/bundle'which resolves to app/vendor/bundle.
Also applies to: 287-291
🧹 Nitpick comments (2)
.github/workflows/mobile-ci.yml (2)
74-81: Replace direct actions/cache calls with internal composite actions for policy compliance.House rule is to use .github/actions caching composites. Please wrap built-deps, Xcode, and NDK caches in composites (e.g., cache-built-deps, cache-xcode, cache-ndk) and reference those instead of actions/cache directly.
I can draft minimal composite actions for built-deps, Xcode build/index, and NDK to drop in under .github/actions/.
Also applies to: 88-94, 142-149, 155-162, 245-255, 256-262, 415-419
105-105: Run tests on Ubuntu runners to cut cost/queue time.Jest/unit tests don’t need macOS; switching to ubuntu-latest usually halves cost and speeds up CI.
- test: - runs-on: macos-latest-large + test: + runs-on: ubuntu-latest
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/mobile-ci.yml(1 hunks)app/src/mocks/react-native-svg.ts(1 hunks)app/tests/src/navigation.test.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- app/src/mocks/react-native-svg.ts
🧰 Additional context used
📓 Path-based instructions (3)
.github/workflows/**/*.{yml,yaml}
📄 CodeRabbit inference engine (AGENTS.md)
.github/workflows/**/*.{yml,yaml}: In GitHub Actions workflows, use shared composite caching actions from .github/actions (cache-yarn, cache-bundler, cache-gradle, cache-pods)
Do not call actions/cache directly; rely on the shared composite caching actions
When using cache actions, optionally pass cache-version (often with GH_CACHE_VERSION and tool version) for stable keys
Files:
.github/workflows/mobile-ci.yml
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/technical-specification.mdc)
**/*.{ts,tsx}: Define IdentityCommitment with fields: commitment (Poseidon hash), nullifier (domain-separated), timestamp (UTC number), version (circuit version), documentType ('passport' | 'eu_id_card')
Define DSCKeyCommitment with fields: publicKeyHash (Poseidon hash), certificateChain (hashes), revocationStatus (boolean), issuer (country code)
Define VerificationConfig with fields: circuitVersion (semver), complianceRules array, timeWindow (seconds, 24h), clockDrift (±5 min), trustAnchors, revocationRoots, timeSource (NTP), nullifierScope (domain separation)
Files:
app/tests/src/navigation.test.ts
**/*.{test,spec}.{ts,js,tsx,jsx}
⚙️ CodeRabbit configuration file
**/*.{test,spec}.{ts,js,tsx,jsx}: Review test files for:
- Test coverage completeness
- Test case quality and edge cases
- Mock usage appropriateness
- Test readability and maintainability
Files:
app/tests/src/navigation.test.ts
🧠 Learnings (12)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens using React.lazy()
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/navigation/**/*.{ts,tsx} : Use react-navigation/native with createStaticNavigation for type-safe navigation
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Use yarn scripts: yarn ios/android for builds, yarn test for unit tests, and Fastlane for deployments
Applied to files:
.github/workflows/mobile-ci.yml
📚 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 : Expose a 'test:build' script in the SDK's package.json that runs build, test, types, and lint
Applied to files:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-29T15:30:12.210Z
Learnt from: CR
PR: selfxyz/self#0
File: app/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:12.210Z
Learning: After review changes, re-run yarn nice, yarn test, yarn types
Applied to files:
.github/workflows/mobile-ci.yml
📚 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:
.github/workflows/mobile-ci.yml
📚 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:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-29T15:30:12.210Z
Learnt from: CR
PR: selfxyz/self#0
File: app/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:12.210Z
Learning: Verify iOS build succeeds via yarn ios
Applied to files:
.github/workflows/mobile-ci.yml
📚 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/package.json : Expose a 'test:build' script in the app's package.json that builds deps, types, performs bundle analysis, and runs tests
Applied to files:
.github/workflows/mobile-ci.yml
📚 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:
.github/workflows/mobile-ci.yml
📚 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:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-29T15:30:12.210Z
Learnt from: CR
PR: selfxyz/self#0
File: app/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:12.210Z
Learning: Run the app with yarn ios during development as needed
Applied to files:
.github/workflows/mobile-ci.yml
📚 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:
.github/workflows/mobile-ci.yml
⏰ 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). (5)
- GitHub Check: build-android
- GitHub Check: test
- GitHub Check: build-ios
- GitHub Check: e2e-ios
- GitHub Check: analyze-android
🔇 Additional comments (1)
app/tests/src/navigation.test.ts (1)
31-31: Addition of IdDetails to expected routes looks correct.Alphabetical order is preserved and matches the new static import. No further changes needed.
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
♻️ Duplicate comments (1)
.github/workflows/mobile-ci.yml (1)
204-215: Prefer a single, repo-standard test:build entrypoint to reduce bespoke checks.We already validate/repair artifacts earlier; invoking the central script (build+types+tests) keeps CI intent consistent and future-proof with repo guidance.
Apply:
- - name: Test - run: | - # Final verification from app directory perspective - echo "Final verification before running tests (from app directory)..." - if [ ! -f "../packages/mobile-sdk-alpha/dist/cjs/index.cjs" ] || [ ! -f "../common/dist/cjs/index.cjs" ]; then - echo "❌ Dependencies still not found from app directory" - ls -la ../packages/mobile-sdk-alpha/dist/ || echo "mobile-sdk-alpha dist not found" - ls -la ../common/dist/ || echo "common dist not found" - exit 1 - fi - echo "✅ All dependencies verified, running tests..." - yarn test + - name: Test + run: yarn workspace @selfxyz/mobile-app run test:build working-directory: ./app
🧹 Nitpick comments (2)
.github/workflows/mobile-ci.yml (2)
141-148: Align cache usage with repo policy: wrap actions/cache into a composite for built-deps.Workflows should avoid calling actions/cache directly; prefer shared composite actions from .github/actions. Yarn/Bundler/Gradle/Pods already follow this; do the same for built-deps to standardize keys, logging, and restore/save behavior across jobs.
Follow-up:
- Add .github/actions/cache-built-deps (restore/save) that accepts path + key inputs and emits cache-hit.
- Replace direct actions/cache restore/save in all jobs with that composite. This reduces drift and simplifies future key/version changes.
Also applies to: 174-181, 312-333, 471-492
105-106: Run tests on ubuntu-latest to reduce cost/queue time.The test job doesn’t require Xcode; using macOS here is expensive and often slower. Move tests to Ubuntu; keep iOS build on macOS.
- test: - runs-on: macos-latest-large + test: + runs-on: ubuntu-latest
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/mobile-ci.yml(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.github/workflows/**/*.{yml,yaml}
📄 CodeRabbit inference engine (AGENTS.md)
.github/workflows/**/*.{yml,yaml}: In GitHub Actions workflows, use shared composite caching actions from .github/actions (cache-yarn, cache-bundler, cache-gradle, cache-pods)
Do not call actions/cache directly; rely on the shared composite caching actions
When using cache actions, optionally pass cache-version (often with GH_CACHE_VERSION and tool version) for stable keys
Files:
.github/workflows/mobile-ci.yml
🧠 Learnings (9)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens using React.lazy()
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens and components to improve performance
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/navigation/**/*.{ts,tsx} : Use react-navigation/native with createStaticNavigation for type-safe navigation
📚 Learning: 2025-08-29T15:30:12.210Z
Learnt from: CR
PR: selfxyz/self#0
File: app/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:12.210Z
Learning: After review changes, re-run yarn nice, yarn test, yarn types
Applied to files:
.github/workflows/mobile-ci.yml
📚 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/package.json : Expose a 'test:build' script in the app's package.json that builds deps, types, performs bundle analysis, and runs tests
Applied to files:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Use yarn scripts: yarn ios/android for builds, yarn test for unit tests, and Fastlane for deployments
Applied to files:
.github/workflows/mobile-ci.yml
📚 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 : Expose a 'test:build' script in the SDK's package.json that runs build, test, types, and lint
Applied to files:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-29T15:30:12.210Z
Learnt from: CR
PR: selfxyz/self#0
File: app/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:12.210Z
Learning: Verify iOS build succeeds via yarn ios
Applied to files:
.github/workflows/mobile-ci.yml
📚 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:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-29T15:30:12.210Z
Learnt from: CR
PR: selfxyz/self#0
File: app/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:12.210Z
Learning: Run the app with yarn ios during development as needed
Applied to files:
.github/workflows/mobile-ci.yml
📚 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:
.github/workflows/mobile-ci.yml
⏰ 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). (5)
- GitHub Check: build-android
- GitHub Check: build-ios
- GitHub Check: test
- GitHub Check: analyze-android
- GitHub Check: e2e-ios
🔇 Additional comments (3)
.github/workflows/mobile-ci.yml (3)
149-159: Diagnostics step is solid and non-fatal.The cache debug step gives quick signal on cache-hit status and artifacts without failing the job. Good guardrails for the built-deps cache.
165-173: Good defensive verification after cache miss build.Verifying key artifacts prevents silent “green but broken” runs and speeds up failure discovery. Nice.
181-202: Resilient fallback guards against partial/empty caches.Forcing a rebuild only when artifacts are missing keeps the job stable without paying the rebuild cost on cache hits. Sensible trade-off.
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 (1)
app/tests/web-build-render.test.ts (1)
13-33: Avoid overriding the global Error constructor in testsReplacing global.Error can break instanceof checks for native/Node errors, skew stack handling, and leak across Jest environments. Prefer local serialization helpers or, if absolutely needed, add a non-invasive Error.prototype.toJSON instead of swapping the constructor.
-// Comprehensive error serialization safety -const originalError = global.Error; -global.Error = class SafeError extends originalError { - constructor(...args: any[]) { - super(...args); - // Ensure no circular references are added to error objects - Object.defineProperty(this, 'error', { - value: undefined, - writable: false, - enumerable: false, - }); - } - - toJSON() { - return { - name: this.name, - message: this.message, - stack: this.stack, - }; - } -}; +// Keep native Error; avoid global overrides to prevent cross-test flakiness.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/tests/web-build-render.test.ts(2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/technical-specification.mdc)
**/*.{ts,tsx}: Define IdentityCommitment with fields: commitment (Poseidon hash), nullifier (domain-separated), timestamp (UTC number), version (circuit version), documentType ('passport' | 'eu_id_card')
Define DSCKeyCommitment with fields: publicKeyHash (Poseidon hash), certificateChain (hashes), revocationStatus (boolean), issuer (country code)
Define VerificationConfig with fields: circuitVersion (semver), complianceRules array, timeWindow (seconds, 24h), clockDrift (±5 min), trustAnchors, revocationRoots, timeSource (NTP), nullifierScope (domain separation)
Files:
app/tests/web-build-render.test.ts
**/*.{test,spec}.{ts,js,tsx,jsx}
⚙️ CodeRabbit configuration file
**/*.{test,spec}.{ts,js,tsx,jsx}: Review test files for:
- Test coverage completeness
- Test case quality and edge cases
- Mock usage appropriateness
- Test readability and maintainability
Files:
app/tests/web-build-render.test.ts
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens using React.lazy()
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens and components to improve performance
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/navigation/**/*.{ts,tsx} : Use react-navigation/native with createStaticNavigation for type-safe navigation
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to tests/src/**/*.{test,spec}.{ts,tsx,js,jsx} : Mock console.error in tests to avoid noisy output
Applied to files:
app/tests/web-build-render.test.ts
⏰ 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). (2)
- GitHub Check: build-ios
- 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: 1
♻️ Duplicate comments (2)
.github/workflows/mobile-ci.yml (2)
181-202: Remove the Force Build Dependencies step; it reintroduces build duplication and nondeterminism.This duplicates the earlier cache-miss build, adds minutes to CI, and can mask real cache/graph issues. Prefer a single source of truth for build+types+tests via the app’s centralized script and rely on the cache-built-deps composite above.
Apply:
- - name: Force Build Dependencies If Missing - run: | - # Force build if required files don't exist, regardless of cache status - if [ ! -f "packages/mobile-sdk-alpha/dist/cjs/index.cjs" ] || [ ! -f "common/dist/cjs/index.cjs" ]; then - echo "❌ Required dependency files missing, forcing rebuild..." - echo "Missing files:" - [ ! -f "packages/mobile-sdk-alpha/dist/cjs/index.cjs" ] && echo " - packages/mobile-sdk-alpha/dist/cjs/index.cjs" - [ ! -f "common/dist/cjs/index.cjs" ] && echo " - common/dist/cjs/index.cjs" - yarn workspace @selfxyz/mobile-app run build:deps - # Verify build completed successfully - if [ ! -f "packages/mobile-sdk-alpha/dist/cjs/index.cjs" ] || [ ! -f "common/dist/cjs/index.cjs" ]; then - echo "❌ Forced build failed - required files still missing" - ls -la packages/mobile-sdk-alpha/ || echo "packages/mobile-sdk-alpha not found" - ls -la packages/mobile-sdk-alpha/dist/ || echo "mobile-sdk-alpha dist not found" - ls -la common/ || echo "common not found" - ls -la common/dist/ || echo "common dist not found" - exit 1 - fi - echo "✅ Forced build completed successfully" - else - echo "✅ All required dependency files exist" - fi
204-216: Use the centralized test:build script; avoid bespoke Jest/Node invocations here.Reverting to hand-rolled test commands bypasses type checks/bundle analysis the repo expects and risks Node test runner incompatibility. Call the app’s test:build script instead and let it orchestrate everything (build presence, types, tests). This matches prior guidance.
- - name: Test - run: | - # Final verification from app directory perspective - echo "Final verification before running tests (from app directory)..." - if [ ! -f "../packages/mobile-sdk-alpha/dist/cjs/index.cjs" ] || [ ! -f "../common/dist/cjs/index.cjs" ]; then - echo "❌ Dependencies still not found from app directory" - ls -la ../packages/mobile-sdk-alpha/dist/ || echo "mobile-sdk-alpha dist not found" - ls -la ../common/dist/ || echo "common dist not found" - exit 1 - fi - echo "✅ All dependencies verified, running tests..." - # Run jest through yarn to avoid the build:deps step since CI already built dependencies - yarn jest --passWithNoTests && node --test scripts/tests/*.cjs + - name: Test + run: yarn workspace @selfxyz/mobile-app run test:build working-directory: ./appVerify Node version supports the Node test runner if you insist on keeping node --test:
#!/bin/bash set -euo pipefail echo "Node from .nvmrc:" "$(cat .nvmrc)" node -v node -e "require('node:test'); console.log('node:test available')"If this fails, stick to the centralized yarn script which abstracts runner differences.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/mobile-ci.yml(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.github/workflows/**/*.{yml,yaml}
📄 CodeRabbit inference engine (AGENTS.md)
.github/workflows/**/*.{yml,yaml}: In GitHub Actions workflows, use shared composite caching actions from .github/actions (cache-yarn, cache-bundler, cache-gradle, cache-pods)
Do not call actions/cache directly; rely on the shared composite caching actions
When using cache actions, optionally pass cache-version (often with GH_CACHE_VERSION and tool version) for stable keys
Files:
.github/workflows/mobile-ci.yml
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens using React.lazy()
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/navigation/**/*.{ts,tsx} : Use react-navigation/native with createStaticNavigation for type-safe navigation
📚 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 : Expose a 'test:build' script in the SDK's package.json that runs build, test, types, and lint
Applied to files:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-29T15:30:12.210Z
Learnt from: CR
PR: selfxyz/self#0
File: app/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:12.210Z
Learning: After review changes, re-run yarn nice, yarn test, yarn types
Applied to files:
.github/workflows/mobile-ci.yml
📚 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/package.json : Expose a 'test:build' script in the app's package.json that builds deps, types, performs bundle analysis, and runs tests
Applied to files:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Use yarn scripts: yarn ios/android for builds, yarn test for unit tests, and Fastlane for deployments
Applied to files:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-29T15:29:47.727Z
Learnt from: CR
PR: selfxyz/self#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:29:47.727Z
Learning: After addressing review feedback, re-run yarn nice, yarn test, yarn types
Applied to files:
.github/workflows/mobile-ci.yml
📚 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: Run yarn nice, yarn types, and yarn test before commits and PRs
Applied to files:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-29T15:30:12.210Z
Learnt from: CR
PR: selfxyz/self#0
File: app/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:12.210Z
Learning: Verify iOS build succeeds via yarn ios
Applied to files:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-29T15:30:12.210Z
Learnt from: CR
PR: selfxyz/self#0
File: app/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:12.210Z
Learning: Run the app with yarn ios during development as needed
Applied to files:
.github/workflows/mobile-ci.yml
📚 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:
.github/workflows/mobile-ci.yml
⏰ 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-android
- GitHub Check: build-ios
- GitHub Check: test
- GitHub Check: analyze-ios
- GitHub Check: analyze-android
- GitHub Check: e2e-ios
🔇 Additional comments (1)
.github/workflows/mobile-ci.yml (1)
165-173: LGTM on post-build verification.The explicit checks help fail fast when builds silently no-op. Keep.
| - name: Debug Cache Restoration | ||
| run: | | ||
| echo "Cache hit: ${{ steps.built-deps-restore.outputs.cache-hit }}" | ||
| echo "Cache key: built-deps-${{ env.GH_CACHE_VERSION }}-${{ env.NODE_VERSION_SANITIZED }}-${{ hashFiles('common/**/*', 'packages/mobile-sdk-alpha/**/*', '!common/dist/**', '!packages/mobile-sdk-alpha/dist/**') }}" | ||
| echo "Checking if cached files exist:" | ||
| ls -la packages/mobile-sdk-alpha/dist/ || echo "❌ mobile-sdk-alpha dist not found" | ||
| ls -la packages/mobile-sdk-alpha/dist/cjs/ || echo "❌ mobile-sdk-alpha dist/cjs not found" | ||
| ls -la packages/mobile-sdk-alpha/dist/cjs/index.cjs || echo "❌ mobile-sdk-alpha dist/cjs/index.cjs not found" | ||
| ls -la common/dist/ || echo "❌ common dist not found" | ||
| ls -la common/dist/cjs/ || echo "❌ common dist/cjs not found" | ||
| ls -la common/dist/cjs/index.cjs || echo "❌ common dist/cjs/index.cjs not found" |
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.
🛠️ Refactor suggestion
Replace direct cache usage with a composite cache-built-deps action (aligns with repo policy).
This block is fine for diagnostics, but the surrounding restore/save steps use actions/cache directly, which violates our workflow guideline to use shared composite caching actions from .github/actions. Please introduce a ./.github/actions/cache-built-deps composite that wraps restore/save for common/dist and packages/mobile-sdk-alpha/dist and exposes cache-hit, then consume it here and in all jobs (build-deps, test, build-ios, build-android). Do the same for Xcode caches via a cache-xcode composite to remove raw actions/cache calls.
Example composite (new file):
# .github/actions/cache-built-deps/action.yml
name: cache-built-deps
description: Cache built JS artifacts (common + mobile-sdk-alpha)
inputs:
cache-version:
required: true
outputs:
cache-hit:
value: ${{ steps.restore.outputs.cache-hit }}
runs:
using: composite
steps:
- id: restore
uses: actions/cache/restore@v4
with:
path: |
common/dist
packages/mobile-sdk-alpha/dist
key: built-deps-${{ inputs.cache-version }}-${{ hashFiles('common/**/*', 'packages/mobile-sdk-alpha/**/*', '!common/dist/**', '!packages/mobile-sdk-alpha/dist/**') }}
fail-on-cache-miss: false
- if: steps.restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
common/dist
packages/mobile-sdk-alpha/dist
key: built-deps-${{ inputs.cache-version }}-${{ hashFiles('common/**/*', 'packages/mobile-sdk-alpha/**/*', '!common/dist/**', '!packages/mobile-sdk-alpha/dist/**') }}Then replace all “Restore/Save Built Dependencies” pairs with a single:
- name: Cache Built Dependencies
id: built-deps
uses: ./.github/actions/cache-built-deps
with:
cache-version: ${{ env.GH_CACHE_VERSION }}-${{ env.NODE_VERSION_SANITIZED }}🤖 Prompt for AI Agents
.github/workflows/mobile-ci.yml lines 149-159: current workflow uses
actions/cache directly for built JS artifacts; per repo policy, replace direct
restore/save steps with a reusable composite. Create
.github/actions/cache-built-deps (composite) that wraps actions/cache
restore/save for paths common/dist and packages/mobile-sdk-alpha/dist, accepts a
cache-version input, exposes outputs.cache-hit from the restore step, and uses
the same hashFiles key shown in the comment; create a similar
.github/actions/cache-xcode composite for Xcode caches. Then update all jobs
(build-deps, test, build-ios, build-android) to remove raw actions/cache steps
and instead call the composite via a single step with id (e.g., built-deps) and
the cache-version input set to ${{ env.GH_CACHE_VERSION }}-${{
env.NODE_VERSION_SANITIZED }}, and consume outputs.cache-hit where needed.
Ensure the composite saves only when restore reports a miss and preserve the
exact key/hash logic used today.
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: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
.github/workflows/mobile-ci.yml (2)
269-286: Replace direct Xcode caches with a shared composite (policy compliance + reuse).Workflows should not call actions/cache directly. Introduce
.github/actions/cache-xcode(restore+save; exposes cache-hit) and consume it here. Also lets you conditionally run expensive Xcode steps off cache-hit if desired.Apply this change:
- - name: Cache Xcode build - uses: actions/cache@v4 - with: - path: | - app/ios/build - ~/Library/Developer/Xcode/DerivedData - ~/Library/Caches/com.apple.dt.Xcode - key: ${{ runner.os }}-xcode-${{ env.XCODE_VERSION }}-${{ hashFiles('app/ios/Podfile.lock', 'app/ios/OpenPassport.xcworkspace/contents.xcworkspacedata', 'app/ios/Self.xcworkspace/contents.xcworkspacedata') }} - restore-keys: | - ${{ runner.os }}-xcode-${{ env.XCODE_VERSION }}-${{ hashFiles('app/ios/Podfile.lock') }}- - ${{ runner.os }}-xcode-${{ env.XCODE_VERSION }}- + - name: Cache Xcode build + id: xcode-build-cache + uses: ./.github/actions/cache-xcode + with: + cache-version: ${{ env.GH_CACHE_VERSION }}-xcode${{ env.XCODE_VERSION }} + paths: | + app/ios/build + ~/Library/Developer/Xcode/DerivedData + ~/Library/Caches/com.apple.dt.Xcode + key-suffix: ${{ hashFiles('app/ios/Podfile.lock', 'app/ios/OpenPassport.xcworkspace/contents.xcworkspacedata', 'app/ios/Self.xcworkspace/contents.xcworkspacedata') }}New composite (add file .github/actions/cache-xcode/action.yml):
name: cache-xcode description: Cache Xcode build artifacts inputs: cache-version: required: true paths: required: true key-suffix: required: true outputs: cache-hit: value: ${{ steps.restore.outputs.cache-hit }} runs: using: composite steps: - id: restore uses: actions/cache/restore@v4 with: path: ${{ inputs.paths }} key: xcode-${{ inputs.cache-version }}-${{ inputs.key-suffix }} fail-on-cache-miss: false - if: steps.restore.outputs.cache-hit != 'true' uses: actions/cache/save@v4 with: path: ${{ inputs.paths }} key: xcode-${{ inputs.cache-version }}-${{ inputs.key-suffix }}
280-286: Apply the same composite to the Xcode index cache.Consolidate under cache-xcode for consistency and to access cache-hit in downstream steps.
- - name: Cache Xcode Index - uses: actions/cache@v4 - with: - path: app/ios/build/Index.noindex - key: ${{ runner.os }}-xcode-index-${{ env.XCODE_VERSION }}-${{ hashFiles('app/ios/Podfile.lock') }} - restore-keys: | - ${{ runner.os }}-xcode-index-${{ env.XCODE_VERSION }}- + - name: Cache Xcode Index + id: xcode-index-cache + uses: ./.github/actions/cache-xcode + with: + cache-version: ${{ env.GH_CACHE_VERSION }}-xcode${{ env.XCODE_VERSION }} + paths: app/ios/build/Index.noindex + key-suffix: ${{ hashFiles('app/ios/Podfile.lock') }}
🧹 Nitpick comments (3)
.github/workflows/mobile-ci.yml (2)
129-144: Debug step is fine; keep it temporary.The extra introspection is useful while stabilizing the new cache flow. Please plan to remove once flakes are resolved to keep CI lean.
93-94: Runner choice: consider ubuntu for the test job to cut macOS costs/queue times.If no iOS or mac-specific tooling is required in “test”, switching to ubuntu-latest typically saves minutes per run.
- test: - runs-on: macos-latest-large + test: + runs-on: ubuntu-latestapp/.eslintrc.cjs (1)
41-52: ESLint TS resolver extensions LGTM.This unblocks platform-specific resolution (.web/.native/.ios/.android) and prevents false “unresolved” errors after removing lazy loading.
Given lazy loading removal, please watch initial bundle size and TTI on low-end devices. Consider prefetching critical screens and keeping non-critical ones split if startup regresses.
📜 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 (8)
.github/actions/cache-built-deps/action.yml(1 hunks).github/workflows/mobile-ci.yml(4 hunks)app/.eslintrc.cjs(1 hunks)app/package.json(2 hunks)app/src/components/homeScreen/SvgXmlWrapper.native.tsx(1 hunks)app/src/components/homeScreen/SvgXmlWrapper.ts(1 hunks)app/src/components/homeScreen/SvgXmlWrapper.web.tsx(1 hunks)app/src/mocks/react-native-community-blur.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
app/package.json
📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)
Expose a 'test:build' script in the app's package.json that builds deps, types, performs bundle analysis, and runs tests
Files:
app/package.json
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/technical-specification.mdc)
**/*.{ts,tsx}: Define IdentityCommitment with fields: commitment (Poseidon hash), nullifier (domain-separated), timestamp (UTC number), version (circuit version), documentType ('passport' | 'eu_id_card')
Define DSCKeyCommitment with fields: publicKeyHash (Poseidon hash), certificateChain (hashes), revocationStatus (boolean), issuer (country code)
Define VerificationConfig with fields: circuitVersion (semver), complianceRules array, timeWindow (seconds, 24h), clockDrift (±5 min), trustAnchors, revocationRoots, timeSource (NTP), nullifierScope (domain separation)
Files:
app/src/components/homeScreen/SvgXmlWrapper.tsapp/src/components/homeScreen/SvgXmlWrapper.web.tsxapp/src/components/homeScreen/SvgXmlWrapper.native.tsxapp/src/mocks/react-native-community-blur.ts
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/SvgXmlWrapper.tsapp/src/components/homeScreen/SvgXmlWrapper.web.tsxapp/src/components/homeScreen/SvgXmlWrapper.native.tsxapp/src/mocks/react-native-community-blur.ts
.github/workflows/**/*.{yml,yaml}
📄 CodeRabbit inference engine (AGENTS.md)
.github/workflows/**/*.{yml,yaml}: In GitHub Actions workflows, use shared composite caching actions from .github/actions (cache-yarn, cache-bundler, cache-gradle, cache-pods)
Do not call actions/cache directly; rely on the shared composite caching actions
When using cache actions, optionally pass cache-version (often with GH_CACHE_VERSION and tool version) for stable keys
Files:
.github/workflows/mobile-ci.yml
🧠 Learnings (17)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens and components to improve performance
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/navigation/**/*.{ts,tsx} : Use react-navigation/native with createStaticNavigation for type-safe navigation
📚 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} : Follow ESLint TypeScript-specific rules
Applied to files:
app/.eslintrc.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} : Use strict TypeScript type checking across the codebase
Applied to files:
app/.eslintrc.cjs
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/*.{ios.ts,ios.tsx,android.ts,android.tsx} : Use platform-specific files (.ios.tsx/.android.tsx etc.) for differing implementations
Applied to files:
app/.eslintrc.cjsapp/src/components/homeScreen/SvgXmlWrapper.ts
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/types/**/*.{ts,tsx} : Place type definitions in @/types
Applied to files:
app/.eslintrc.cjs
📚 Learning: 2025-08-29T15:29:47.727Z
Learnt from: CR
PR: selfxyz/self#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:29:47.727Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : In GitHub Actions workflows, use shared composite caching actions from .github/actions (cache-yarn, cache-bundler, cache-gradle, cache-pods)
Applied to files:
.github/actions/cache-built-deps/action.yml.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-29T15:29:47.727Z
Learnt from: CR
PR: selfxyz/self#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:29:47.727Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : When using cache actions, optionally pass cache-version (often with GH_CACHE_VERSION and tool version) for stable keys
Applied to files:
.github/actions/cache-built-deps/action.yml.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-29T15:30:12.210Z
Learnt from: CR
PR: selfxyz/self#0
File: app/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:12.210Z
Learning: After review changes, re-run yarn nice, yarn test, yarn types
Applied to files:
.github/workflows/mobile-ci.yml
📚 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/package.json : Expose a 'test:build' script in the app's package.json that builds deps, types, performs bundle analysis, and runs tests
Applied to files:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Use yarn scripts: yarn ios/android for builds, yarn test for unit tests, and Fastlane for deployments
Applied to files:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-29T15:29:47.727Z
Learnt from: CR
PR: selfxyz/self#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:29:47.727Z
Learning: After addressing review feedback, re-run yarn nice, yarn test, yarn types
Applied to files:
.github/workflows/mobile-ci.yml
📚 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 : Expose a 'test:build' script in the SDK's package.json that runs build, test, types, and lint
Applied to files:
.github/workflows/mobile-ci.yml
📚 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: Run yarn nice, yarn types, and yarn test before commits and PRs
Applied to files:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-29T15:29:47.727Z
Learnt from: CR
PR: selfxyz/self#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:29:47.727Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Do not call actions/cache directly; rely on the shared composite caching actions
Applied to files:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-29T15:30:12.210Z
Learnt from: CR
PR: selfxyz/self#0
File: app/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:12.210Z
Learning: Verify iOS build succeeds via yarn ios
Applied to files:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-29T15:29:47.727Z
Learnt from: CR
PR: selfxyz/self#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:29:47.727Z
Learning: Before committing, run repository checks (yarn nice, yarn lint, yarn build, contracts build, yarn types)
Applied to files:
.github/workflows/mobile-ci.yml
📚 Learning: 2025-08-29T15:29:47.727Z
Learnt from: CR
PR: selfxyz/self#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:29:47.727Z
Learning: Before PRs, ensure yarn build succeeds for all workspaces
Applied to files:
.github/workflows/mobile-ci.yml
🧬 Code graph analysis (2)
app/src/components/homeScreen/SvgXmlWrapper.web.tsx (1)
app/src/components/homeScreen/SvgXmlWrapper.native.tsx (1)
SvgXml(16-18)
app/src/components/homeScreen/SvgXmlWrapper.native.tsx (1)
app/src/components/homeScreen/SvgXmlWrapper.web.tsx (1)
SvgXml(15-34)
🪛 GitHub Check: build-deps
app/src/components/homeScreen/SvgXmlWrapper.ts
[failure] 14-14:
A require() style import is forbidden
[failure] 10-10:
A require() style import is forbidden
app/src/components/homeScreen/SvgXmlWrapper.web.tsx
[warning] 5-5:
Using exported name 'DOMPurify' as identifier for default import
🪛 GitHub Actions: Mobile CI
app/src/components/homeScreen/SvgXmlWrapper.ts
[error] 10-10: ESLint: '@typescript-eslint/no-require-imports' - A 'require()' style import is forbidden.
🪛 ast-grep (0.38.6)
app/src/components/homeScreen/SvgXmlWrapper.web.tsx
[warning] 29-29: Usage of dangerouslySetInnerHTML detected. This bypasses React's built-in XSS protection. Always sanitize HTML content using libraries like DOMPurify before injecting it into the DOM to prevent XSS attacks.
Context: dangerouslySetInnerHTML
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation [REFERENCES]
- https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml
- https://cwe.mitre.org/data/definitions/79.html
(react-unsafe-html-injection)
⏰ 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). (3)
- GitHub Check: e2e-ios
- GitHub Check: analyze-ios
- GitHub Check: analyze-android
🔇 Additional comments (4)
.github/actions/cache-built-deps/action.yml (1)
1-31: Composite cache for built artifacts looks solid.
- Correct use of restore/save split with a strict key and dist exclusions.
- Clear API (cache-version input, cache-hit output) for workflow consumers.
No blockers.
.github/workflows/mobile-ci.yml (2)
72-79: Good adoption of the cache-built-deps composite.You replaced raw cache steps with the shared composite and wired cache-version correctly. This aligns with repo policy and reduces duplication.
180-192: Remove unnecessary Node version guard. .nvmrc pins Node to 22.x and CI’s setup-node steps load it, so Node ≥ 20 is guaranteed andnode --testis safe.app/src/mocks/react-native-community-blur.ts (1)
14-33: Web BlurView mock looks good and fixes pointerEvents propagation.Props are filtered and pointerEvents applied via CSS, avoiding click-blocking overlays on web.
| id: built-deps | ||
| uses: ./.github/actions/cache-built-deps | ||
| with: | ||
| path: | | ||
| common/dist | ||
| packages/mobile-sdk-alpha/dist | ||
| key: built-deps-${{ env.GH_CACHE_VERSION }}-${{ env.NODE_VERSION_SANITIZED }}-${{ hashFiles('common/**/*', 'packages/mobile-sdk-alpha/**/*', '!common/dist/**', '!packages/mobile-sdk-alpha/dist/**') }} | ||
| fail-on-cache-miss: false | ||
| cache-version: ${{ env.GH_CACHE_VERSION }}-${{ env.NODE_VERSION_SANITIZED }} | ||
| - name: Build dependencies (cache miss) | ||
| if: steps.built-deps-restore.outputs.cache-hit != 'true' | ||
| if: steps.built-deps.outputs.cache-hit != 'true' | ||
| run: | | ||
| echo "Cache miss for built dependencies. Building now..." | ||
| yarn workspace @selfxyz/mobile-app run build:deps | ||
| - name: Save Built Dependencies | ||
| if: steps.built-deps-restore.outputs.cache-hit != 'true' | ||
| uses: actions/cache/save@v4 | ||
| with: | ||
| path: | | ||
| common/dist | ||
| packages/mobile-sdk-alpha/dist | ||
| key: built-deps-${{ env.GH_CACHE_VERSION }}-${{ env.NODE_VERSION_SANITIZED }}-${{ hashFiles('common/**/*', 'packages/mobile-sdk-alpha/**/*', '!common/dist/**', '!packages/mobile-sdk-alpha/dist/**') }} | ||
| - name: Build Android (with AAPT2 symlink fix) |
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.
🛠️ Refactor suggestion
NDK cache should use a composite and gate installation on cache-hit.
Direct actions/cache calls violate policy and always running sdkmanager wastes minutes. Wrap NDK caching in a composite that exposes cache-hit, then install only on miss.
- - name: Cache NDK
- uses: actions/cache@v4
- with:
- path: ${{ env.ANDROID_HOME }}/ndk/${{ env.ANDROID_NDK_VERSION }}
- key: ${{ runner.os }}-ndk-${{ env.ANDROID_NDK_VERSION }}
- - name: Install NDK
- run: sdkmanager "ndk;${{ env.ANDROID_NDK_VERSION }}"
+ - name: Cache NDK
+ id: ndk-cache
+ uses: ./.github/actions/cache-ndk
+ with:
+ cache-version: ${{ env.GH_CACHE_VERSION }}-ndk${{ env.ANDROID_NDK_VERSION }}
+ ndk-path: ${{ env.ANDROID_HOME }}/ndk/${{ env.ANDROID_NDK_VERSION }}
+ - name: Install NDK (cache miss)
+ if: steps.ndk-cache.outputs.cache-hit != 'true'
+ run: sdkmanager "ndk;${{ env.ANDROID_NDK_VERSION }}"New composite (add file .github/actions/cache-ndk/action.yml):
name: cache-ndk
description: Cache Android NDK
inputs:
cache-version:
required: true
ndk-path:
required: true
outputs:
cache-hit:
value: ${{ steps.restore.outputs.cache-hit }}
runs:
using: composite
steps:
- id: restore
uses: actions/cache/restore@v4
with:
path: ${{ inputs.ndk-path }}
key: ndk-${{ inputs.cache-version }}
fail-on-cache-miss: false
- if: steps.restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ${{ inputs.ndk-path }}
key: ndk-${{ inputs.cache-version }}| "@testing-library/react-native": "^13.3.3", | ||
| "@tsconfig/react-native": "^3.0.6", | ||
| "@types/add": "^2", | ||
| "@types/dompurify": "^3.2.0", |
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.
Move dompurify to dependencies (runtime), keep @types in devDeps.
The web SvgXml wrapper imports dompurify at runtime. Having it in devDependencies risks missing module errors in production web builds and CI. @types/dompurify can stay in devDependencies.
Apply:
--- a/app/package.json
+++ b/app/package.json
@@
"dependencies": {
@@
+ "dompurify": "^3.2.6",
@@
},
"devDependencies": {
@@
- "dompurify": "^3.2.6",
@@
}Also applies to: 174-174
🤖 Prompt for AI Agents
In app/package.json around lines 160 and 174, dompurify is currently listed
under devDependencies while @types/dompurify should remain in devDependencies;
move the runtime dependency "dompurify" from devDependencies to dependencies
(keeping "@types/dompurify" in devDependencies) so the module is available in
production and CI builds, updating the package.json accordingly and ensuring
version string is preserved.
| // Platform-specific dynamic import | ||
| if (Platform.OS === 'web') { | ||
| // Web platform - use DOMPurify sanitized version | ||
| const webModule = require('@/components/homeScreen/SvgXmlWrapper.web'); | ||
| module.exports = webModule; | ||
| } else { | ||
| // Native platforms - use react-native-svg directly | ||
| const nativeModule = require('@/components/homeScreen/SvgXmlWrapper.native'); | ||
| module.exports = nativeModule; | ||
| } |
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.
Dynamic require violates lint and is unnecessary; rely on platform file resolution.
Metro/Vite can pick SvgXmlWrapper.native.tsx / SvgXmlWrapper.web.tsx automatically. This file introduces forbidden require() and breaks CI.
Recommended:
- Delete this file and import from '@/components/homeScreen/SvgXmlWrapper' everywhere; bundlers will resolve to the platform variant.
- If you must keep it temporarily, disable the rule locally to unblock CI (not preferred):
@@
-// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc.
+// 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.
+/* eslint-disable @typescript-eslint/no-require-imports */📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Platform-specific dynamic import | |
| if (Platform.OS === 'web') { | |
| // Web platform - use DOMPurify sanitized version | |
| const webModule = require('@/components/homeScreen/SvgXmlWrapper.web'); | |
| module.exports = webModule; | |
| } else { | |
| // Native platforms - use react-native-svg directly | |
| const nativeModule = require('@/components/homeScreen/SvgXmlWrapper.native'); | |
| module.exports = nativeModule; | |
| } | |
| // 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. | |
| /* eslint-disable @typescript-eslint/no-require-imports */ | |
| // Platform-specific dynamic import | |
| if (Platform.OS === 'web') { | |
| // Web platform - use DOMPurify sanitized version | |
| const webModule = require('@/components/homeScreen/SvgXmlWrapper.web'); | |
| module.exports = webModule; | |
| } else { | |
| // Native platforms - use react-native-svg directly | |
| const nativeModule = require('@/components/homeScreen/SvgXmlWrapper.native'); | |
| module.exports = nativeModule; | |
| } |
🧰 Tools
🪛 GitHub Check: build-deps
[failure] 14-14:
A require() style import is forbidden
[failure] 10-10:
A require() style import is forbidden
🪛 GitHub Actions: Mobile CI
[error] 10-10: ESLint: '@typescript-eslint/no-require-imports' - A 'require()' style import is forbidden.
🤖 Prompt for AI Agents
In app/src/components/homeScreen/SvgXmlWrapper.ts around lines 7 to 16, this
platform-switching file uses dynamic require() which violates lint rules and is
unnecessary because the bundler resolves SvgXmlWrapper.web/native automatically;
remove this file and update all imports to import from
'@/components/homeScreen/SvgXmlWrapper' (no extension) so Metro/Vite will pick
the correct platform file, then run lint/CI to confirm fixes; if you cannot
remove it immediately, as a short-lived fallback add a top-of-file
eslint-disable for the specific rule and a TODO to delete it once all imports
are updated (preferred: delete).
| export const SvgXml = forwardRef<HTMLDivElement, Props>( | ||
| ({ xml, width, height, style, ...props }, ref) => { | ||
| // Initialize DOMPurify for web browser environment | ||
| const purify = DOMPurify(window); | ||
| const safe = purify.sanitize(xml, { | ||
| USE_PROFILES: { svg: true, svgFilters: true }, | ||
| }); |
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.
Guard DOMPurify factory for SSR/test environments and avoid re-instantiation.
DOMPurify(window) will throw if window is undefined (SSR, some tests). Add a guard and memoize the instance per mount.
Apply:
-import DOMPurify from 'dompurify';
-import React, { createElement, forwardRef } from 'react';
+import createDOMPurify from 'dompurify';
+import React, { createElement, forwardRef, useMemo } from 'react';
@@
-export const SvgXml = forwardRef<HTMLDivElement, Props>(
- ({ xml, width, height, style, ...props }, ref) => {
- // Initialize DOMPurify for web browser environment
- const purify = DOMPurify(window);
- const safe = purify.sanitize(xml, {
+export const SvgXml = forwardRef<HTMLDivElement, Props>(
+ ({ xml, width, height, style, ...props }, ref) => {
+ const purify = useMemo(
+ () => (typeof window !== 'undefined' ? createDOMPurify(window) : null),
+ [],
+ );
+ const safe = purify?.sanitize(xml, {
USE_PROFILES: { svg: true, svgFilters: true },
- });
+ }) ?? '';📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| export const SvgXml = forwardRef<HTMLDivElement, Props>( | |
| ({ xml, width, height, style, ...props }, ref) => { | |
| // Initialize DOMPurify for web browser environment | |
| const purify = DOMPurify(window); | |
| const safe = purify.sanitize(xml, { | |
| USE_PROFILES: { svg: true, svgFilters: true }, | |
| }); | |
| // Before: | |
| -import DOMPurify from 'dompurify'; | |
| import createDOMPurify from 'dompurify'; | |
| import React, { createElement, forwardRef, useMemo } from 'react'; | |
| export const SvgXml = forwardRef<HTMLDivElement, Props>( | |
| - ({ xml, width, height, style, ...props }, ref) => { | |
| - // Initialize DOMPurify for web browser environment | |
| - const purify = DOMPurify(window); | |
| ({ xml, width, height, style, ...props }, ref) => { | |
| // Guard for SSR/test and memoize to avoid re-instantiation | |
| const purify = useMemo( | |
| () => (typeof window !== 'undefined' ? createDOMPurify(window) : null), | |
| [], | |
| ); | |
| const safe = purify?.sanitize(xml, { | |
| USE_PROFILES: { svg: true, svgFilters: true }, | |
| }) ?? ''; | |
| // …rest of rendering logic… | |
| } | |
| ); |
🤖 Prompt for AI Agents
In app/src/components/homeScreen/SvgXmlWrapper.web.tsx around lines 15 to 21,
calling DOMPurify(window) unguarded will throw in SSR/tests where window is
undefined and currently re-instantiates on every render; fix by checking for
typeof window !== "undefined" before calling DOMPurify and creating a single
memoized instance (use useMemo or useRef to create it once per mount), and fall
back to a no-op sanitizer when DOMPurify or window is unavailable; then use that
memoized sanitizer to call sanitize(xml, { USE_PROFILES: { svg: true,
svgFilters: true } }).
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: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/src/components/homeScreen/SvgXmlWrapper.native.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/technical-specification.mdc)
**/*.{ts,tsx}: Define IdentityCommitment with fields: commitment (Poseidon hash), nullifier (domain-separated), timestamp (UTC number), version (circuit version), documentType ('passport' | 'eu_id_card')
Define DSCKeyCommitment with fields: publicKeyHash (Poseidon hash), certificateChain (hashes), revocationStatus (boolean), issuer (country code)
Define VerificationConfig with fields: circuitVersion (semver), complianceRules array, timeWindow (seconds, 24h), clockDrift (±5 min), trustAnchors, revocationRoots, timeSource (NTP), nullifierScope (domain separation)
Files:
app/src/components/homeScreen/SvgXmlWrapper.native.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/SvgXmlWrapper.native.tsx
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens using React.lazy()
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens and components to improve performance
Learnt from: transphorm
PR: selfxyz/self#942
File: app/vite.config.ts:170-0
Timestamp: 2025-08-23T02:02:02.556Z
Learning: In the selfxyz/self React Native app, devTools from '@/navigation/devTools' are intentionally shipped to production builds for testing purposes, not excluded as is typical in most applications.
🧬 Code graph analysis (1)
app/src/components/homeScreen/SvgXmlWrapper.native.tsx (1)
app/src/components/homeScreen/SvgXmlWrapper.web.tsx (1)
SvgXml(15-34)
🪛 GitHub Check: build-deps
app/src/components/homeScreen/SvgXmlWrapper.native.tsx
[warning] 16-16:
Unexpected any. Specify a different 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). (2)
- GitHub Check: build-ios
- GitHub Check: e2e-ios
| import React, { forwardRef } from 'react'; | ||
| import type { StyleProp, ViewStyle } from 'react-native'; | ||
| import { SvgXml as RNSvgXml } from 'react-native-svg'; | ||
|
|
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.
🛠️ Refactor suggestion
Fix ref forwarding and remove the any generic.
The wrapper declares forwardRef but drops the ref and uses any, which will break ref consumers and fail lint (“Unexpected any”). Forward the ref to RNSvgXml and type it.
Preferred patch:
-import React, { forwardRef } from 'react';
+import React, { forwardRef } from 'react';
+import type { ElementRef } from 'react';
@@
-export const SvgXml = forwardRef<any, Props>((p, _ref) => <RNSvgXml {...p} />);
+export const SvgXml = forwardRef<ElementRef<typeof RNSvgXml>, Props>(
+ (props, ref) => <RNSvgXml ref={ref} {...props} />
+);If react-native-svg’s SvgXml doesn’t support refs in your version, drop forwardRef entirely to avoid confusion:
-import React, { forwardRef } from 'react';
+import React from 'react';
@@
-export const SvgXml = forwardRef<any, Props>((p, _ref) => <RNSvgXml {...p} />);
+export const SvgXml = (props: Props) => <RNSvgXml {...props} />;To double-check impact, scan for ref usage on this component:
#!/bin/bash
# Find call sites that pass a ref to SvgXml wrapper
rg -nP --type=tsx -C2 '<SvgXml[^>]*\bref=' appAlso applies to: 16-18
🤖 Prompt for AI Agents
In app/src/components/homeScreen/SvgXmlWrapper.native.tsx lines 5-8 (also apply
same change at 16-18): the component declares forwardRef but drops the ref and
uses the `any` generic; update the wrapper to forward the ref through to
RNSvgXml and remove `any` by typing the ref properly (e.g. use React.Ref or
React.ComponentRef with typeof RNSvgXml and appropriate props types) so
consumers receive a correctly typed ref; if your version of react-native-svg
doesn’t expose refs for SvgXml, remove forwardRef entirely to avoid lying about
support.
| type Props = { | ||
| xml: string; | ||
| width?: number; | ||
| height?: number; | ||
| style?: StyleProp<ViewStyle>; | ||
| }; |
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.
🛠️ Refactor suggestion
Allow string dimensions to prevent layout breakage.
react-native-svg and RN styles accept number | string (e.g., '100%'). Restricting to number risks runtime issues where percentages are expected.
type Props = {
xml: string;
- width?: number;
- height?: number;
+ width?: number | string;
+ height?: number | string;
style?: StyleProp<ViewStyle>;
};📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| type Props = { | |
| xml: string; | |
| width?: number; | |
| height?: number; | |
| style?: StyleProp<ViewStyle>; | |
| }; | |
| type Props = { | |
| xml: string; | |
| width?: number | string; | |
| height?: number | string; | |
| style?: StyleProp<ViewStyle>; | |
| }; |
🤖 Prompt for AI Agents
In app/src/components/homeScreen/SvgXmlWrapper.native.tsx around lines 9 to 14,
the Props type currently restricts width and height to number which breaks cases
where percentages (e.g., '100%') are used; update the Props to allow number |
string for width and height, and ensure any places that pass these props to
react-native-svg or View style accept string values (cast or forward the values
unchanged) so percentage dimensions work without runtime errors.
Resolves CI error where yarn install --immutable failed due to outdated package hash. The hash changed from b2afc4 to f9ebb9.
- Hash changed from c0e6b9 to 0d0f72 due to package modifications - Cleaned caches and regenerated lockfile to ensure consistency - This resolves CI cache mismatch where old artifacts had stale hash
- Final hash: 89f5a6 (includes built dist artifacts) - Built mobile-sdk-alpha to ensure package is in stable state - This should resolve CI immutable install errors
| import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled | ||
| import com.facebook.react.defaults.DefaultReactActivityDelegate | ||
| import io.tradle.nfc.RNPassportReaderModule | ||
| import com.selfxyz.selfSDK.RNSelfPassportReaderModule |
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.
@seshanthS cursor said this was blocking building when using the workspace vs file flow
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)
.yarnrc.yml (1)
2-2: Avoid “zero-installs” ambiguity; align repo and docs with global cache strategy.If
.yarn/cachewas previously committed (zero-installs), global cache changes that model. Remove stale cached artifacts from the repo, update.gitignore, and adjust contributor/docs so local/CI installs rely on the global cache consistently.
📜 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 (5)
.yarnrc.yml(1 hunks)app/android/app/src/main/java/com/proofofpassportapp/MainActivity.kt(0 hunks)app/android/app/src/main/java/com/proofofpassportapp/MainApplication.kt(0 hunks)app/package.json(2 hunks)packages/mobile-sdk-alpha/react-native.config.cjs(1 hunks)
💤 Files with no reviewable changes (2)
- app/android/app/src/main/java/com/proofofpassportapp/MainApplication.kt
- app/android/app/src/main/java/com/proofofpassportapp/MainActivity.kt
🚧 Files skipped from review as they are similar to previous changes (1)
- app/package.json
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: transphorm
PR: selfxyz/self#942
File: app/vite.config.ts:170-0
Timestamp: 2025-08-23T02:02:02.556Z
Learning: In the selfxyz/self React Native app, devTools from '@/navigation/devTools' are intentionally shipped to production builds for testing purposes, not excluded as is typical in most applications.
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/screens/**/*.{ts,tsx} : Lazy load screens using React.lazy()
📚 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/react-native.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 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/react-native.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:
packages/mobile-sdk-alpha/react-native.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 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/react-native.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}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests
Applied to files:
packages/mobile-sdk-alpha/react-native.config.cjs
📚 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/react-native.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 packages/mobile-sdk-alpha/demo/** : Provide an in-SDK lightweight React Native demo under packages/mobile-sdk-alpha/demo/
Applied to files:
packages/mobile-sdk-alpha/react-native.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: Update the app to consume the mobile-sdk-alpha package and replace local modules with SDK imports
Applied to files:
packages/mobile-sdk-alpha/react-native.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 packages/mobile-sdk-alpha/README.md : Document new/updated SDK modules and usage in packages/mobile-sdk-alpha/README.md
Applied to files:
packages/mobile-sdk-alpha/react-native.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/**/package.json : Verify package conditions are valid (e.g., exports conditions)
Applied to files:
packages/mobile-sdk-alpha/react-native.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:
packages/mobile-sdk-alpha/react-native.config.cjs
📚 Learning: 2025-08-24T18:55:07.940Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/technical-specification.mdc:0-0
Timestamp: 2025-08-24T18:55:07.940Z
Learning: Applies to package.json : Distribute the SDK via npm/yarn with proper package metadata
Applied to files:
packages/mobile-sdk-alpha/react-native.config.cjs
⏰ 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-android
- GitHub Check: test
- GitHub Check: build-ios
- GitHub Check: e2e-ios
- GitHub Check: analyze-ios
- GitHub Check: analyze-android
🔇 Additional comments (4)
.yarnrc.yml (1)
2-2: Good call for faster installs; ensure CI actually caches Yarn’s global cache.With
enableGlobalCache: true+nodeLinker: node-modules, installs can be much faster, but only if the global cache path is restored between CI runs. Please confirm your workflows set and cacheYARN_CACHE_FOLDER(or Yarn’s default global cache directory) per job/runner to avoid redownloads and cross-runner contamination.Example GitHub Actions snippet:
env: YARN_CACHE_FOLDER: .yarn/_global-cache steps: - uses: actions/checkout@v4 - uses: actions/cache@v4 with: path: .yarn/_global-cache key: yarn-global-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | yarn-global-${{ runner.os }}- - run: corepack enable && yarn -v && yarn install --immutablepackages/mobile-sdk-alpha/react-native.config.cjs (3)
9-11: iOS configuration paths are valid. Verified existence ofpackages/mobile-sdk-alpha/mobile-sdk-alpha.podspecandpackages/mobile-sdk-alpha/ios.
13-16: Confirm correct Android package path Verified thatcom.selfxyz.selfSDKmatches the package declaration in RNSelfPassportReaderPackage.kt and the AndroidManifest.xml is present; no update needed.
6-20: Manual Verification Required: Confirm SDK Autolinking Post-MigrationOpen
app/rnconfig.json(vianpx react-native config) and ensure there’s an entry for"mobile-sdk-alpha"underdependencieswith non-null values for:
platforms.ios.podspecPathplatforms.android.packageImportPathIf the SDK isn’t listed or those fields are empty, either revert to the previous
dependenciesshape or upgrade the React Native CLI (e.g. add"@react-native-community/cli": "latest"to your app’sdevDependencies).
* SDK Go version (#920) * feat: helper functions and constant for go-sdk * feat: formatRevealedDataPacked in go * chore: refactor * feat: define struct for selfBackendVerifier * feat: verify function for selfBackendVerifier * feat(wip): custom hasher * feat: SelfVerifierBacked in go * test(wip): scope and userContextHash is failing * test: zk proof verified * fix: MockConfigStore getactionId function * chore: refactor * chore: remove abi duplicate files * chore: move configStore to utils * chore: modified VcAndDiscloseProof struct * chore: more review changes * feat: impl DefaultConfig and InMemoryConfigStore * chore: refactor and export functions * fix: module import and README * chore: remove example folder * chore: remove pointers from VerificationConfig * chore: coderabbit review fixes * chore: more coderabbit review fix * chore: add license * fix: convert attestationIdd to int * chore: remove duplicate code --------- Co-authored-by: ayman <[email protected]> * Moving proving Utils to common (#935) * remove react dom * moves proving utils to the common * need to use rn components * fix imports * add proving-utils and dedeuplicate entry configs for esm and cjs. * must wrap in text component * fix metro bundling * fix mock import * fix builds and tests * please save me * solution? * fix test * Move proving inputs to the common package (#937) * create ofactTree type to share * move proving inputs from app to register inputs in common * missed reexport * ok * add some validations as suggested by our ai overlords * Fix mock passport flow (#942) * fix dev screens * add hint * rename * fix path * fix mobile-ci path * fix: extractMRZ (#938) * fix: extractMRZ * yarn nice && yarn types * fix test: remove unused * fix mobile ci * add script --------- Co-authored-by: Justin Hernandez <[email protected]> * Move Proving attest and cose (#950) * moved attest and cose utils to common with cursor converted tests in common to use vitest and converted coseVerify.test to vitest after moving from app to common what does cryptoLoader do? * moved away * get buff Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * SELF-253 feat: add user email feedback (#889) * feat: add sentry feedback * add sentry feedback to web * feat: add custom feedback modal & fix freeze on IOS * yarn nice * update lock * feat: show feedback widget on NFC scan issues (#948) * feat: show feedback widget on NFC scan issues * fix ref * clean up * fix report issue screen * abstract send user feedback email logic * fixes * change text to Report Issue * sanitize email and track event messge * remove unnecessary sanitization * add sanitize error message tests * fix tests * save wip. almost done * fix screen test * fix screen test * remove non working test --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> * chore: centralize license header checks (#952) * chore: centralize license header scripts * chore: run license header checks from root * add header to other files * add header to bundle * add migration script and update check license headers * convert license to mobile sdk * migrate license headers * remove headers from common; convert remaining * fix headers * add license header checks * update unsupported passport screen (#953) * update unsupported passport screen * yarn nice * Migrate Analytics (#951) * setup analytics adapter for self mobile sdk client and use in app * wrap for context * fix build * yarn types is an alias for build when build just compiles ts * ok unlock * deeper * ok this looks to work * fix license check * make sure it starts with this line * someone didnt commit * fix double analytics bug and builds * lint * Read document catalog from selfClient (#936) * [SELF-676] feat: upgrade React Native from 0.75.4 to 0.76.9 (#943) * chore: upgrade build tooling to Node 22 and AGP 8.6 * chore: upgrade react-native to 0.76.9 * update lock files and formatting * fix path * fix: handle hermes-engine cache mismatch in CI after React Native upgrade - Add fallback logic to run 'pod update hermes-engine' when pod install fails - This resolves CocoaPods cache issues that occur after React Native version upgrades - Fixes CI pipeline failures on codex/update-core-tooling-for-react-native-upgrade branch * fix: improve hermes-engine cache handling in CI - Preemptively clear CocoaPods cache before pod install - This prevents dependency analysis failures that occur when cached podspecs conflict - Addresses the root cause: cache conflicts during 'Analyzing dependencies' phase - Keeps fallback logic for additional safety * fix: handle hermes-engine cache in mobile-bundle-analysis workflow - Add pod-install-with-cache-fix.sh script to handle hermes-engine cache conflicts - Update install-app:setup script to use the new cache fix approach - This fixes the mobile-bundle-analysis.yml workflow failures after React Native upgrade - Proactively clears CocoaPods cache and has fallback for hermes-engine updates * formatting * fix: robust hermes-engine cache handling in CI workflows - Apply comprehensive cache clearing to mobile-ci.yml and mobile-e2e.yml - Pre-emptively run 'pod update hermes-engine' before pod install - Clear multiple cache locations to handle CI environment differences - This prevents 'hermes-engine differs from Pods/Local Podspecs' errors - Fixes all workflows affected by React Native 0.76.9 upgrade cache issues * fixes * clean up * update lock files * fix tests * sort * fixes * fix ci * fix deployment target * android fixes * upgrade fix * fixes * fix: streamline mobile CI build and caching (#946) * fix: streamline mobile CI build and caching * Enable mobile E2E tests on codex/fix-mobile-ci-workflow-errors branch * test * simplify and fix path * workflow fixes * fix loading on 0.76.9 * clean up unnecessary comments * fix readme * finalize upgrade to 0.76.9 * fix android build and upgrade * fix bundler caching * download cli to fix "yarn start" issues * fix cli build erorr * fix script path * better path * abstract build step to prevent race condition * fixes * better cache * fix corepack build error * update lock * update lock * add yarn cache to workflows * fix test building * ci caching improvements * fix common type check * fix common ci * better mobile sdk alpha building logic * chore: speed up mobile e2e workflow (#962) * chore: speed up mobile e2e workflow * chore: disable android e2e job * chore: speed up ios build * fix: bundle js for ios debug build * fix e2e * fix mobile ci (#964) * feat: improve mixpanel flush strategy (#960) * feat: improve mixpanel flush strategy * fixes * fix build * update lock * refactor methods * conslidate calls * update package and lock * refactor: remove namespace imports (#969) * refactor: remove namespace imports * refactor: use named fs imports * refactor(app): replace path and fs namespace imports * format * format * Mixpanel tweaks (#971) * udpates * fox * update license * Add DSC parsing check (#836) * Handle missing dsc parsed * nice * fix test * throw * fix * chore(app): upgrade dependencies (#968) * chore(app): upgrade dependencies * update package * update lock files * fixes * lock * fix * Auth Adapter + (#958) * basic auth adapater * remove SelfMobileSDk, this was another architecture which the adapter patern replaced * rename to avoid confusion with client.test.ts * basic auth adapater * remove SelfMobileSDk, this was another architecture which the adapter patern replaced * rename to avoid confusion with client.test.ts * self * fix * remove prototypes * make sure its mounted * fix tests * fmt * require required adapters * fix types * not a partial * adds missing exports * fix missing data * Fix nfc configuration scanning issue (#978) * fix nfc scanning on ios and android * save test * fix tests * fix lint * Chore fix ios nfc scanning and compiling (#979) * fixes * silence error * fix debugge * fix nfc scanning * lint and pipeline fixes * large runner (#980) * chore: update to macos latest large runner (#981) * bump up to macos-latest-large * fix ci * Move loadSelectedDocument to SDK (#967) Co-authored-by: Aaron DeRuvo <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * docs: update mobile SDK migration progress (#982) * docs: record app integration progress * docs: consolidate mobile SDK migration tracking * docs: humanize migration tracking and merge prompts * docs: add common consolidation tasks * docs: reprioritize migration tasks * docs: soften migration plan tone * docs: detail agent prompts with file paths * docs: catalog Linear tasks for SDK * updates * remove artifact management * moves validateDocument functions into the common package. (#977) * moves validateDocument functions into the common package. * fix build issues and lint * handle bad connections better in nullifiier * add an abort controler to nullifer fetcher, ignore fals positives * import types separately * take it as an arg * chore: update yarn.lock * chore(app): resolve lint warnings (#990) * chore(app): resolve lint warnings * update lock * clean up any types * fix types * feedback from cr * [SELF-703] feat: Migrate mock generator to mobile sdk (#992) * feat: expose mock generator * formatting * fix tests and lint * rename passport to document * fix types * [SELF-698] scaffold mobile sdk demo app (#993) * chore: scaffold mobile sdk demo app * test: cover demo app menu * prettier and types * sort * add android app foundation * fix android loading * get ios app running * update script * cr feedback * disable fabric * fixes * fixes * fix * SELF-702: Refactor navigation structure and dev utilities (#994) * Refactor navigation and dev screens * refactor: rename passport screens to document * fixes * add missing header * fixes * type files * feat: clarify proof verification analytics (#996) * feat: increase sha256 byte size and add new rsa circuits (#986) * feat: increase sha256 byte size and add new rsa circuits * feat: modularise the rsa fp pow mod * chore: comment signature verifier for testing * fix: sha256_sha256_sha224_ecdsa_secp224r1 * lint * chore: implement google play suggestions (#997) * google play suggestions * update gitguardian ignore * remove unused * chore: address yarn lock issues (#1004) * address yarn lock issues * fix postinstall * skip postinstall for ci (#1005) * [SELF-654] feat: add native modules (#919) * feat: add ios native modules * fix: extractMRZ * Add android OCR native module * wire native mrz module with adapter * wire Native modules and fix tests * fixes * fix license header logic * fix tests * fix types * fix: ci test * fix: android build ci * fix: ios build CI * add podfile.lock * add yarn.lock * update lock files * add yarn.lock * add license * order methods * update lock * pipeline fixes * prettier * update lock file * fix native modules on external apps * bundle @selfxyz/common into mobile-sdk-alpha * chore: address yarn lock issues (#1004) * address yarn lock issues * fix postinstall * update lock * fix build issues * fix pipeline issue * fix ci * fix bad merge * fix android ci * fix ci errors * fix mobile sdk ci. stop gap fix for now until we create a package * tweaks * retry aapt2 approach * use ^0.8.4 instead of ^0.8.0 due to the use of custom errors * workflow fixes * fix file * update * fix ci * test ci fix * fix test --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> * chore: update dev with staging 09/06/25 (#1007) * update CI * bump iOS version * update readme * update mobile-deploy ci * bump version iOS * update workflow to use workload identity federation (#933) * update workflow to use workload identity federation * add token permissions * correct provider name * chore: incrementing android build version for version 2.6.4 [github action] --------- Co-authored-by: Self GitHub Actions <[email protected]> * update ci * update ci * update ci * update ci * update ci * fix ci * fix ci * fix ci * remove fastlane use for android * bump iOS build version * update CI python script * iterate on CI * iterate on CI * iterate on CI * Dev (#941) * SDK Go version (#920) * feat: helper functions and constant for go-sdk * feat: formatRevealedDataPacked in go * chore: refactor * feat: define struct for selfBackendVerifier * feat: verify function for selfBackendVerifier * feat(wip): custom hasher * feat: SelfVerifierBacked in go * test(wip): scope and userContextHash is failing * test: zk proof verified * fix: MockConfigStore getactionId function * chore: refactor * chore: remove abi duplicate files * chore: move configStore to utils * chore: modified VcAndDiscloseProof struct * chore: more review changes * feat: impl DefaultConfig and InMemoryConfigStore * chore: refactor and export functions * fix: module import and README * chore: remove example folder * chore: remove pointers from VerificationConfig * chore: coderabbit review fixes * chore: more coderabbit review fix * chore: add license * fix: convert attestationIdd to int * chore: remove duplicate code --------- Co-authored-by: ayman <[email protected]> * Moving proving Utils to common (#935) * remove react dom * moves proving utils to the common * need to use rn components * fix imports * add proving-utils and dedeuplicate entry configs for esm and cjs. * must wrap in text component * fix metro bundling * fix mock import * fix builds and tests * please save me * solution? * fix test * Move proving inputs to the common package (#937) * create ofactTree type to share * move proving inputs from app to register inputs in common * missed reexport * ok * add some validations as suggested by our ai overlords * Fix mock passport flow (#942) * fix dev screens * add hint * rename * fix path * fix mobile-ci path * fix: extractMRZ (#938) * fix: extractMRZ * yarn nice && yarn types * fix test: remove unused * fix mobile ci * add script --------- Co-authored-by: Justin Hernandez <[email protected]> * Move Proving attest and cose (#950) * moved attest and cose utils to common with cursor converted tests in common to use vitest and converted coseVerify.test to vitest after moving from app to common what does cryptoLoader do? * moved away * get buff Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * SELF-253 feat: add user email feedback (#889) * feat: add sentry feedback * add sentry feedback to web * feat: add custom feedback modal & fix freeze on IOS * yarn nice * update lock * feat: show feedback widget on NFC scan issues (#948) * feat: show feedback widget on NFC scan issues * fix ref * clean up * fix report issue screen * abstract send user feedback email logic * fixes * change text to Report Issue * sanitize email and track event messge * remove unnecessary sanitization * add sanitize error message tests * fix tests * save wip. almost done * fix screen test * fix screen test * remove non working test --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> * chore: centralize license header checks (#952) * chore: centralize license header scripts * chore: run license header checks from root * add header to other files * add header to bundle * add migration script and update check license headers * convert license to mobile sdk * migrate license headers * remove headers from common; convert remaining * fix headers * add license header checks * update unsupported passport screen (#953) * update unsupported passport screen * yarn nice --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: ayman <[email protected]> Co-authored-by: Aaron DeRuvo <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * bump version * bump yarn.lock * update ci (#966) * chore: Manually bump and release v2.6.4 (#961) * update lock files * bump and build android * update build artifacts * show generate mock document button * update lock * fix formatting and update failing e2e test * revert podfile * fixes * fix cold start of the app with deeplink * update ci * update ci * Sync MARKETING_VERSION to iOS project files after version bump * chore: incrementing android build version for version 2.6.4 [github action] (#976) Co-authored-by: remicolin <[email protected]> * chore: add build dependencies step for iOS and Android in mobile deploy workflow * chore: enhance mobile deploy workflow by adding CMake installation step * bump android build version * chore: incrementing android build version for version 2.6.4 [github action] (#985) Co-authored-by: remicolin <[email protected]> * chore: configure Metro bundler for production compatibility in mobile deploy workflow * chore: incrementing android build version for version 2.6.4 [github action] (#987) Co-authored-by: remicolin <[email protected]> * Revert "chore: configure Metro bundler for production compatibility in mobile deploy workflow" This reverts commit 60fc1f2580c2f6ad3105d8b904d969412a18bd2e. * reduce max old space size in mobile-deploy ci * fix android french id card (#957) * fix android french id card * fix common ci cache * feat: log apdu (#988) --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> * unblock ci * fix merge * merge fixes * fix tests * make ci happy --------- Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: pputman-clabs <[email protected]> Co-authored-by: Self GitHub Actions <[email protected]> Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: ayman <[email protected]> Co-authored-by: Aaron DeRuvo <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: fix yarn format (#1009) * fix yarn format * yarn format * fix lint * undo temporary disabling * pipeline fixes * revert nvmrc change * add new home screen (#1019) * add new home screen * fix typing issue * yarn nice * chore: update the cpp build script (#1021) * chore: install node (#1022) * chore: use node v22 (#1023) * chore: install yarn (#1024) * chore: yarn cache (#1025) * chore: sanitise node version (#1026) * remove lazy loading (#1018) * remove lazy loading * fix tests * formatting * fix imports and web ci * fix tests * fix building * fix * debug ci * fix web ci issue * fix * fix * fix ci * remove web render test * coderabbit feedback * fix ci * use import * fix lint * fix compiling * update lock * update lock * fix: update yarn.lock hash for @selfxyz/mobile-sdk-alpha Resolves CI error where yarn install --immutable failed due to outdated package hash. The hash changed from b2afc4 to f9ebb9. * fix: update yarn.lock hash after mobile-sdk-alpha changes - Hash changed from c0e6b9 to 0d0f72 due to package modifications - Cleaned caches and regenerated lockfile to ensure consistency - This resolves CI cache mismatch where old artifacts had stale hash * fix: update yarn.lock hash after building mobile-sdk-alpha - Final hash: 89f5a6 (includes built dist artifacts) - Built mobile-sdk-alpha to ensure package is in stable state - This should resolve CI immutable install errors * fix yarn lock and build * chore(ci): improve mobile e2e caching (#1010) * chore(ci): improve mobile e2e caching * chore(ci): restore deriveddata cache * chore(ci): remove ios deriveddata cache * chore(ci): cache ios derived data * chore(ci): optimize mobile deploy caching * chore(ci): enable ccache for ios e2e builds * fix(ci): add ccache path for ios e2e * moves ofac and protocol store (#1012) * move ofact tree fetch to common * move protocol store to the msdk, fix some dependencies on msdk * chore: remove register id from register circuits (#1028) * chore: remove register id from register circuits * chore: only use 128ram instance * Feat/build cpp (#1029) * chore: remove register id from register circuits * chore: only use 128ram instance * chore: build 2 circuits at a time * Remove navigationRef from provingMachine (#1011) * SDK: minimize amount of data sent through PROVING_PASSPORT_NOT_SUPPORTED event (#1030) * Fix mock passport generation (#1031) * fix mock passport generation * fix mobile ci tests * Feat/aadhaar (#949) * make contract sdk simpler (#514) * make contract sdk simpler * reduce root inputs * delete convert function * summarize our library * update npm package * update package version * update attestation id * add util function to get revealed data * Revert "make contract sdk simpler (#514)" (#518) This reverts commit 847b88d5ecc0d449b976a552f68af38eec8e561b. * merge dev into main (#576) * Feat: Show error code in SDK (#500) * feat: emit `error_code` and `reason` in app * feat: add `onError` in sdk * feat: Display reason in app * lint & fmt * feat: add scrollview in ProofRequestStatusScreen for long reasons * Fix input generation for 521bit curves (#481) * fix EC point padding for 521 bit curves * rename modulus to point in findStartIndexEC as it is a point * simplify matching logic * simplify padding logic * remove comment * remove log removing .only so the CI/CD runs circuit tests fix disclosure test fix scope in test fix scope error in circuit tests remove .only fix test * run ci/cd * Feat/simpler contract sdk (#519) * make contract sdk simpler * reduce root inputs * delete convert function * summarize our library * update npm package * update package version * update attestation id * add util function to get revealed data --------- Co-authored-by: motemotech <[email protected]> * forgot to include package update (#521) * Bump version to 2.5.1 (#522) * bump version * update fastlane * fix bump version * bump build and add todo * disable commit for now * [SEL-154] Step 1: Scan your passport (#511) * simplify navigation logic * use aesop design hook * save wip * add new aesop redesign screens * save wip design * refactor nav bar logic * fix paths * save wip * stub progress navbar and save wip * save wip progress bar animation * save wip progress bar, almost done with design * fix progress bar design * fix bottom padding * disable git commit for now * fix flaky android downloads that causes pipeline to crash * update lock for ci * [SEL-46] FE: Add minimum bottom padding (#510) * fix bottom padding for smaller screens * fix podfile post install hook permissions check * update pod lock and disable git commit action step for now * update lock * fix flaky android downloads that causes pipeline to crash * fix: improve error handling for forbidden countries list mismatch (#494) * Update SelfBackendVerifier.ts * Update constants.ts * Update formatInputs.ts * Update formatCallData.ts * DX: Auto format on save (#526) * save wip * use elint instead of prettier to sort imports * set imports to warn * sync prettier settigns * update prettier settings * save working version * fix export and disable mobile pipeline for now * limit auto formatting to the app folder * remove artefacts * SEL-187: Make bottom layout scrollable on smaller screens (#525) * fix design check * add an option to disable local sending of sentry events * better sentry enable / disable * fix scan passport height * make bottom layout scrollable so it doesn't squish top screen * simpler logic check. don't create new env var * fix internet connection issues * readd comment * use isConnected instead of internet reachable * use a dynamic bottom panel height * add missing recovery screens * move aesop below * remove dupe export * fix rebase * fix android package download issue * Feat/extend id support (#517) * refactor proving impleting xstate, speedup proving * add disclosure proof support * keep refactoring provingMachine, clean old implementation * call init method when switching from dsc to register * rebase with dev to display why the proof verification failed * refactor ws connexion between front-end and mobile to retrieve self-app * update the webclient at proofVerification and use selfAppStore in provingMachine * fix provintStore.init in ProveScreen * yarn nice * fetch data correctly in splash screen * Bump build versions for 2.5.1 (#531) * release new builds * fix app and build versions * fix env check * display error animation on failure on loading screen (#532) * display error animation on failure on loading screen * remove log --------- Co-authored-by: Justin Hernandez <[email protected]> * ci: bump actions/checkout to v4 (#529) * make contract sdk simpler (#514) * make contract sdk simpler * reduce root inputs * delete convert function * summarize our library * update npm package * update package version * update attestation id * add util function to get revealed data * Revert "make contract sdk simpler (#514)" (#518) This reverts commit 847b88d5ecc0d449b976a552f68af38eec8e561b. * ci: bump actions/checkout to v4 --------- Co-authored-by: nicoshark <[email protected]> Co-authored-by: turnoffthiscomputer <[email protected]> * fix italy (#530) * Fix/proving machine endpoint type (#538) * store endpoint type in proving machine * yarn nice * fix splash screen error (#539) * New bug fix build for v2.5.1 (#540) * bump new build for dev fixes * update lock * reinstall before running local deploy * SEL-178: Improve haptic feedback library (#535) * fix dev settings typing * add dev screens file * save haptic feedback progress * change ordedr * fix initial route and add haptic feedback screen to dev settings options * add delete scripts (#542) * update staging registry address (#545) * feat: Add Disclose history (#533) * feat: Add Disclose history * fix: Duplicate history in list * fix: Outdated disclosures * Delete app/ios/Self copy-Info.plist * allow a scale of up to 1.3 (#546) * allow a scale of up to 1.3 * update lock files * clean up unused imports * fix settings * add common sdk (#537) * add common sdk * remove sdk backend api * remove registry * regenerate sha256 rsa dsc each time * download ski-pem dynamically on staging, refactor initpassportDataParsing * add state machine for button on prove screen, improve ux on splash screen * fetch ski-pem in production * fix linter issues * fix prove screen button bugs * update podfile.lock and yarn.lock * run linter in circuits repo * bump build * bump version for sentry debugging * bump ios to version 118 --------- Co-authored-by: Justin Hernandez <[email protected]> * better connection check (#548) * Clean up navigation and setup Jest (#549) * remove dupe account screens and prefer the term home * organize screen loading better * sort keys * rename screen files wip * fix deleted directory issues * rename folders * fix paths and naming * save working jest import test * save base working jest navigation test * finalize navigation refactor and jest test * update test name and podfile lock * remove unused packages * use the correct version of react test renderer * bump build (#552) * Eth dublin (#554) * add mock id card generator * add genMockIdDoc in common/sdk exports * onboard developer id using deeplink, allow custom birthdate on mockpassport * log more dsc info (#558) * Push notification (#536) * add push notification feature * merge new app impl * change dsc key * import * reverse mock dsc * worked in the ios * checked in android * update url and delete console * delete small changes * lint * add yarn.lock * fix warning message * add mock notification service for test code * fix path for the mock implementation * add mock deeplink to the test code * nice notificationServiceMock.js * delete unused firebase related implementation * fix wording and UI related to notification service * hotfix on mockdatascreen --------- Co-authored-by: turnoffthiscomputer <[email protected]> * Fix deeplink 2 (#560) * fix deeplink * fix deeplink * yarn nice * feat: Use vision for MRZ scanning (SEL-47) (#557) * feat: Use vision for MRZ scanning * modify label to position the smartphone during the OCR scan --------- Co-authored-by: turnoffthiscomputer <[email protected]> * SEL-255: improved loading screen with estimated wait times (#550) * create new loading screen and rename static to misc * fix route * save wip loading screen * save wip animation * save static wip design * continue * splash * add a loading screen text helper * add test for loading screen text * save wip. almost there * update haptic logic * better feedback and add dev scren * save current work * update text logic and tests * load passport metadata in loading screen * simplify and fix tests * test for additional exponents * add new animation * rename file * consolidate ui useEffect and fix loading screen layout * fix current state * remove mockPassportFlow param * merge new loading screen and new notification logic * simplify * update lock * use passportMetadata instead of metadata * save simplification * update loading text based on pr feedback and tests * Bump v2.5.1: ios 122; android 60 (#561) * increment build to 120 * bump builds for 2.5.1. ios 121; android 60 * clean up logic * upgrade react native firebase for privacy manifests * update react native keychain to fix could not recover issue (#564) * fix: update ocr corrections (#563) * Chore: Polish proof history to prep for release (#566) * clean up nav and home boundaries, passport data screen insets * migrate proof history screen out of settings * minor clean up * save wip * add new ibm plex mono font and clean up proof detail screen * remove test data * remove extra loading screen text * remove unnecessary ceil * Bump v2.5.1; ios 123; android 62 (#565) * bump to build 61 * bump ios version * update version * Feature/add prettier formatter (#568) * Add Prettier configuration and ignore files for code formatting - Created .prettierignore to exclude specific directories and files from formatting. - Added .prettierrc.yml with custom settings for print width and trailing commas. - Updated package.json to include Prettier and its Solidity plugin as dependencies, along with scripts for formatting and checking code. * Run prettier formatting * fix nationality using mock passports * SEL-181 & SEL-252: Update mobile app events (#570) * improve analytics handling * add error boundary that flushes segment events before error occurs * upgrade segment analytics package * flush analytics when user encounters error screen * track all click events * add tracking to loading screen * better init and click event names * track cloud backup and modal actions * use __DEV__ for debugging * add tracking to account recovery, auth, mock data * return false instead of throwing * add more tracking events * save wip event updating * abstract analytic event names * update click events * clean up * move reasons comment * add unsupported passport event * Feature/enhance self verification root (#569) * Add SelfVerificationConsumer contract for self-verification logic - Introduced an abstract contract, SelfVerificationConsumer, that extends SelfVerificationRoot. - Implemented nullifier tracking, verification success events, and customizable validation and update methods for nullifiers. - Added error handling for nullifier check failures and hooks for derived contracts to implement custom logic after successful verification. * Add SelfHappyBirthday contract example using SelfVerificationConsumer - Introduced SelfHappyBirthday contract that allows users to claim USDC on their birthday. - Integrated SelfVerificationConsumer for handling verification and nullifier tracking. - Added functions to set claimable amount and window, along with event emissions for state changes. - Implemented logic to check if the claim is within the user's birthday window and transfer USDC accordingly. * Refactor imports in HappyBirthday contract for better organization - Updated import statements in HappyBirthday.sol to use relative paths for ISelfVerificationRoot, SelfCircuitLibrary, and SelfVerificationConsumer. - Improved code readability and maintainability by organizing imports more logically. * Refactor Airdrop contract to use SelfVerificationConsumer for registration logic - Updated Airdrop contract to inherit from SelfVerificationConsumer instead of SelfVerificationRoot. - Refactored mappings for user identifiers and nullifiers for improved clarity and functionality. - Enhanced error handling and updated function parameters for consistency. - Implemented new validation and update methods for nullifiers, streamlining the registration process. - Removed deprecated verifySelfProof function and integrated logic into new methods. * Add events and refactor SelfVerificationRoot and related contracts - Introduced new events in SelfVerificationRoot for verification configuration updates, scope changes, and attestation ID management. - Updated Airdrop contract to remove deprecated events and added a new event for Merkle root updates. - Refactored SelfPassportERC721 to inherit from SelfVerificationConsumer, enhancing verification logic and event handling. - Improved function parameters for consistency and clarity across contracts. * Refactor contracts to use SelfVerificationRoot and enhance verification logic - Removed SelfVerificationConsumer contract and updated related contracts to inherit from SelfVerificationRoot. - Refactored mappings and event emissions in Airdrop, HappyBirthday, and SelfPassportERC721 for improved clarity and functionality. - Enhanced verification success hooks to include user identifiers and nullifiers for better tracking. - Updated constructor parameters for consistency across contracts and improved error handling for user registration and claims. * Refactor constructor in SelfPassportERC721 for improved readability * Refactor function parameters in SelfVerificationRoot and related contracts * Refactor constructor parameter names in IdentityVerificationHub, Airdrop, IdentityRegistry, and ProxyRoot contracts for improved clarity and consistency * fix getCircuitName function (#575) * fix getCircuitName function * fix getCircuitName function * feat: Read ID cards (#571) * Update GitHub checkout action from v3 to v4 (#544) * Bump build version 2.5.2 to test react native keychain (#572) * bump build and version * bump version 2.5.2 * don't downgrade react native keychain * update app/README.md toolchain instructions (#140) * bump build (#580) --------- Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: turboblitz <[email protected]> Co-authored-by: motemotech <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: crStiv <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: James Niken <[email protected]> Co-authored-by: Kevin Lin <[email protected]> Co-authored-by: leopardracer <[email protected]> Co-authored-by: Olof Andersson <[email protected]> * feat(wip): register circuit for aadhaar * chore: add anon aadhar circuits * chore: remove sc and disclose selfrica test * feat: extract aadhaar qr data * test: aadhaar qr data extract circuit * test: aadhaar register circuit * feat: extract pincode and ph no last 4 digit * fix: register aadhaar nullifier and commitment * test: Verify commitment circuit of aadhaar * feat: add photoHash inside commitment * feat: build Aadhaar OFAC SMT * feat: ofac check and reveal data (test done) * test: qr extractor for custom data input * feat: add state as reveal data inside VC and disclose * chore: add comments * fix: num2Ceil component * chore: review changes * chore: use passport SignatureVerifier * fix: signatureVerifier inputs * feat: extract ascii values of fields * feat: provide users the flexibility to reveal specific characters of a field * chore: refactor * test: register aadhaar for tampered data * test(wip): should return 0 if in ofac list * test: ofac check * test: register aadhaar circuit for different qr data * merge dev into main (#683) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) * implement self uups upgradeable (#592) * implement self uups upgradeable * small changes in identityVerificationHubImplV2 * delete aderyn.toml * chore: add custom verifier * chnage return output * feat: use self structs and a Generic output struct * feat: add userIdentifier, nullifier, forbiddencountries to returned output * add root view functions from registry * fix: build and compilation errors * add userDefined data into selfVerificationRoot * "resolve conflicts" * fix compilation problem * fix how to register verification config * test: CustomVerifier * fix verification root and hub integration * add scope check in hub impl * replace poseidon hash to ripemd+sha256 * add todo list * feat: refactor and add test cases for generic formatter * add performUserIdentifierCheck in basicVerification * change how to handle additionalData and fix stack too deep * start adding test codes * fix dependency problems in monorepo * fix: forbidden countries (#612) LGTM! * able to run test code * pass happy path * delete unused codes * change error code name, add caller address validation and add scripts to run test and build in monorepo * add all test cases in vcAndDisclose flow * remove comment out * chore: use actual user identifier outputs * success in registration tests * cover all cases * pass contractVersion instead of circuitVersion * fix disclose test * chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter * change val name and remove unused lines * add val name change * remove userIdentifier from return data * feat: use GenericDiscloseOutput struct in verfication hook fix test cases for user identifier * chore: change the function order for Hub Impl V2 (#625) * fix nat specs * add nat spec in SelfStructs --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Nesopie <[email protected]> * prettier (#629) * CAN auth - android (#613) * add missed files * add NFCMethodSelectionScreen * bump android build --------- Co-authored-by: Justin Hernandez <[email protected]> * feat: add MRZ correction method to NFCMethodSelectionScreen (#627) * add npm auth token env (#632) * bump sdk version (#633) * publish npm package when merging on dev * bump common sdk version * replace yarn publish by npm publish * update common package version * Simplify dev mode gesture (#635) * Simplify developer mode gesture * Enable dev mode on MockData screen with five taps * add build smt function to common sdk * update vc_and_disclose_id test (dev branch) (#641) * fix: vc_and_disclose_id test * chore: yarn prettier * Show modal on NFC scan error (#642) * Add help button and error modal actions * fix the screen management * yarn nice * Bump build v2.5.4: ios 132; android 71 (#631) * bump version and build numbers * remove tamagui/toast * fix marketing version * fix: update TD1 and TD3 checks (#643) * bum yarn.lock * Bump build: ios 133; android 72 and build fixes (#654) * update gesture version and bump android build * bump and fix ios build * update lock files * fixes * fix fotoapparat library source * Update example contracts to include EUID usage (#656) * refactor: update HappyBirthday contract to V2 with support for E-Passport and EUID cards, introduce bonus multipliers, and enhance verification logic * refactor: update Airdrop contract to V2 with support for E-Passport and EU ID Card attestations * refactor: remove BASIS_POINTS constant from Airdrop contract * feat: introduce SelfIdentityERC721 contract for issuing NFTs based on verified identity credentials, replacing SelfPassportERC721 * fix: update verification functions in Airdrop, HappyBirthday, and SelfIdentityERC721 contracts to use customVerificationHook * cherry pick commit from add-test-self-verification... * block non-dev pr to main branch * audit fixes (#645) * merge dev branch into main (#624) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> * update contracts (#628) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) * implement self uups upgradeable (#592) * implement self uups upgradeable * small changes in identityVerificationHubImplV2 * delete aderyn.toml * chore: add custom verifier * chnage return output * feat: use self structs and a Generic output struct * feat: add userIdentifier, nullifier, forbiddencountries to returned output * add root view functions from registry * fix: build and compilation errors * add userDefined data into selfVerificationRoot * "resolve conflicts" * fix compilation problem * fix how to register verification config * test: CustomVerifier * fix verification root and hub integration * add scope check in hub impl * replace poseidon hash to ripemd+sha256 * add todo list * feat: refactor and add test cases for generic formatter * add performUserIdentifierCheck in basicVerification * change how to handle additionalData and fix stack too deep * start adding test codes * fix dependency problems in monorepo * fix: forbidden countries (#612) LGTM! * able to run test code * pass happy path * delete unused codes * change error code name, add caller address validation and add scripts to run test and build in monorepo * add all test cases in vcAndDisclose flow * remove comment out * chore: use actual user identifier outputs * success in registration tests * cover all cases * pass contractVersion instead of circuitVersion * fix disclose test * chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter * change val name and remove unused lines * add val name change * remove userIdentifier from return data * feat: use GenericDiscloseOutput struct in verfication hook fix test cases for user identifier * chore: change the function order for Hub Impl V2 (#625) * fix nat specs * add nat spec in SelfStructs --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Nesopie <[email protected]> * prettier (#629) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> Co-authored-by: Nesopie <[email protected]> * fix: vc_and_disclose_id test (#640) * fix: vc_and_disclose_id test * chore: yarn prettier * fix: check if a config id exists * chore: change the function where the config not set verification is happening * fix: add await * feat: add getConfigId function in SelfVerificationRoot (#650) * feat: add getConfigId function in SelfVerificationRoot * update comment --------- Co-authored-by: motemotech <[email protected]> * chore: fix ofac end index in eu id cards * chore: fix tests * fix: example contracts and tests --------- Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> * Update deployment module for Identity Verification Hub V2 with detailed documentation and library linkage for CustomVerifier. Update initialization process to reflect changes in V2 implementation, ensuring proper setup for proxy deployment. (#658) * publish npm-package (#651) * App/eu id updates (#638) * fix build issues * generate disclosure proof with euids * generate disclosure proof with euids * Eu id updates 2 (#648) * update vc_and_disclose_id test (dev branch) (#641) * fix: vc_and_disclose_id test * chore: yarn prettier * Show modal on NFC scan error (#642) * Add help button and error modal actions * fix the screen management * yarn nice * Bump build v2.5.4: ios 132; android 71 (#631) * bump version and build numbers * remove tamagui/toast * fix marketing version * fix: update TD1 and TD3 checks (#643) * bum yarn.lock * add version and user defined data --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> * remove the mock user define data * get the useridentifier as a hash from the user defined data * chore: add version and userDefinedData * feat: use the version in register / dsc proofs as well * update calculateUserIdentifierHash * yarn nice * refactor: consolidate user context data handling and update payload structure * fix typing issues on sha1 * remove console.log(sha1) * fix sha1 import * refactor: streamline userDefinedData handling and adjust payload type for circuit * refactor: update sha1 usage and enhance logging in calculateUserIdentifierHash * yarn nice * yarn lint common * use ts-ignore for sha1 import * fix app ci tests * fix typing issue * remove unused ts-ignore * cast uuid before calling generateinputs * bump qrcode version * add tsup on the qrcode sdk * fix: exports on selfxyz/qrcode * update how we define config.version * fix yarn imports * yarn format --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Ayman <[email protected]> * Hotfix contract compile error (#660) * Fix previous rebase error * Refactor deployment module for Identity Verification Hub V2. * Fix/sdk (#652) * fix: sdk build configs * chore: SelfBackendVerifier (WIP) * feat: add custom verification * feat: consider destination chain in user defined data * chore: export attestation id * chore: export attestation id * chore: export config storage * chore: don't throw an error if the proof is not valid * chore: trim abi and rm typechain types * refactor * chore: rm unnecessary exports * 📝 Add docstrings to `fix/sdk` (#653) Docstrings generation was requested by @remicolin. * https://github.com/selfxyz/self/pull/652#issuecomment-2992046545 The following files were modified: * `sdk/core/src/utils/hash.ts` * `sdk/core/src/utils/proof.ts` * `sdk/core/src/utils/utils.ts` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * review fixes * chore: fix package.json cjs types * chore: add minor changes to checks * feat: add InMemoryConfigStore, allIds constant and verificationResult type * chore: export Verification config * feat: change the verification config types * fix: throw issues early if verification config is null * fix: update yarn.lock file * chore: lint * fix: rm ts expect error directive * fix: contract tests * use excluded countries instead forbidden countries list * chore: change types in constnats --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update npm-publish workflow and bump core package version to 1.0.0 (#661) * update import * Update get verification config visibility (#664) * Update deployment module for Identity Verification Hub V2 to correct file paths and module name for deployment commands. * Add troubleshooting documentation for verification issues in deployHubV2.ts. Include manual verification steps and common failure reasons to assist users during deployment. * Change visibility of getVerificationConfigV2 function from internal to public in IdentityVerificationHubImplV2 contract to allow external access. * Apply BUSL v1.1 license headers to app (#665) * Add BSL license headers to app sources * prettier * fix license reference - https://spdx.org/licenses/BUSL-1.1.html * bump build: android 73 (#659) * Contracts/deploy staging (#668) * update scripts * deploy vc and disclose id * fix the deployment scripts on staging * update yarn.lock * bump ios build and version (#669) * configure coderabbitai (#670) * tweak coderabbit * bump * more thorough test spec * Apply BSL to app codebase (#639) * Clean up root license wording * Simplify SPDX header * simplify license and rename BSL to BUSL * fix merge issues * fix missing method --------- Co-authored-by: Justin Hernandez <[email protected]> * SEL-423 apply xcode build suggestions (#671) * apply recommended app settings from xcode * stick to portrait orientation and update target settings * remove app clip references * Circuit audit fixes (#644) * feat: add range checks before use of LessEqThan and SelectSubArray * fix: Num2Bits_strict to constrain virtualKey * bump core version * bump core version and fix ci * chore: use npm_auth_token in yarnrc * chroe: rm yarnrc changes * chore: update npm publish * chore: run npm publish manually * chore: change hub contract address (#675) * Update npm-publish.yml * chore: use proper secret when publishing * feat: enable publishing if workflow was triggered manually * Contracts/update verifier (#673) * update hardhat config * update vc and disclose verifier * update vc and disclose verifier script and run it * update test self verification root * update verifier * bump sdk version and use new hub address * chore: update zk-kit binary merkle root dep (#674) * refactor deployment scripts (#678) * feat: add register eu id instances (#682) * feat: add register eu id instances * feat: add new instances * chore: update scripts * chore: fix sig alg * chore: rm circuits --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> Co-authored-by: Nesopie <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Kevin Lin <[email protected]> Co-authored-by: kevinsslin <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Eric Nakagawa <[email protected]> * fix: commitment hash * fix: register aadhaar test * chore: refactor * feat: reveal data in packed bytes * feat: add constrain on delimiterIndices * feat: reveal timestamp * merge main to feat/aadhaar * fix: tests * feat: hash pubKey * feat: add registry contract * feat: Update HubImplV2 (WIP) * add functions to generate aadhaar data (WIP) * modularize aadhaar data generation (WIP) * fix(wip): register test * fix: test qr extractor * fix * chore: refactor functions * feat: add age extractor and tested * feat: add isMiniumAge check * fix: prepareAadhaarTestData func * registry contract tests * feat: registry contract tests * feat: extract fields from qr data bytes * chore: refactor mockData * feat: move minimum age to revealPackedData * feat: create a constant.ts to retrive fields from unpacked bytes * chore: refactor * fix: exports * rebase * rebase * feat: add public signal ,indices mapping * chore: add public output to indices mapping * fix:AADHAAR_PUBLIC_SIGNAL_INDICES * feat: make nullifier public * fix: nullifier cal for disclose circuits * feat: merge isMiniumAgeValid and miniumAge signal * fix: disclsoe test * feat: support for user identifier and secret * chore :refactor * feat: ofac test last name , firstname * feat: add forbidden_countries_list check * feat: add tests for aadhaar (WIP) * failing ofac tests * feat: finish contract tests * fix: merge conflicts * update the common package to be usable in circuits and contracts * lint everything * coderabbit fixes * chore: update name dob,yob aadhaar ofac tree * feat: merge ofac and reverse ofac check into one * test: merged ofac constrain * SELF-253 feat: add user email feedback (#889) * feat: add sentry feedback * add sentry feedback to web * feat: add custom feedback modal & fix freeze on IOS * yarn nice * update lock * feat: show feedback widget on NFC scan issues (#948) * feat: show feedback widget on NFC scan issues * fix ref * clean up * fix report issue screen * abstract send user feedback email logic * fixes * change text to Report Issue * sanitize email and track event messge * remove unnecessary sanitization * add sanitize error message tests * fix tests * save wip. almost done * fix screen test * fix screen test * remove non working test --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> * chore: centralize license header checks (#952) * chore: centralize license header scripts * chore: run license header checks from root * add header to other files * add header to bundle * add migration script and update check license headers * convert license to mobile sdk * migrate license headers * remove headers from common; convert remaining * fix headers * add license header checks * update unsupported passport screen (#953) * update unsupported passport screen * yarn nice * feat: support new ofac trees * fix: qr extractor tests * chore: remove unassigned age signal * chore: modify timestamp func comment * fix: add constrain on photo bytes delimiter * fix: add range check on minimumAge within 2^7 * fix: range check for country not in list * chore: remove dummy constrain * fix: assert lessthan * fix: check is photoEOI valid * fix: replace maxDataLength with qrPaddedLength for valid del indices * feat: update forbidden countries in disclose and disclose id * feat: convert name to uppercase * fix: add constrain between delimiter and photoEOI * feat: support for phno len 4 and 10 * chore: hard-code attestaion_ID to 3 * feat: calculate nullifier using uppercase name * feat: add real id support * fix: rebase error * chore: refactor * add new nullifier and commitment calc * fix: reuse uppercase name from verify commitment * feat: add a function that will iterate though all pubkeys * chore: skip real id test * chore: yarn format * chore: update yarn.lock * chore: rm trailing / from import * chore: add support for issuing state * chore: linting and types * chore: rm types script from circuits * chore: add license header --------- Co-authored-by: nicoshark <[email protected]> Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: turboblitz <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: crStiv <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: James Niken <[email protected]> Co-authored-by: Kevin Lin <[email protected]> Co-authored-by: leopardracer <[email protected]> Co-authored-by: Olof Andersson <[email protected]> Co-authored-by: vishal <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: kevinsslin <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Eric Nakagawa <[email protected]> * fix: CLA not supported (#1027) * fix: CLA not supported * fix "yarn android" building * remove unnecessary commands --------- Co-authored-by: Justin Hernandez <[email protected]> * chore: bump app version v2.6.5 (#1034) * update gem lock * bump build and version * fix app versions * chore: fix nfc passport reader private repo access (#1042) * add internal repo pat * update nfc passport reader location * update workflows to use PAT to access NFC Passport Reader * fix ci * update logic to access private repo * build(android): support 16KB page size (#1043) * build(android): support 16KB page size * fix 16kb * update lock * chore: bump v2.6.5 for release (#1036) * bump build * update to ssh clone to fix local build * update podfile lock * fix version * Feat/build aadhaar (#1044) * feat: build aadhaar circuits as well in the ci * feat: add register aadhaar case handling * fix aadhaar register output after building the cpp circuit (#1045) * fix: metro js crypto module build issues (#1047) * fix sdk build issues * fix build error * sort and fix dependencies * add constants-browserify * feat: add new verifiers (#1049) * feat: add new verifiers * format: contracts * fix: ofac check to aadhaar (#1050) * fix: hub-v2 (#1051) * Add DisclosureVerified event for comprehensive verification tracking (#945) * Add VerificationPerformed event to track verification calls - Added VerificationPerformed event with comprehensive tracking fields - Captures requestor contract, version, attestation ID, chain ID, config ID, user identifier, output, and user data - Enhanced _executeVerificationFlow to return additional tracking data - Event emission placed after verification completion for accurate tracking * chore: run formatter * chore: rename verify event name to DisclosureVerified * move clearPassportData, markCurrentDocumentAsRegistered, reStorePassportDataWithRightCSCA to SDK (#1041) * Move self app store to mobile sdk (#1040) * chore(mobile-sdk-alpha): remove unused tslib dependency (#1053) * remove tslib -- seems unused * remove deps accidentally added to root * build file * remove unused imports (#1055) * fix: sha256 signed attr tests (#1058) * fix mock screen launch (#1059) * Hotfix: Belgium ID cards (#1061) * feat: parse belgium TD1 mrz android * feat: Parse Belgium TD1 MRZ IOS * fix: OFAC trees not found (#1060) * fix: relax OFAC tree response validation * test: cover OFAC tree edge cases * fix stateless * revert and fix types * fix tests * [SELF-723] feat: add structured NFC and Proof logging (#1048) * feat: add structured NFC logging * fix ci * Fix: add deps * logging fixes. use breadcrumbs * fix android build * update SeverityLevel * [SELF-705] feat: add proof event logging (#1057) * feat: add proof event logging * refactor: unify sentry event logging * fix types * fix mock * simplify * code rabbit feedback * fix tests --------- Co-authored-by: seshanthS <[email protected]> * skip on dev (#1063) * don't get fancy just disable (#1064) * saw it building so gonna try (#1065) * Dev (#1074) * chore: bump v2.6.5 rd2 (#1067) * commit wip version bump * remove from building * chore: update tooling dependencies (#1069) * chore: update tooling dependencies * chore: align react typings and node types * update lock * chore: minor fixes across monorepo (#1068) * small fixes * fixes * fix gesture handler error * ci fixes * fix yarn build; add workflow ci (#1075) * add new workspace ci * disable package version check for now * build before checks * format * fix in future pr * feat: add functions for disclosing aadhaar attributes (#1033) * feat: add functions for disclosing aadhaar attributes * format * chore: update monorepo artifacts (#1079) * remove unneeded artifacts, skip building circuits * update md files * cleans up unused parts of sdk interface, adds inline documentation, (#1078) * cleans up unused parts of sdk interface, adds inline documentation, * fix up build * yolo * Feat/aadhaar sdk (#1082) * feat: add aadhaar support to the ts sdk * feat: aadhaar support to go sdk * chore: refactor * move clearPassportData, markCurrentDocumentAsRegistered, reStorePassportDataWithRightCSCA to SDK (#1041) * Move self app store to mobile sdk (#1040) * chore(mobile-sdk-alpha): remove unused tslib dependency (#1053) * remove tslib -- seems unused * remove deps accidentally added to root * build file * remove unused imports (#1055) * fix: sha256 signed attr tests (#1058) * fix mock screen launch (#1059) * Hotfix: Belgium ID cards (#1061) * feat: parse belgium TD1 mrz android * feat: Parse Belgium TD1 MRZ IOS * fix: OFAC trees not found (#1060) * fix: relax OFAC tree response validation * test: cover OFAC tree edge cases * fix stateless * revert and fix types * fix tests * [SELF-723] feat: add structured NFC and Proof logging (#1048) * feat: add structured NFC logging * fix ci * Fix: add deps * logging fixes. use breadcrumbs * fix android build * update SeverityLevel * [SELF-705] feat: add proof event logging (#1057) * feat: add proof event logging * refactor: unify sentry event logging * fix types * fix mock * simplify * code rabbit feedback * fix tests --------- Co-authored-by: seshanthS <[email protected]> * skip on dev (#1063) * don't get fancy just disable (#1064) * saw it building so gonna try (#1065) * chore: bump v2.6.5 rd2 (#1067) * commit wip version bump * remove from building * chore: update tooling dependencies (#1069) * chore: update tooling dependencies * chore: align react typings and node types * update lock * chore: minor fixes across monorepo (#1068) * small fixes * fixes * fix gesture handler error * ci fixes * fix yarn build; add workflow ci (#1075) * add new workspace ci * disable package version check for now * build before checks * format * fix in future pr * feat: add functions for disclosing aadhaar attributes (#1033) * feat: add functions for disclosing aadhaar attributes * format * chore: update monorepo artifacts (#1079) * remove unneeded artifacts, skip building circuits * update md files * chore: update hub contract address * format * fix: add aadhaar in AllIds * chore: bump to v1.1.0-beta --------- Co-authored-by: vishal <[email protected]> Co-authored-by: Leszek Stachowski <[email protected]> Co-authored-by: Aaron DeRuvo <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: seshanthS <[email protected]> * feat: change to gcp attestation verification (#959) * feat: change to gcp attestation verification * lint * fix e2e test * chore: don't check PCR0 mapping if building the app locally * fmt:fix --------- Co-authored-by: Justin Hernandez <[email protected]> * Mobile SDK: move provingMachine from the app (#1052) * Mobile SDK: move provingMachine from the app * lint, fixes * fix web build? * lint * fix metro build, add deps * update lock files * move the status handlers and proving machine tests * may it be * fix up * yolo --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Aaron DeRuvo <[email protected]> * Revert "Mobile SDK: move provingMachine from the app (#1052)" (#1084) This reverts commit 8983ac22688f731bca8890cbf9be9c85b4ac2bf…
Remove lazy loading to fix mobile deploy workflow
Summary by CodeRabbit
New Features
Refactor
Build
Tests
Chores