-
Notifications
You must be signed in to change notification settings - Fork 198
[SELF-698] scaffold mobile sdk demo app #993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds a new React Native demo app under packages/mobile-sdk-alpha/demo-app, integrates it into root workspaces and package scripts, supplies Android/iOS project scaffolding and RN tooling configs, updates root dependency resolutions, adds a CI workflow to run demo tests/builds, and excludes the demo from SDK linting and unit discovery. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer
participant GH as GitHub (PR)
participant GA as GitHub Actions
participant Repo as Repository
participant YI as Local yarn-install Action
participant Yarn as Yarn (workspace)
GH-->>GA: Open/Update PR touching demo-app
GA->>Repo: actions/checkout@v4
GA->>GA: setup-node (uses .nvmrc)
GA->>YI: ./.github/actions/yarn-install
GA->>Yarn: yarn workspace demo-app test
GA->>Yarn: yarn workspace demo-app build
GA-->>GH: Report status (pass/fail)
sequenceDiagram
autonumber
participant Dev as Developer
participant Metro as Metro Bundler
participant RN as React Native Runtime
participant AR as AppRegistry
participant App as App Component
Dev->>Metro: yarn workspace demo-app start
Metro-->>RN: serve JS bundle
RN->>AR: registerComponent("SelfDemoApp", () => App)
AR->>RN: mount App
RN->>App: render labels
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
✨ 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
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: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
packages/mobile-sdk-alpha/vitest.config.ts (1)
8-13: Use Node test environment for SDK Vitest suitePer our guideline, SDK tests should run in a Node environment; jsdom can mask Node-only issues and slow the suite. Keep the demo-app excluded, but switch the environment.
- environment: 'jsdom', + environment: 'node',packages/mobile-sdk-alpha/README.md (1)
5-11: Docs vs package.json: export conditions mismatch (react-native)README claims export conditions include react-native, but package.json lacks a react-native condition. This can cause incorrect resolution in Metro/bundlers and confuses consumers. Add a react-native condition or fix the README.
Apply this diff in packages/mobile-sdk-alpha/package.json (exports block):
"exports": { ".": { "types": "./dist/esm/index.d.ts", + "react-native": "./dist/esm/index.js", "browser": "./dist/esm/browser.js", "import": "./dist/esm/index.js", "require": "./dist/cjs/index.cjs", "default": "./dist/esm/index.js" },Also update the README if you intend to be dual-package (ESM + CJS) rather than “ESM-only”.
packages/mobile-sdk-alpha/package.json (2)
14-21: Add react-native export condition to match README and avoid resolver ambiguityMetro respects the react-native condition when present. Add it to ensure consistent resolution on RN targets.
"exports": { ".": { "types": "./dist/esm/index.d.ts", + "react-native": "./dist/esm/index.js", "browser": "./dist/esm/browser.js", "import": "./dist/esm/index.js", "require": "./dist/cjs/index.cjs", "default": "./dist/esm/index.js" },
60-63: Re-export DocumentCatalog in @selfxyz/common and update imports
DocumentCatalog lives only in an internal path (@selfxyz/common/utils/types), causing missing-export errors. In common/src/index.ts add:export type { DocumentCatalog } from './utils/types';Then in mobile-sdk-alpha (client.ts, types/public.ts, utils.test.ts, etc.) change all
import { DocumentCatalog } from '@selfxyz/common/utils/types'to
import { DocumentCatalog } from '@selfxyz/common'
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (18)
.github/workflows/mobile-sdk-demo-ci.yml(1 hunks)package.json(1 hunks)packages/mobile-sdk-alpha/.eslintignore(1 hunks)packages/mobile-sdk-alpha/README.md(1 hunks)packages/mobile-sdk-alpha/demo-app/App.tsx(1 hunks)packages/mobile-sdk-alpha/demo-app/__tests__/App.test.tsx(1 hunks)packages/mobile-sdk-alpha/demo-app/app.json(1 hunks)packages/mobile-sdk-alpha/demo-app/babel.config.js(1 hunks)packages/mobile-sdk-alpha/demo-app/index.js(1 hunks)packages/mobile-sdk-alpha/demo-app/jest.config.cjs(1 hunks)packages/mobile-sdk-alpha/demo-app/metro.config.cjs(1 hunks)packages/mobile-sdk-alpha/demo-app/package.json(1 hunks)packages/mobile-sdk-alpha/demo-app/src/GenerateMock.tsx(1 hunks)packages/mobile-sdk-alpha/demo-app/src/ProveQRCode.tsx(1 hunks)packages/mobile-sdk-alpha/demo-app/src/RegisterDocument.tsx(1 hunks)packages/mobile-sdk-alpha/demo-app/tsconfig.json(1 hunks)packages/mobile-sdk-alpha/package.json(1 hunks)packages/mobile-sdk-alpha/vitest.config.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}
⚙️ CodeRabbit configuration file
packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}: Review alpha mobile SDK code for:
- API consistency with core SDK
- Platform-neutral abstractions
- Performance considerations
- Clear experimental notes or TODOs
Files:
packages/mobile-sdk-alpha/demo-app/App.tsxpackages/mobile-sdk-alpha/demo-app/src/GenerateMock.tsxpackages/mobile-sdk-alpha/vitest.config.tspackages/mobile-sdk-alpha/demo-app/index.jspackages/mobile-sdk-alpha/demo-app/src/ProveQRCode.tsxpackages/mobile-sdk-alpha/demo-app/__tests__/App.test.tsxpackages/mobile-sdk-alpha/demo-app/babel.config.jspackages/mobile-sdk-alpha/demo-app/src/RegisterDocument.tsx
**/*.{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:
packages/mobile-sdk-alpha/demo-app/__tests__/App.test.tsx
🧠 Learnings (39)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/demo/** : Provide an in-SDK lightweight React Native demo under packages/mobile-sdk-alpha/demo/
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/samples/** : Create sample applications under packages/mobile-sdk-alpha/samples/ (RN demo and web demo)
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
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/tests/setup.ts : Provide Vitest setup file at packages/mobile-sdk-alpha/tests/setup.ts to suppress console noise
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/index.ts : Re-export new SDK modules via packages/mobile-sdk-alpha/src/index.ts
Learnt from: CR
PR: selfxyz/self#0
File: .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
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: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
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 packages/mobile-sdk-alpha/vitest.config.ts : Use Vitest in the SDK with a Node environment configured in packages/mobile-sdk-alpha/vitest.config.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 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/demo-app/app.jsonpackages/mobile-sdk-alpha/demo-app/App.tsxpackages/mobile-sdk-alpha/demo-app/src/GenerateMock.tsxpackages/mobile-sdk-alpha/.eslintignorepackages/mobile-sdk-alpha/README.mdpackage.jsonpackages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/demo-app/index.js.github/workflows/mobile-sdk-demo-ci.ymlpackages/mobile-sdk-alpha/demo-app/src/ProveQRCode.tsxpackages/mobile-sdk-alpha/demo-app/metro.config.cjspackages/mobile-sdk-alpha/demo-app/__tests__/App.test.tsxpackages/mobile-sdk-alpha/demo-app/jest.config.cjspackages/mobile-sdk-alpha/demo-app/babel.config.jspackages/mobile-sdk-alpha/demo-app/tsconfig.jsonpackages/mobile-sdk-alpha/demo-app/src/RegisterDocument.tsxpackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/**/package.json : Ensure package exports are properly configured
Applied to files:
packages/mobile-sdk-alpha/demo-app/app.jsonpackages/mobile-sdk-alpha/demo-app/App.tsxpackages/mobile-sdk-alpha/.eslintignorepackages/mobile-sdk-alpha/README.mdpackage.jsonpackages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/demo-app/index.jspackages/mobile-sdk-alpha/demo-app/metro.config.cjspackages/mobile-sdk-alpha/demo-app/jest.config.cjspackages/mobile-sdk-alpha/demo-app/babel.config.jspackages/mobile-sdk-alpha/demo-app/tsconfig.jsonpackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/samples/** : Create sample applications under packages/mobile-sdk-alpha/samples/ (RN demo and web demo)
Applied to files:
packages/mobile-sdk-alpha/demo-app/app.jsonpackages/mobile-sdk-alpha/demo-app/App.tsxpackages/mobile-sdk-alpha/.eslintignorepackages/mobile-sdk-alpha/README.mdpackage.jsonpackages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/demo-app/index.js.github/workflows/mobile-sdk-demo-ci.ymlpackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-26T14:49:11.190Z
Learnt from: shazarre
PR: selfxyz/self#936
File: app/src/screens/passport/PassportNFCScanScreen.tsx:28-31
Timestamp: 2025-08-26T14:49:11.190Z
Learning: 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:
packages/mobile-sdk-alpha/demo-app/App.tsx
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/index.ts : Re-export new SDK modules via packages/mobile-sdk-alpha/src/index.ts
Applied to files:
packages/mobile-sdk-alpha/demo-app/App.tsxpackages/mobile-sdk-alpha/demo-app/src/GenerateMock.tsxpackages/mobile-sdk-alpha/vitest.config.tspackages/mobile-sdk-alpha/README.mdpackage.jsonpackages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/demo-app/index.jspackages/mobile-sdk-alpha/demo-app/src/ProveQRCode.tsxpackages/mobile-sdk-alpha/demo-app/metro.config.cjspackages/mobile-sdk-alpha/demo-app/jest.config.cjspackages/mobile-sdk-alpha/demo-app/babel.config.jspackages/mobile-sdk-alpha/demo-app/tsconfig.jsonpackages/mobile-sdk-alpha/demo-app/src/RegisterDocument.tsxpackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-26T14:49:15.210Z
Learnt from: shazarre
PR: selfxyz/self#936
File: app/src/screens/passport/PassportNFCScanScreen.web.tsx:8-11
Timestamp: 2025-08-26T14:49:15.210Z
Learning: The main App.tsx file is located at app/App.tsx (at the app root), not at app/src/App.tsx, and contains the SelfClientProvider wrapping the entire application.
Applied to files:
packages/mobile-sdk-alpha/demo-app/App.tsx
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
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/demo-app/App.tsxpackages/mobile-sdk-alpha/demo-app/src/GenerateMock.tsxpackages/mobile-sdk-alpha/.eslintignorepackages/mobile-sdk-alpha/vitest.config.tspackages/mobile-sdk-alpha/README.mdpackage.jsonpackages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/demo-app/index.jspackages/mobile-sdk-alpha/demo-app/metro.config.cjspackages/mobile-sdk-alpha/demo-app/__tests__/App.test.tsxpackages/mobile-sdk-alpha/demo-app/jest.config.cjspackages/mobile-sdk-alpha/demo-app/babel.config.jspackages/mobile-sdk-alpha/demo-app/tsconfig.jsonpackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{ts,tsx} : Avoid introducing circular dependencies
Applied to files:
packages/mobile-sdk-alpha/demo-app/App.tsxpackages/mobile-sdk-alpha/demo-app/src/GenerateMock.tsxpackages/mobile-sdk-alpha/.eslintignorepackages/mobile-sdk-alpha/vitest.config.tspackage.jsonpackages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/demo-app/index.jspackages/mobile-sdk-alpha/demo-app/metro.config.cjspackages/mobile-sdk-alpha/demo-app/__tests__/App.test.tsxpackages/mobile-sdk-alpha/demo-app/tsconfig.jsonpackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-26T14:41:41.821Z
Learnt from: shazarre
PR: selfxyz/self#936
File: app/src/screens/aesop/PassportOnboardingScreen.tsx:0-0
Timestamp: 2025-08-26T14:41:41.821Z
Learning: When verifying provider hierarchies in React Native apps, always check the main App.tsx file at the app root, not just navigation/index.tsx and layout files, as providers are often configured at the top-level App component.
Applied to files:
packages/mobile-sdk-alpha/demo-app/App.tsx
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/README.md : Document new/updated SDK modules and usage in packages/mobile-sdk-alpha/README.md
Applied to files:
packages/mobile-sdk-alpha/demo-app/App.tsxpackages/mobile-sdk-alpha/README.mdpackage.jsonpackages/mobile-sdk-alpha/demo-app/index.jspackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-26T14:49:11.190Z
Learnt from: shazarre
PR: selfxyz/self#936
File: app/src/screens/passport/PassportNFCScanScreen.tsx:28-31
Timestamp: 2025-08-26T14:49:11.190Z
Learning: SelfClientProvider is wrapped in app/App.tsx, providing context for useSelfClient() hook usage throughout the React Native app navigation stacks.
Applied to files:
packages/mobile-sdk-alpha/demo-app/App.tsx
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
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/demo-app/src/GenerateMock.tsxpackages/mobile-sdk-alpha/.eslintignorepackages/mobile-sdk-alpha/vitest.config.tspackages/mobile-sdk-alpha/README.mdpackage.jsonpackages/mobile-sdk-alpha/demo-app/__tests__/App.test.tsxpackages/mobile-sdk-alpha/demo-app/jest.config.cjs
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to app/jest.setup.js : Provide comprehensive Jest setup in app/jest.setup.js with required mocks
Applied to files:
packages/mobile-sdk-alpha/demo-app/src/GenerateMock.tsxpackages/mobile-sdk-alpha/vitest.config.tspackages/mobile-sdk-alpha/demo-app/jest.config.cjs
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Write integration tests that exercise the real validation logic (not mocks)
Applied to files:
packages/mobile-sdk-alpha/demo-app/src/GenerateMock.tsxpackages/mobile-sdk-alpha/vitest.config.tspackage.jsonpackages/mobile-sdk-alpha/demo-app/__tests__/App.test.tsx
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Never use real user PII in tests; use only synthetic, anonymized, or approved test vectors
Applied to files:
packages/mobile-sdk-alpha/demo-app/src/GenerateMock.tsxpackages/mobile-sdk-alpha/vitest.config.tspackages/mobile-sdk-alpha/demo-app/__tests__/App.test.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 jest.setup.js : Maintain comprehensive mocks in jest.setup.js for all native modules
Applied to files:
packages/mobile-sdk-alpha/demo-app/src/GenerateMock.tsx
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/tests/setup.ts : Provide Vitest setup file at packages/mobile-sdk-alpha/tests/setup.ts to suppress console noise
Applied to files:
packages/mobile-sdk-alpha/demo-app/src/GenerateMock.tsxpackages/mobile-sdk-alpha/.eslintignorepackages/mobile-sdk-alpha/vitest.config.tspackages/mobile-sdk-alpha/demo-app/__tests__/App.test.tsxpackages/mobile-sdk-alpha/demo-app/jest.config.cjspackages/mobile-sdk-alpha/demo-app/tsconfig.json
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{ts,tsx} : Follow ESLint TypeScript-specific rules
Applied to files:
packages/mobile-sdk-alpha/.eslintignorepackages/mobile-sdk-alpha/demo-app/tsconfig.json
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/package.json : Enable tree shaking for the SDK (e.g., ensure 'sideEffects' is correctly set in package.json and exports are ESM-friendly)
Applied to files:
packages/mobile-sdk-alpha/.eslintignorepackages/mobile-sdk-alpha/README.mdpackage.jsonpackages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/demo-app/index.jspackages/mobile-sdk-alpha/demo-app/metro.config.cjspackages/mobile-sdk-alpha/demo-app/babel.config.jspackages/mobile-sdk-alpha/demo-app/tsconfig.jsonpackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{ts,tsx} : Use strict TypeScript type checking across the codebase
Applied to files:
packages/mobile-sdk-alpha/.eslintignorepackages/mobile-sdk-alpha/vitest.config.tspackages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/demo-app/tsconfig.json
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/vitest.config.ts : Use Vitest in the SDK with a Node environment configured in packages/mobile-sdk-alpha/vitest.config.ts
Applied to files:
packages/mobile-sdk-alpha/vitest.config.tspackages/mobile-sdk-alpha/demo-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:
packages/mobile-sdk-alpha/vitest.config.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 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:
packages/mobile-sdk-alpha/README.mdpackage.jsonpackages/mobile-sdk-alpha/demo-app/package.json.github/workflows/mobile-sdk-demo-ci.ymlpackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
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/README.mdpackage.jsonpackages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/package.json
📚 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:
packages/mobile-sdk-alpha/README.md
📚 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:
packages/mobile-sdk-alpha/README.mdpackage.jsonpackages/mobile-sdk-alpha/package.json
📚 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/README.md
📚 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:
package.json
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to app/jest.config.cjs : Use Jest in the app with a React Native preset configured in app/jest.config.cjs
Applied to files:
packages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/demo-app/metro.config.cjspackages/mobile-sdk-alpha/demo-app/jest.config.cjspackages/mobile-sdk-alpha/demo-app/babel.config.jspackages/mobile-sdk-alpha/demo-app/tsconfig.json
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Update the app to consume the mobile-sdk-alpha package and replace local modules with SDK imports
Applied to files:
packages/mobile-sdk-alpha/demo-app/index.js
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/proving/** : Place proof input generation in packages/mobile-sdk-alpha/src/proving/
Applied to files:
packages/mobile-sdk-alpha/demo-app/src/ProveQRCode.tsx
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Verify extractMRZInfo() using published sample MRZ strings (e.g., ICAO examples)
Applied to files:
packages/mobile-sdk-alpha/demo-app/src/ProveQRCode.tsxpackages/mobile-sdk-alpha/demo-app/__tests__/App.test.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:
packages/mobile-sdk-alpha/demo-app/metro.config.cjspackages/mobile-sdk-alpha/demo-app/tsconfig.json
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to app/jest.config.cjs : Configure moduleNameMapper in app/jest.config.cjs to map '@/'' to 'src/' and 'tests/' to 'tests/src/'
Applied to files:
packages/mobile-sdk-alpha/demo-app/metro.config.cjspackages/mobile-sdk-alpha/demo-app/jest.config.cjs
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Ensure parseNFCResponse() works with representative, synthetic NFC data
Applied to files:
packages/mobile-sdk-alpha/demo-app/__tests__/App.test.tsx
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
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:
packages/mobile-sdk-alpha/demo-app/__tests__/App.test.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 tests/src/**/*.{test,spec}.{ts,tsx,js,jsx} : Use renderHook for custom hook testing
Applied to files:
packages/mobile-sdk-alpha/demo-app/__tests__/App.test.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/**/*.{ios.ts,ios.tsx,android.ts,android.tsx} : Use platform-specific files (.ios.tsx/.android.tsx etc.) for differing implementations
Applied to files:
packages/mobile-sdk-alpha/demo-app/tsconfig.json
🔇 Additional comments (13)
packages/mobile-sdk-alpha/demo-app/app.json (1)
1-4: LGTM: app identity scaffold is correctName/displayName pair matches RN conventions and is compatible with AppRegistry usage.
package.json (1)
11-13: demo-app is private and its build step won’t produce a React Native bundle
The demo-app’s package.json has"private": trueand itsbuildscript only runstsc –noEmit, so the rootyarn workspaces foreach … run buildwon’t create any RN bundle.packages/mobile-sdk-alpha/.eslintignore (1)
1-1: LGTM: isolate SDK linting from app codeIgnoring demo-app in the SDK package avoids cross-tooling noise.
packages/mobile-sdk-alpha/README.md (1)
112-130: Verified demo-app workspace exists and matches README
Thepackages/mobile-sdk-alpha/demo-app/package.jsondefines"name": "demo-app"and the rootworkspacesarray includespackages/mobile-sdk-alpha/demo-app, so therun:democommands are correct.packages/mobile-sdk-alpha/demo-app/src/GenerateMock.tsx (1)
5-8: Placeholder is okay for scaffold; ensure it’s either wired or excluded from prod bundlesReturning null is fine now. When you wire this screen, avoid importing heavy SDK modules at module top to keep initial bundle small; lazy-load within the screen.
Add a TODO to track wiring this screen in App navigation, or confirm it’s intentionally unused for now.
packages/mobile-sdk-alpha/demo-app/src/ProveQRCode.tsx (1)
5-8: Scaffold acknowledged; plan for QR scanner permission flowWhen implementing, request camera permissions at runtime and handle denial gracefully to avoid app crashes. Consider lazy-loading the scanner to keep cold-start fast.
packages/mobile-sdk-alpha/demo-app/babel.config.js (1)
5-7: LGTM: Minimal RN Babel presetThis is sufficient for the current demo. If you add Reanimated, append its plugin last to avoid runtime errors.
packages/mobile-sdk-alpha/package.json (1)
55-58: demo-app workspace confirmed
Thepackages/mobile-sdk-alpha/demo-appworkspace is listed in the rootworkspacesarray and itspackage.jsonname is"demo-app", so no renaming or script updates are required.packages/mobile-sdk-alpha/demo-app/src/RegisterDocument.tsx (1)
5-8: Scaffold is fine; placeholder won’t confuse users.Returning null is acceptable for initial scaffold. No blocking issues here.
packages/mobile-sdk-alpha/demo-app/jest.config.cjs (1)
5-9: Ensure Jest transformers are installed.The react-native preset relies on babel-jest and @babel/core. Verify they’re present in demo-app devDependencies to avoid “Cannot find module 'babel-jest'” at runtime.
packages/mobile-sdk-alpha/demo-app/metro.config.cjs (1)
12-25: Metro config looks solid for monorepo usage.Symlinks, package exports, and shared @babel/runtime are correctly handled. No blocking issues observed.
packages/mobile-sdk-alpha/demo-app/index.js (1)
5-10: Entrypoint wiring and app.json name uniqueness verified
package.json’s main correctly points to index.js and app.json “SelfDemoApp” is unique (no collisions with “OpenPassport”).packages/mobile-sdk-alpha/demo-app/App.tsx (1)
8-17: LGTM: minimal, side-effect-free demo shell.Static UI, no IO or sensitive data; safe baseline for CI and local runs.
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: 9
♻️ Duplicate comments (1)
packages/mobile-sdk-alpha/demo-app/package.json (1)
19-29: Add babel-jest; Jest needs a transformer for RN/TS.Without babel-jest, tests won’t transform TS/JSX and will error at runtime.
"devDependencies": { + "babel-jest": "29.7.0", "@babel/core": "^7.27.1", "@babel/plugin-transform-modules-commonjs": "^7.27.1", "@tsconfig/react-native": "3.0.0", "@types/jest": "29.5.11", "@types/react": "18.3.4", "jest": "29.7.0", "metro-react-native-babel-preset": "0.76.9", "react-test-renderer": "18.3.1", "typescript": "5.9.2" }
🧹 Nitpick comments (10)
packages/mobile-sdk-alpha/demo-app/android/settings.gradle (1)
3-3: Verify CI ensures Node/Yarn availability during Gradle configuration.autolinkLibrariesFromCommand() runs at configuration time and shells out to the RN CLI. If Node (and yarn/npm/pnpm) isn’t on PATH in CI or Android Studio’s Gradle daemon, autolinking will fail early.
Ensure your Android CI job sets up Node before any Gradle tasks (e.g., actions/setup-node) and exports PATH for the Gradle daemon. If needed, I can propose a minimal CI snippet to guarantee this ordering.
packages/mobile-sdk-alpha/demo-app/package.json (1)
13-18: If metro.config.cjs imports @react-native/metro-config, add it and pin to RN version.Prevents Metro mismatches and CI flakiness.
"dependencies": { "@babel/runtime": "^7.25.0", - "@react-native/gradle-plugin": "0.76.9", "react": "18.3.1", "react-native": "0.76.9" }, "devDependencies": { + "@react-native/metro-config": "0.76.9", "@babel/core": "^7.27.1", "@babel/plugin-transform-modules-commonjs": "^7.27.1", "@tsconfig/react-native": "3.0.0", "@types/jest": "29.5.11", "@types/react": "18.3.4", "jest": "29.7.0", "metro-react-native-babel-preset": "0.76.9", "react-test-renderer": "18.3.1", "typescript": "5.9.2" }If your metro.config.cjs uses react-native/metro-config instead, ignore this.
Also applies to: 19-29
packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/AppDelegate.swift (1)
41-47: Release bundle must be embedded or the app will fail to load in production.Bundle.main.url(forResource: "main", withExtension: "jsbundle") returns nil if the “Bundle React Native code and images” build phase isn’t present/enabled for Release. Confirm the Run Script phase exists on the iOS target and runs for Release.
packages/mobile-sdk-alpha/demo-app/ios/Podfile (2)
1-7: Add a fallback when Node/require.resolve fails to locate react_native_pods.rb.Improves resilience in CI or atypical monorepo setups where Node resolution may intermittently fail.
-# Resolve react_native_pods.rb with node to allow for hoisting -require Pod::Executable.execute_command("node", ["-p", - 'require.resolve( - "react-native/scripts/react_native_pods.rb", - {paths: [process.argv[1]]}, - )', __dir__]).strip +# Resolve react_native_pods.rb with node to allow for hoisting; fallback to local path if resolve fails +begin + rn_pods_script = Pod::Executable.execute_command("node", ["-p", + 'require.resolve( + "react-native/scripts/react_native_pods.rb", + {paths: [process.argv[1]]}, + )', __dir__]).strip + require rn_pods_script +rescue StandardError + require File.expand_path("../node_modules/react-native/scripts/react_native_pods.rb", __dir__) +end
11-15: Validate USE_FRAMEWORKS to only accept 'static' or 'dynamic'.Prevents confusing install failures if a non-supported value (e.g., "true" or "YES") is provided.
-linkage = ENV["USE_FRAMEWORKS"] -if linkage != nil - Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green - use_frameworks! :linkage => linkage.to_sym -end +linkage = ENV["USE_FRAMEWORKS"] +if linkage + if %w[static dynamic].include?(linkage) + Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green + use_frameworks! :linkage => linkage.to_sym + else + Pod::UI.warn "Ignoring USE_FRAMEWORKS='#{linkage}'. Valid values are 'static' or 'dynamic'." + end +endpackages/mobile-sdk-alpha/demo-app/android/app/src/debug/AndroidManifest.xml (1)
5-8: Confirm cleartext traffic is disabled in release; optionally scope it tighter for debug.Enabling
android:usesCleartextTraffic="true"in the debug manifest is fine, but please confirm the main/release manifests do not also set or inherit this (to avoid accidental cleartext in production). Optionally, prefer a debug-onlyandroid:networkSecurityConfigthat permits cleartext only to localhost/dev hosts instead of allowing all cleartext.If you want, I can add a
res/xml/network_security_config_debug.xmland wire it here so only specific domains are allowed during debug.packages/mobile-sdk-alpha/demo-app/android/build.gradle (1)
15-17: Pin classpath plugin versions or source them from the root to ensure reproducible builds.Unpinned Gradle plugin classpaths can lead to non-deterministic builds. Either:
- Pin explicit versions here that match the monorepo’s AGP/Kotlin matrix, or
- Remove these from here and rely on versions provided by the root pluginManagement/version catalog.
I can draft a change aligned to whatever AGP/Kotlin versions your root project uses once you confirm them.
packages/mobile-sdk-alpha/demo-app/android/gradle.properties (1)
25-29: Confirm ABI matrix is intentional for CI performance.Building all ABIs (armeabi-v7a, arm64-v8a, x86, x86_64) increases CI time/artifacts. For release builds of the demo, consider limiting to arm64-v8a (and x86_64 for emulators) while keeping all ABIs for debug when needed.
If desired, I can wire variant-specific ABI splits so debug builds keep all ABIs and release builds are trimmed.
packages/mobile-sdk-alpha/demo-app/android/app/src/main/res/drawable/rn_edit_text_material.xml (1)
16-37: Avoid private AppCompat drawables (abc_*)
rn_edit_text_material.xmlstill references internal@drawable/abc_textfield_*without an explicitandroidx.appcompat:appcompatdependency in the demo-app, risking resource-merge failures if AppCompat is updated or removed. Either add the AppCompat implementation topackages/mobile-sdk-alpha/demo-app/android/app/build.gradleor migrate these to MaterialComponents’ TextInput drawables.packages/mobile-sdk-alpha/demo-app/android/app/build.gradle (1)
100-106: Prevent debug keystore in CI releasesUsing the debug keystore for release is fine locally (per team preference), but block it in CI to avoid accidentally distributing improperly signed artifacts.
Apply:
release { // Caution! In production, you need to generate your own keystore file. // see https://reactnative.dev/docs/signed-apk-android. - signingConfig signingConfigs.debug + signingConfig signingConfigs.debug + if (System.getenv('CI') == 'true') { + throw new GradleException("Refusing to assemble a release with debug signing on CI") + } minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (11)
packages/mobile-sdk-alpha/demo-app/android/app/src/main/res/mipmap-hdpi/ic_launcher.pngis excluded by!**/*.pngpackages/mobile-sdk-alpha/demo-app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.pngis excluded by!**/*.pngpackages/mobile-sdk-alpha/demo-app/android/app/src/main/res/mipmap-mdpi/ic_launcher.pngis excluded by!**/*.pngpackages/mobile-sdk-alpha/demo-app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.pngis excluded by!**/*.pngpackages/mobile-sdk-alpha/demo-app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.pngis excluded by!**/*.pngpackages/mobile-sdk-alpha/demo-app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.pngis excluded by!**/*.pngpackages/mobile-sdk-alpha/demo-app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.pngis excluded by!**/*.pngpackages/mobile-sdk-alpha/demo-app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.pngis excluded by!**/*.pngpackages/mobile-sdk-alpha/demo-app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.pngis excluded by!**/*.pngpackages/mobile-sdk-alpha/demo-app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.pngis excluded by!**/*.pngyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (30)
packages/mobile-sdk-alpha/.prettierignore(1 hunks)packages/mobile-sdk-alpha/demo-app/.gitignore(1 hunks)packages/mobile-sdk-alpha/demo-app/App.tsx(1 hunks)packages/mobile-sdk-alpha/demo-app/android/app/build.gradle(1 hunks)packages/mobile-sdk-alpha/demo-app/android/app/proguard-rules.pro(1 hunks)packages/mobile-sdk-alpha/demo-app/android/app/src/debug/AndroidManifest.xml(1 hunks)packages/mobile-sdk-alpha/demo-app/android/app/src/main/AndroidManifest.xml(1 hunks)packages/mobile-sdk-alpha/demo-app/android/app/src/main/java/com/selfdemoapp/MainActivity.kt(1 hunks)packages/mobile-sdk-alpha/demo-app/android/app/src/main/java/com/selfdemoapp/MainApplication.kt(1 hunks)packages/mobile-sdk-alpha/demo-app/android/app/src/main/res/drawable/rn_edit_text_material.xml(1 hunks)packages/mobile-sdk-alpha/demo-app/android/app/src/main/res/values/strings.xml(1 hunks)packages/mobile-sdk-alpha/demo-app/android/app/src/main/res/values/styles.xml(1 hunks)packages/mobile-sdk-alpha/demo-app/android/build.gradle(1 hunks)packages/mobile-sdk-alpha/demo-app/android/gradle.properties(1 hunks)packages/mobile-sdk-alpha/demo-app/android/settings.gradle(1 hunks)packages/mobile-sdk-alpha/demo-app/babel.config.js(1 hunks)packages/mobile-sdk-alpha/demo-app/index.js(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/.xcode.env(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/Podfile(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp.xcodeproj/project.pbxproj(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp.xcodeproj/xcshareddata/xcschemes/TempProject.xcscheme(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/AppDelegate.swift(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/Images.xcassets/AppIcon.appiconset/Contents.json(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/Images.xcassets/Contents.json(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/Info.plist(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/LaunchScreen.storyboard(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/PrivacyInfo.xcprivacy(1 hunks)packages/mobile-sdk-alpha/demo-app/metro.config.cjs(1 hunks)packages/mobile-sdk-alpha/demo-app/package.json(1 hunks)packages/mobile-sdk-alpha/package.json(2 hunks)
✅ Files skipped from review due to trivial changes (8)
- packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/Images.xcassets/Contents.json
- packages/mobile-sdk-alpha/demo-app/android/app/proguard-rules.pro
- packages/mobile-sdk-alpha/demo-app/ios/.xcode.env
- packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/Images.xcassets/AppIcon.appiconset/Contents.json
- packages/mobile-sdk-alpha/.prettierignore
- packages/mobile-sdk-alpha/demo-app/.gitignore
- packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp.xcodeproj/project.pbxproj
- packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp.xcodeproj/xcshareddata/xcschemes/TempProject.xcscheme
🚧 Files skipped from review as they are similar to previous changes (3)
- packages/mobile-sdk-alpha/demo-app/index.js
- packages/mobile-sdk-alpha/demo-app/babel.config.js
- packages/mobile-sdk-alpha/demo-app/App.tsx
🧰 Additional context used
📓 Path-based instructions (2)
packages/mobile-sdk-alpha/**/package.json
📄 CodeRabbit inference engine (packages/mobile-sdk-alpha/AGENTS.md)
packages/mobile-sdk-alpha/**/package.json: Ensure package exports are properly configured
Verify package conditions are valid (e.g., exports conditions)
Files:
packages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/package.json
packages/mobile-sdk-alpha/package.json
📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)
packages/mobile-sdk-alpha/package.json: Expose a 'test:build' script in the SDK's package.json that runs build, test, types, and lint
Enable tree shaking for the SDK (e.g., ensure 'sideEffects' is correctly set in package.json and exports are ESM-friendly)
Files:
packages/mobile-sdk-alpha/package.json
🧠 Learnings (23)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/demo/** : Provide an in-SDK lightweight React Native demo under packages/mobile-sdk-alpha/demo/
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/samples/** : Create sample applications under packages/mobile-sdk-alpha/samples/ (RN demo and web demo)
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
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/index.ts : Re-export new SDK modules via packages/mobile-sdk-alpha/src/index.ts
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Write integration tests that exercise the real validation logic (not mocks)
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{ts,tsx} : Avoid introducing circular dependencies
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
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)
📚 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/demo-app/android/gradle.propertiespackages/mobile-sdk-alpha/demo-app/android/build.gradlepackages/mobile-sdk-alpha/demo-app/android/settings.gradlepackages/mobile-sdk-alpha/demo-app/metro.config.cjspackages/mobile-sdk-alpha/demo-app/android/app/src/main/java/com/selfdemoapp/MainApplication.ktpackages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/LaunchScreen.storyboardpackages/mobile-sdk-alpha/demo-app/android/app/build.gradlepackages/mobile-sdk-alpha/demo-app/ios/Podfilepackages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/AppDelegate.swiftpackages/mobile-sdk-alpha/demo-app/android/app/src/main/java/com/selfdemoapp/MainActivity.ktpackages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-07-29T01:08:28.530Z
Learnt from: transphorm
PR: selfxyz/self#795
File: app/android/app/build.gradle:157-158
Timestamp: 2025-07-29T01:08:28.530Z
Learning: For this React Native project, the team prefers build flexibility over fail-fast behavior for release builds in app/android/app/build.gradle. They intentionally allow fallback to debug signing for local development runs, relying on Google Play Console validation to catch any improperly signed releases during upload.
Applied to files:
packages/mobile-sdk-alpha/demo-app/android/gradle.propertiespackages/mobile-sdk-alpha/demo-app/android/build.gradlepackages/mobile-sdk-alpha/demo-app/android/settings.gradlepackages/mobile-sdk-alpha/demo-app/android/app/build.gradle
📚 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/samples/** : Create sample applications under packages/mobile-sdk-alpha/samples/ (RN demo and web demo)
Applied to files:
packages/mobile-sdk-alpha/demo-app/android/settings.gradlepackages/mobile-sdk-alpha/demo-app/ios/Podfilepackages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/index.ts : Re-export new SDK modules via packages/mobile-sdk-alpha/src/index.ts
Applied to files:
packages/mobile-sdk-alpha/demo-app/metro.config.cjspackages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/**/package.json : Ensure package exports are properly configured
Applied to files:
packages/mobile-sdk-alpha/demo-app/metro.config.cjspackages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/package.json
📚 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/demo-app/metro.config.cjs
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
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/demo-app/metro.config.cjspackages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to app/jest.config.cjs : Use Jest in the app with a React Native preset configured in app/jest.config.cjs
Applied to files:
packages/mobile-sdk-alpha/demo-app/metro.config.cjspackages/mobile-sdk-alpha/demo-app/ios/Podfilepackages/mobile-sdk-alpha/demo-app/package.json
📚 Learning: 2025-08-24T21:22:29.459Z
Learnt from: transphorm
PR: selfxyz/self#943
File: app/android/app/src/main/java/com/proofofpassportapp/MainApplication.kt:17-17
Timestamp: 2025-08-24T21:22:29.459Z
Learning: OpenSourceMergedSoMapping from com.facebook.react.soloader.OpenSourceMergedSoMapping is available and functional in React Native 0.75.x. It can be safely imported and used for SoLoader initialization in MainApplication.kt without causing build failures.
Applied to files:
packages/mobile-sdk-alpha/demo-app/android/app/src/main/java/com/selfdemoapp/MainApplication.kt
📚 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/demo-app/android/app/build.gradlepackages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/README.md : Document new/updated SDK modules and usage in packages/mobile-sdk-alpha/README.md
Applied to files:
packages/mobile-sdk-alpha/demo-app/ios/Podfilepackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-02T23:53:45.928Z
Learnt from: transphorm
PR: selfxyz/self#823
File: app/ios/Self.xcodeproj/project.pbxproj:320-332
Timestamp: 2025-08-02T23:53:45.928Z
Learning: When reviewing autogenerated scripts in Xcode project files (like React Native Firebase's embedded shell scripts), avoid suggesting edits since these are regenerated during pod install and cannot be manually modified by users.
Applied to files:
packages/mobile-sdk-alpha/demo-app/ios/Podfile
📚 Learning: 2025-08-29T15:30:12.155Z
Learnt from: CR
PR: selfxyz/self#0
File: app/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:12.155Z
Learning: From app/ios, run bundle install && bundle exec pod install (or from app run npx pod-install)
Applied to files:
packages/mobile-sdk-alpha/demo-app/ios/Podfile
📚 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:
packages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
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/demo-app/package.jsonpackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{ts,tsx} : Avoid introducing circular dependencies
Applied to files:
packages/mobile-sdk-alpha/demo-app/package.jsonpackages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{ts,tsx} : Use strict TypeScript type checking across the codebase
Applied to files:
packages/mobile-sdk-alpha/demo-app/package.json
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
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/demo-app/package.json
📚 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:
packages/mobile-sdk-alpha/demo-app/package.json
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Ensure parseNFCResponse() works with representative, synthetic NFC data
Applied to files:
packages/mobile-sdk-alpha/demo-app/package.json
📚 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:
packages/mobile-sdk-alpha/package.json
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to 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:
packages/mobile-sdk-alpha/package.json
🪛 RuboCop (1.76.1)
packages/mobile-sdk-alpha/demo-app/ios/Podfile
[convention] 6-6: Put a comma after the last item of a multiline array.
(Style/TrailingCommaInArrayLiteral)
[convention] 23-23: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 31-31: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: build-android
- GitHub Check: build-ios
- GitHub Check: test
- GitHub Check: analyze-android
🔇 Additional comments (13)
packages/mobile-sdk-alpha/package.json (1)
42-46: No changes needed for demo workspace scripts
Thedemo-appworkspace is correctly named and itspackage.jsondefinesbuild,android,ios,start, andtestscripts, so the existingyarn workspace demo-app …commands are valid.packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/PrivacyInfo.xcprivacy (1)
5-31: Verify privacy manifest usage and embedding
Automated scan found no occurrences of UserDefaults, file-timestamp, or system-boot-time APIs under packages/mobile-sdk-alpha/demo-app/ios nor confirmation of PrivacyInfo.xcprivacy in the Copy Bundle Resources phase; manually confirm that each reason code corresponds to actual API access and that the .xcprivacy file is embedded in the Xcode target. If you use UserDefaults via App Groups/extensions, replace CA92.1 with 1C8F.1.packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/LaunchScreen.storyboard (1)
1-47: LGTM — static, constraint-based launch screen is compliant.No dynamic content; safe-area constraints look fine for App Store requirements.
packages/mobile-sdk-alpha/demo-app/ios/Podfile (2)
1-9: Add iOS CocoaPods install and simulator build to CI
Ensure your CI pipeline runsbundle install && bundle exec pod install --repo-update(ornpx pod-installif Bundler isn’t available) followed by anxcodebuildsimulator build of theSelfDemoAppworkspace. This will catch Podfile misconfigurations and hook issues before merging.
26-35: Move post_install to top-level (outside the target block) to ensure CocoaPods runs the hook.CocoaPods expects post_install at the Podfile root. Nesting it inside target can lead to the hook not registering (or NoMethodError), skipping RN fix-ups (Hermes, architectures), and causing build failures.
Apply this diff to remove the nested hook:
- post_install do |installer| - # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 - react_native_post_install( - installer, - config[:reactNativePath], - :mac_catalyst_enabled => false, - # :ccache_enabled => true - ) - end endThen append this at the Podfile root (after the target block):
post_install do |installer| # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb react_native_post_install( installer, react_native_path(), :mac_catalyst_enabled => false, # :ccache_enabled => true ) end⛔ Skipped due to learnings
Learnt from: CR PR: selfxyz/self#0 File: app/AGENTS.md:0-0 Timestamp: 2025-08-29T15:30:12.155Z Learning: From app/ios, run bundle install && bundle exec pod install (or from app run npx pod-install)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/packages/mobile-sdk-alpha/demo-app/android/app/src/main/res/values/strings.xml (1)
1-3: LGTM — consistent app identity.String resource is straightforward and consistent with the demo UI.
packages/mobile-sdk-alpha/demo-app/android/build.gradle (1)
21-21: LGTM — correct RN root project plugin usage.Applying the React Native root project plugin here is consistent with RN templates.
packages/mobile-sdk-alpha/demo-app/android/gradle.properties (1)
37-39: Hermes enabled — ensure dependencies are compatible.With
hermesEnabled=true, confirm any native modules in the monorepo (or transitive deps) don’t require JSC-only features. If they do, we can gate Hermes per buildType.packages/mobile-sdk-alpha/demo-app/android/app/src/main/res/values/styles.xml (1)
4-7: LGTM — minimal AppCompat theme is fine.DayNight NoActionBar with RN’s edit text background is standard and safe.
packages/mobile-sdk-alpha/demo-app/android/app/build.gradle (2)
114-118: Ignore the defensive default forhermesEnabled
ReferencinghermesEnabled.toBoolean()is safe here—hermesEnabledis defined in packages/mobile-sdk-alpha/demo-app/android/gradle.properties (line 39), so there’s no risk of aMissingPropertyException.Likely an incorrect or invalid review comment.
73-74: Pin JSC version; avoid wildcard '+'
Avoid using a ‘+’ in the JSC coordinate to guarantee reproducible, audited builds—extract the exact version into gradle.properties.--- packages/mobile-sdk-alpha/demo-app/android/app/build.gradle @@ -73 +73 -def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+' +def jscVersion = findProperty("JSC_VERSION") ?: "2026004.0" +def jscFlavor = "io.github.react-native-community:jsc-android:${jscVersion}"Then add to packages/mobile-sdk-alpha/demo-app/android/gradle.properties:
JSC_VERSION=2026004.0⛔ Skipped due to learnings
Learnt from: transphorm PR: selfxyz/self#636 File: app/android/app/build.gradle:76-76 Timestamp: 2025-06-30T15:51:11.193Z Learning: For React Native 0.80, the correct JSC version is `io.github.react-native-community:jsc-android:2026004.+`. This version was specifically built with Android NDK r23 to align with React Native 0.80's NDK requirements and prevent compatibility issues. The `2026004` version pattern is the official version for RN 0.80, not an outdated pin.Learnt from: transphorm PR: selfxyz/self#795 File: app/android/app/build.gradle:157-158 Timestamp: 2025-07-29T01:08:28.530Z Learning: For this React Native project, the team prefers build flexibility over fail-fast behavior for release builds in app/android/app/build.gradle. They intentionally allow fallback to debug signing for local development runs, relying on Google Play Console validation to catch any improperly signed releases during upload.packages/mobile-sdk-alpha/demo-app/android/app/src/main/java/com/selfdemoapp/MainActivity.kt (1)
10-27: Activity wiring looks correctComponent name matches the delegate and host retrieval; Fabric flag is correctly plumbed through DefaultReactActivityDelegate.
packages/mobile-sdk-alpha/demo-app/android/app/src/main/java/com/selfdemoapp/MainApplication.kt (1)
31-38: No compatibility guard needed
OpenSourceMergedSoMapping is supported in React Native 0.75.x and up, so the fallback for older SoLoader APIs isn’t required here.
| @@ -0,0 +1,26 @@ | |||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"> | |||
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.
Missing manifest package when using relative component names
Relative names (".MainApplication", ".MainActivity") rely on the manifest package. Add package="com.selfdemoapp" or fully-qualify component names. Without this, component resolution can fail on some AGP/RN combinations.
Apply:
-<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.selfdemoapp">Alternative (if you prefer no package attribute):
- android:name=".MainApplication"
+ android:name="com.selfdemoapp.MainApplication"
@@
- android:name=".MainActivity"
+ android:name="com.selfdemoapp.MainActivity"📝 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.
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.selfdemoapp"> |
🤖 Prompt for AI Agents
In packages/mobile-sdk-alpha/demo-app/android/app/src/main/AndroidManifest.xml
around line 1, the manifest element is missing a package attribute which breaks
relative component names like ".MainApplication" and ".MainActivity"; fix by
adding package="com.selfdemoapp" to the <manifest> element or alternatively
update all component entries to use fully-qualified class names (e.g.
com.selfdemoapp.MainActivity / com.selfdemoapp.MainApplication) so component
resolution works across AGP/RN combinations.
| buildToolsVersion = "36.0.0" | ||
| minSdkVersion = 24 | ||
| compileSdkVersion = 36 | ||
| targetSdkVersion = 36 | ||
| ndkVersion = "27.1.12297006" | ||
| kotlinVersion = "2.1.20" |
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.
💡 Verification agent
🧩 Analysis chain
Verify toolchain/API levels; API 36 may not be available across your build agents yet.
Setting compile/target SDK to 36 and buildTools 36.0.0 could break CI/local builds if your installed Android SDK/AGP don’t support 36 as of August 2025. Align these to the monorepo’s canonical Android settings (or to the RN template your repo uses), and prefer centralization to avoid drift.
Run this to locate the canonical versions in the repo and spot mismatches:
If needed, I can prepare a patch to read these from a shared root ext or version catalog.
🏁 Script executed:
#!/bin/bash
# Find declared Android SDK/toolchain versions across the repo
rg -nP -C2 --glob '!**/node_modules/**' '\b(compileSdk(?:Version)?|targetSdk(?:Version)?|buildToolsVersion)\s*=?\s*"?\d+'
rg -nP -C2 --glob '!**/node_modules/**' 'ndkVersion\s*=\s*"[^"]+"'
rg -nP -C2 --glob '!**/node_modules/**' 'kotlinVersion\s*=\s*"[^"]+"'
rg -nP -C2 --glob '!**/node_modules/**' 'com\.android\.tools\.build:gradle'Length of output: 6494
🏁 Script executed:
#!/bin/bash
# Show the head of the demo-app Android build.gradle to verify plugin versions
sed -n '1,50p' packages/mobile-sdk-alpha/demo-app/android/build.gradleLength of output: 617
Align demo-app’s Android toolchain versions to monorepo’s canonical settings
The demo-app’s ext block (packages/mobile-sdk-alpha/demo-app/android/build.gradle) currently pins compile/targetSdkVersion 36, buildToolsVersion "36.0.0", ndkVersion "27.1.12297006" and kotlinVersion "2.1.20", whereas the main app modules use compile/targetSdkVersion 35, buildToolsVersion "35.0.0", ndkVersion "27.0.11718014", kotlinVersion "1.9.24" and AGP 8.6.0. Centralize these values in a root ext block or version catalog to prevent CI/local build failures.
packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/AppDelegate.swift
Outdated
Show resolved
Hide resolved
| <key>NSAppTransportSecurity</key> | ||
| <dict> | ||
| <!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! --> | ||
| <key>NSAllowsArbitraryLoads</key> | ||
| <false/> | ||
| <key>NSAllowsLocalNetworking</key> | ||
| <true/> | ||
| </dict> |
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.
💡 Verification agent
❓ Verification inconclusive
Scope NSAllowsLocalNetworking to Debug only (principle of least privilege).
Allowing local networking globally isn’t typically needed in Release and can broaden attack surface. Consider a Debug-only Info.plist or a build setting–driven toggle.
Scope NSAllowsLocalNetworking to Debug builds only
NSAllowsLocalNetworking must be removed from Release. Extract it into a Debug‐only Info.plist (or inject via a build‐setting variable) so production releases do not include the key.
🤖 Prompt for AI Agents
In packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/Info.plist around lines
27–34, NSAllowsLocalNetworking is currently present for all builds; remove it
from the Release product and ensure it is only present for Debug builds by
either (A) creating a Debug-only Info.plist (e.g., Info-Debug.plist) that
contains the NSAppTransportSecurity/NSAllowsLocalNetworking entry, point the
Debug build configuration to that plist in the Xcode target settings and leave
the Release configuration pointing to the existing Info.plist (with
NSAllowsLocalNetworking removed), or (B) replace the literal key with a
build-variable entry (e.g., NSAllowsLocalNetworking = $(ALLOW_LOCAL_NETWORKING))
in Info.plist and define ALLOW_LOCAL_NETWORKING = true in the Debug build
settings and unset or false in Release; then test Debug and Archive/Release
builds to confirm the key is absent from production binaries.
| watchFolders: [ | ||
| path.resolve(__dirname, '../../..'), // monorepo root | ||
| ], |
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
Watch scope is broad; add a block list to protect performance on large monorepos.
Watching the entire repo can overwhelm file watchers (especially on macOS/Windows) and slow HMR. The blockList above keeps Metro responsive without changing behavior.
| extraNodeModules: { | ||
| '@babel/runtime': path.resolve(__dirname, '../../../node_modules/@babel/runtime'), | ||
| }, | ||
| nodeModulesPaths: [path.resolve(__dirname, 'node_modules'), path.resolve(__dirname, '../../../node_modules')], | ||
| }, |
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
Pin React and React Native to the monorepo root to avoid duplicate-module crashes.
In a monorepo, Metro can resolve secondary copies of react/react-native from sibling packages, causing redbox errors (“Multiple copies of React” / duplicated native modules). Explicitly map these to the root and enable symlink-aware resolution.
Apply:
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
+const exclusionList = require('metro-config/src/defaults/exclusionList');
...
resolver: {
extraNodeModules: {
'@babel/runtime': path.resolve(__dirname, '../../../node_modules/@babel/runtime'),
+ react: path.resolve(__dirname, '../../../node_modules/react'),
+ 'react-native': path.resolve(__dirname, '../../../node_modules/react-native'),
},
- nodeModulesPaths: [path.resolve(__dirname, 'node_modules'), path.resolve(__dirname, '../../../node_modules')],
+ nodeModulesPaths: [
+ path.resolve(__dirname, 'node_modules'),
+ path.resolve(__dirname, '../../../node_modules'),
+ ],
+ unstable_enableSymlinks: true,
+ blockList: exclusionList([
+ // prevent Metro from traversing large build outputs across the monorepo
+ /.*\/(dist|build|lib)\/.*/,
+ /.*\/(android\/build|ios\/Pods)\/.*/,
+ /.*\/\.expo\/.*/,
+ /.*\/\.next\/.*/,
+ ]),
},📝 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.
| extraNodeModules: { | |
| '@babel/runtime': path.resolve(__dirname, '../../../node_modules/@babel/runtime'), | |
| }, | |
| nodeModulesPaths: [path.resolve(__dirname, 'node_modules'), path.resolve(__dirname, '../../../node_modules')], | |
| }, | |
| const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); | |
| const exclusionList = require('metro-config/src/defaults/exclusionList'); | |
| module.exports = mergeConfig(getDefaultConfig(__dirname), { | |
| resolver: { | |
| extraNodeModules: { | |
| '@babel/runtime': path.resolve(__dirname, '../../../node_modules/@babel/runtime'), | |
| react: path.resolve(__dirname, '../../../node_modules/react'), | |
| 'react-native': path.resolve(__dirname, '../../../node_modules/react-native'), | |
| }, | |
| nodeModulesPaths: [ | |
| path.resolve(__dirname, 'node_modules'), | |
| path.resolve(__dirname, '../../../node_modules'), | |
| ], | |
| unstable_enableSymlinks: true, | |
| blockList: exclusionList([ | |
| // prevent Metro from traversing large build outputs across the monorepo | |
| /.*\/(dist|build|lib)\/.*/, | |
| /.*\/(android\/build|ios\/Pods)\/.*/, | |
| /.*\/\.expo\/.*/, | |
| /.*\/\.next\/.*/, | |
| ]), | |
| }, | |
| }); |
🤖 Prompt for AI Agents
In packages/mobile-sdk-alpha/demo-app/metro.config.cjs around lines 15 to 19,
pin React and React Native to the monorepo root and enable symlink-aware
resolution: add mappings for 'react' and 'react-native' to extraNodeModules
pointing at the monorepo root's node_modules, add the monorepo root to
watchFolders so Metro resolves sibling packages from the root, and enable
Metro's symlink-aware resolution (so modules under symlinks are resolved to the
mapped root copies).
| "dependencies": { | ||
| "@babel/runtime": "^7.25.0", | ||
| "@react-native/gradle-plugin": "0.76.9", | ||
| "react": "18.3.1", | ||
| "react-native": "0.76.9" | ||
| }, |
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
Move @react-native/gradle-plugin to devDependencies.
It’s only needed at build time; moving reduces prod install surface and supply-chain risk.
"dependencies": {
"@babel/runtime": "^7.25.0",
- "@react-native/gradle-plugin": "0.76.9",
"react": "18.3.1",
"react-native": "0.76.9"
},
"devDependencies": {
+ "@react-native/gradle-plugin": "0.76.9",
"@babel/core": "^7.27.1",
"@babel/plugin-transform-modules-commonjs": "^7.27.1",
"@tsconfig/react-native": "3.0.0",
"@types/jest": "29.5.11",
"@types/react": "18.3.4",
"jest": "29.7.0",
"metro-react-native-babel-preset": "0.76.9",
"react-test-renderer": "18.3.1",
"typescript": "5.9.2"
}Also applies to: 19-29
🤖 Prompt for AI Agents
In packages/mobile-sdk-alpha/demo-app/package.json around lines 13 to 18 (and
similarly lines 19 to 29), the @react-native/gradle-plugin is listed under
"dependencies" but it is only needed at build time; move
"@react-native/gradle-plugin": "0.76.9" from "dependencies" into
"devDependencies" to reduce production install surface and supply-chain risk,
updating the JSON accordingly and ensuring no duplicate entries remain.
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: 4
🧹 Nitpick comments (2)
packages/mobile-sdk-alpha/demo-app/App.tsx (2)
8-15: Add basic accessibility roles and stable testIDs for E2E and a11y.This helps screen readers and makes Detox/Appium selectors stable across UI refactors.
return ( <View style={styles.container}> - <Text style={styles.title}>Self Demo App</Text> - <Text style={styles.item}>Register Document</Text> - <Text style={styles.item}>Generate Mock</Text> - <Text style={styles.item}>Prove QR Code</Text> + <Text accessibilityRole="header" testID="title" style={styles.title}> + Self Demo App + </Text> + <Text accessibilityRole="button" testID="action-register" style={styles.item}> + Register Document + </Text> + <Text accessibilityRole="button" testID="action-generate-mock" style={styles.item}> + Generate Mock + </Text> + <Text accessibilityRole="button" testID="action-prove-qr" style={styles.item}> + Prove QR Code + </Text> </View> );
8-17: Plan for SDK provider wiring before adding interactive flows.When you introduce hooks (e.g., useSelfClient), wrap the root with SelfClientProvider in this file to avoid runtime errors.
Would you like a minimal provider-wrapped App.tsx template now so future screens don’t need a structural change?
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
packages/mobile-sdk-alpha/demo-app/ios/Podfile.lockis excluded by!**/*.lock
📒 Files selected for processing (7)
packages/mobile-sdk-alpha/demo-app/App.tsx(1 hunks)packages/mobile-sdk-alpha/demo-app/index.js(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp.xcodeproj/project.pbxproj(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp.xcodeproj/xcshareddata/xcschemes/SelfDemoApp.xcscheme(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp.xcworkspace/contents.xcworkspacedata(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/AppDelegate.swift(1 hunks)packages/mobile-sdk-alpha/package.json(2 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp.xcworkspace/contents.xcworkspacedata
🚧 Files skipped from review as they are similar to previous changes (3)
- packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp.xcodeproj/project.pbxproj
- packages/mobile-sdk-alpha/package.json
- packages/mobile-sdk-alpha/demo-app/index.js
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{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:
packages/mobile-sdk-alpha/demo-app/App.tsx
packages/mobile-sdk-alpha/**/*.{ts,tsx}
📄 CodeRabbit inference engine (packages/mobile-sdk-alpha/AGENTS.md)
packages/mobile-sdk-alpha/**/*.{ts,tsx}: Use strict TypeScript type checking across the codebase
Follow ESLint TypeScript-specific rules
Avoid introducing circular dependencies
Files:
packages/mobile-sdk-alpha/demo-app/App.tsx
packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}
⚙️ CodeRabbit configuration file
packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}: Review alpha mobile SDK code for:
- API consistency with core SDK
- Platform-neutral abstractions
- Performance considerations
- Clear experimental notes or TODOs
Files:
packages/mobile-sdk-alpha/demo-app/App.tsx
🧠 Learnings (12)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/demo/** : Provide an in-SDK lightweight React Native demo under packages/mobile-sdk-alpha/demo/
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/samples/** : Create sample applications under packages/mobile-sdk-alpha/samples/ (RN demo and web demo)
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
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/index.ts : Re-export new SDK modules via packages/mobile-sdk-alpha/src/index.ts
Learnt from: CR
PR: selfxyz/self#0
File: .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)
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{ts,tsx} : Avoid introducing circular dependencies
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
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)
📚 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/demo-app/ios/SelfDemoApp/AppDelegate.swiftpackages/mobile-sdk-alpha/demo-app/App.tsx
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/index.ts : Re-export new SDK modules via packages/mobile-sdk-alpha/src/index.ts
Applied to files:
packages/mobile-sdk-alpha/demo-app/App.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:
packages/mobile-sdk-alpha/demo-app/App.tsx
📚 Learning: 2025-08-26T14:49:15.210Z
Learnt from: shazarre
PR: selfxyz/self#936
File: app/src/screens/passport/PassportNFCScanScreen.web.tsx:8-11
Timestamp: 2025-08-26T14:49:15.210Z
Learning: The main App.tsx file is located at app/App.tsx (at the app root), not at app/src/App.tsx, and contains the SelfClientProvider wrapping the entire application.
Applied to files:
packages/mobile-sdk-alpha/demo-app/App.tsx
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
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/demo-app/App.tsx
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{ts,tsx} : Avoid introducing circular dependencies
Applied to files:
packages/mobile-sdk-alpha/demo-app/App.tsx
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/samples/** : Create sample applications under packages/mobile-sdk-alpha/samples/ (RN demo and web demo)
Applied to files:
packages/mobile-sdk-alpha/demo-app/App.tsx
📚 Learning: 2025-08-26T14:41:41.821Z
Learnt from: shazarre
PR: selfxyz/self#936
File: app/src/screens/aesop/PassportOnboardingScreen.tsx:0-0
Timestamp: 2025-08-26T14:41:41.821Z
Learning: When verifying provider hierarchies in React Native apps, always check the main App.tsx file at the app root, not just navigation/index.tsx and layout files, as providers are often configured at the top-level App component.
Applied to files:
packages/mobile-sdk-alpha/demo-app/App.tsx
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{ts,tsx} : Use strict TypeScript type checking across the codebase
Applied to files:
packages/mobile-sdk-alpha/demo-app/App.tsx
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/README.md : Document new/updated SDK modules and usage in packages/mobile-sdk-alpha/README.md
Applied to files:
packages/mobile-sdk-alpha/demo-app/App.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:
packages/mobile-sdk-alpha/demo-app/App.tsx
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: build-android
- GitHub Check: build-ios
- GitHub Check: test
- GitHub Check: analyze-ios
- GitHub Check: analyze-android
🔇 Additional comments (2)
packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/AppDelegate.swift (2)
29-33: Boot sequence looks correct (window key/visible; moduleName matches app.json).No further issues spotted here.
36-43: Double-check JS entrypoint consistency
Confirm that packages/mobile-sdk-alpha/demo-app/index.js calls AppRegistry.registerComponent('SelfDemoApp', …) to match the name in app.json and that “index” is the correct dev bundle root.
...ile-sdk-alpha/demo-app/ios/SelfDemoApp.xcodeproj/xcshareddata/xcschemes/SelfDemoApp.xcscheme
Show resolved
Hide resolved
| <TestAction | ||
| buildConfiguration = "Debug" | ||
| selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| shouldUseLaunchSchemeArgsEnv = "YES"> | ||
| <Testables> | ||
| <TestableReference | ||
| skipped = "NO"> | ||
| <BuildableReference | ||
| BuildableIdentifier = "primary" | ||
| BlueprintIdentifier = "00E356ED1AD99517003FC87E" | ||
| BuildableName = "SelfDemoAppTests.xctest" | ||
| BlueprintName = "SelfDemoAppTests" | ||
| ReferencedContainer = "container:SelfDemoApp.xcodeproj"> | ||
| </BuildableReference> | ||
| </TestableReference> | ||
| </Testables> | ||
| </TestAction> |
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
Enable sanitizers and set MacroExpansion to app for reliable native/RN-bridge tests
Thread/Address/UB sanitizers catch real issues in RN native modules; MacroExpansion ensures test env resolves app-level vars/Info.plist consistently in CI.
- <TestAction
- buildConfiguration = "Debug"
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- shouldUseLaunchSchemeArgsEnv = "YES">
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ enableAddressSanitizer = "YES"
+ enableThreadSanitizer = "YES"
+ enableUBSanitizer = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
+ BuildableName = "SelfDemoApp.app"
+ BlueprintName = "SelfDemoApp"
+ ReferencedContainer = "container:SelfDemoApp.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>📝 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.
| <TestAction | |
| buildConfiguration = "Debug" | |
| selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | |
| selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | |
| shouldUseLaunchSchemeArgsEnv = "YES"> | |
| <Testables> | |
| <TestableReference | |
| skipped = "NO"> | |
| <BuildableReference | |
| BuildableIdentifier = "primary" | |
| BlueprintIdentifier = "00E356ED1AD99517003FC87E" | |
| BuildableName = "SelfDemoAppTests.xctest" | |
| BlueprintName = "SelfDemoAppTests" | |
| ReferencedContainer = "container:SelfDemoApp.xcodeproj"> | |
| </BuildableReference> | |
| </TestableReference> | |
| </Testables> | |
| </TestAction> | |
| <TestAction | |
| buildConfiguration = "Debug" | |
| selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | |
| selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | |
| shouldUseLaunchSchemeArgsEnv = "YES" | |
| enableAddressSanitizer = "YES" | |
| enableThreadSanitizer = "YES" | |
| enableUBSanitizer = "YES"> | |
| <MacroExpansion> | |
| <BuildableReference | |
| BuildableIdentifier = "primary" | |
| BlueprintIdentifier = "13B07F861A680F5B00A75B9A" | |
| BuildableName = "SelfDemoApp.app" | |
| BlueprintName = "SelfDemoApp" | |
| ReferencedContainer = "container:SelfDemoApp.xcodeproj"> | |
| </BuildableReference> | |
| </MacroExpansion> | |
| <Testables> | |
| <TestableReference | |
| skipped = "NO"> | |
| <BuildableReference | |
| BuildableIdentifier = "primary" | |
| BlueprintIdentifier = "00E356ED1AD99517003FC87E" | |
| BuildableName = "SelfDemoAppTests.xctest" | |
| BlueprintName = "SelfDemoAppTests" | |
| ReferencedContainer = "container:SelfDemoApp.xcodeproj"> | |
| </BuildableReference> | |
| </TestableReference> | |
| </Testables> | |
| </TestAction> |
| <LaunchAction | ||
| buildConfiguration = "Debug" | ||
| selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| launchStyle = "0" | ||
| useCustomWorkingDirectory = "NO" | ||
| ignoresPersistentStateOnLaunch = "NO" | ||
| debugDocumentVersioning = "YES" | ||
| debugServiceExtension = "internal" | ||
| allowLocationSimulation = "YES"> | ||
| <BuildableProductRunnable | ||
| runnableDebuggingMode = "0"> | ||
| <BuildableReference | ||
| BuildableIdentifier = "primary" | ||
| BlueprintIdentifier = "13B07F861A680F5B00A75B9A" | ||
| BuildableName = "SelfDemoApp.app" | ||
| BlueprintName = "SelfDemoApp" | ||
| ReferencedContainer = "container:SelfDemoApp.xcodeproj"> | ||
| </BuildableReference> | ||
| </BuildableProductRunnable> | ||
| </LaunchAction> |
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
Make LaunchAction CI-safe to prevent Metro auto-launch and flaky runs
Prevent RN packager autostart and lock CI mode to reduce flakiness and noisy syslog.
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
+ <EnvironmentVariables>
+ <EnvironmentVariable
+ key = "RCT_NO_LAUNCH_PACKAGER"
+ value = "1"
+ isEnabled = "YES">
+ </EnvironmentVariable>
+ <EnvironmentVariable
+ key = "CI"
+ value = "1"
+ isEnabled = "YES">
+ </EnvironmentVariable>
+ <EnvironmentVariable
+ key = "OS_ACTIVITY_MODE"
+ value = "disable"
+ isEnabled = "YES">
+ </EnvironmentVariable>
+ </EnvironmentVariables>📝 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.
| <LaunchAction | |
| buildConfiguration = "Debug" | |
| selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | |
| selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | |
| launchStyle = "0" | |
| useCustomWorkingDirectory = "NO" | |
| ignoresPersistentStateOnLaunch = "NO" | |
| debugDocumentVersioning = "YES" | |
| debugServiceExtension = "internal" | |
| allowLocationSimulation = "YES"> | |
| <BuildableProductRunnable | |
| runnableDebuggingMode = "0"> | |
| <BuildableReference | |
| BuildableIdentifier = "primary" | |
| BlueprintIdentifier = "13B07F861A680F5B00A75B9A" | |
| BuildableName = "SelfDemoApp.app" | |
| BlueprintName = "SelfDemoApp" | |
| ReferencedContainer = "container:SelfDemoApp.xcodeproj"> | |
| </BuildableReference> | |
| </BuildableProductRunnable> | |
| </LaunchAction> | |
| <LaunchAction | |
| buildConfiguration = "Debug" | |
| selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | |
| selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | |
| launchStyle = "0" | |
| useCustomWorkingDirectory = "NO" | |
| ignoresPersistentStateOnLaunch = "NO" | |
| debugDocumentVersioning = "YES" | |
| debugServiceExtension = "internal" | |
| allowLocationSimulation = "YES"> | |
| <EnvironmentVariables> | |
| <EnvironmentVariable | |
| key = "RCT_NO_LAUNCH_PACKAGER" | |
| value = "1" | |
| isEnabled = "YES"> | |
| </EnvironmentVariable> | |
| <EnvironmentVariable | |
| key = "CI" | |
| value = "1" | |
| isEnabled = "YES"> | |
| </EnvironmentVariable> | |
| <EnvironmentVariable | |
| key = "OS_ACTIVITY_MODE" | |
| value = "disable" | |
| isEnabled = "YES"> | |
| </EnvironmentVariable> | |
| </EnvironmentVariables> | |
| <BuildableProductRunnable | |
| runnableDebuggingMode = "0"> | |
| <BuildableReference | |
| BuildableIdentifier = "primary" | |
| BlueprintIdentifier = "13B07F861A680F5B00A75B9A" | |
| BuildableName = "SelfDemoApp.app" | |
| BlueprintName = "SelfDemoApp" | |
| ReferencedContainer = "container:SelfDemoApp.xcodeproj"> | |
| </BuildableReference> | |
| </BuildableProductRunnable> | |
| </LaunchAction> |
🤖 Prompt for AI Agents
In
packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp.xcodeproj/xcshareddata/xcschemes/SelfDemoApp.xcscheme
around lines 43–63, the LaunchAction should be made CI-safe: prevent Metro
auto-launch and lock CI mode by disabling automatic debugger/launcher and adding
environment variables; specifically, remove or clear
selectedDebuggerIdentifier/selectedLauncherIdentifier, and add an
EnvironmentVariables element with RCT_NO_LAUNCH_PACKAGER set to YES (or 1) and
CI set to YES (or 1) so the RN packager does not auto-start and CI mode is
enforced for stable, non-flaky CI runs.
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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
app/metro.config.cjs (2)
12-14: Fix absolute-path bug: path.join('/..') discards __dirname and resolves to system rootUsing path.join(__dirname, '/../common') and '/../packages/mobile-sdk-alpha' drops the prefix and produces /common and /packages/mobile-sdk-alpha on POSIX, breaking all aliases/watchFolders that depend on these paths.
Apply this diff:
-const commonPath = path.join(__dirname, '/../common'); -const sdkAlphaPath = path.join(__dirname, '/../packages/mobile-sdk-alpha'); +const commonPath = path.resolve(__dirname, '../common'); +const sdkAlphaPath = path.resolve(__dirname, '../packages/mobile-sdk-alpha');
184-189: Don’t watch node_modules — severe Metro perf hit and FD exhaustion riskIncluding trueMonorepoNodeModules in watchFolders can balloon file watchers (especially on CI/macOS), slowing reloads and causing EMFILE errors.
Apply this diff:
const watchFolders = [ path.resolve(commonPath), - trueMonorepoNodeModules, path.join(__dirname, 'src'), path.resolve(sdkAlphaPath), ];
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (2)
packages/mobile-sdk-alpha/demo-app/ios/Podfile.lockis excluded by!**/*.lockyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (15)
.github/workflows/mobile-sdk-demo-ci.yml(1 hunks)app/metro.config.cjs(1 hunks)package.json(2 hunks)packages/mobile-sdk-alpha/demo-app/__tests__/App.test.tsx(1 hunks)packages/mobile-sdk-alpha/demo-app/android/app/build.gradle(1 hunks)packages/mobile-sdk-alpha/demo-app/android/settings.gradle(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/Podfile(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp.xcodeproj/xcshareddata/xcschemes/SelfDemoApp.xcscheme(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/AppDelegate.swift(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/Info-Debug.plist(1 hunks)packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/Info.plist(1 hunks)packages/mobile-sdk-alpha/demo-app/metro.config.cjs(1 hunks)packages/mobile-sdk-alpha/demo-app/package.json(1 hunks)packages/mobile-sdk-alpha/demo-app/tsconfig.json(1 hunks)packages/mobile-sdk-alpha/package.json(2 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/Info-Debug.plist
🚧 Files skipped from review as they are similar to previous changes (12)
- packages/mobile-sdk-alpha/demo-app/package.json
- packages/mobile-sdk-alpha/demo-app/tests/App.test.tsx
- packages/mobile-sdk-alpha/demo-app/metro.config.cjs
- packages/mobile-sdk-alpha/demo-app/tsconfig.json
- .github/workflows/mobile-sdk-demo-ci.yml
- packages/mobile-sdk-alpha/demo-app/android/app/build.gradle
- package.json
- packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/AppDelegate.swift
- packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp/Info.plist
- packages/mobile-sdk-alpha/package.json
- packages/mobile-sdk-alpha/demo-app/android/settings.gradle
- packages/mobile-sdk-alpha/demo-app/ios/SelfDemoApp.xcodeproj/xcshareddata/xcschemes/SelfDemoApp.xcscheme
🧰 Additional context used
🧠 Learnings (9)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/demo/** : Provide an in-SDK lightweight React Native demo under packages/mobile-sdk-alpha/demo/
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/samples/** : Create sample applications under packages/mobile-sdk-alpha/samples/ (RN demo and web demo)
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
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)
📚 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/metro.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:
app/metro.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/metro.config.cjspackages/mobile-sdk-alpha/demo-app/ios/Podfile
📚 Learning: 2025-08-29T15:31:15.911Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.911Z
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/metro.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/demo-app/ios/Podfile
📚 Learning: 2025-08-02T23:53:45.928Z
Learnt from: transphorm
PR: selfxyz/self#823
File: app/ios/Self.xcodeproj/project.pbxproj:320-332
Timestamp: 2025-08-02T23:53:45.928Z
Learning: When reviewing autogenerated scripts in Xcode project files (like React Native Firebase's embedded shell scripts), avoid suggesting edits since these are regenerated during pod install and cannot be manually modified by users.
Applied to files:
packages/mobile-sdk-alpha/demo-app/ios/Podfile
📚 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/demo-app/ios/Podfile
📚 Learning: 2025-08-29T15:30:12.155Z
Learnt from: CR
PR: selfxyz/self#0
File: app/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:12.155Z
Learning: From app/ios, run bundle install && bundle exec pod install (or from app run npx pod-install)
Applied to files:
packages/mobile-sdk-alpha/demo-app/ios/Podfile
🪛 RuboCop (1.76.1)
packages/mobile-sdk-alpha/demo-app/ios/Podfile
[convention] 6-6: Put a comma after the last item of a multiline array.
(Style/TrailingCommaInArrayLiteral)
[convention] 32-32: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
⏰ 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). (1)
- GitHub Check: e2e-ios
🔇 Additional comments (3)
packages/mobile-sdk-alpha/demo-app/ios/Podfile (2)
27-35: Double-check RN toolchain assumptions captured in post_install.
react_native_post_install(installer, config[:reactNativePath], mac_catalyst_enabled: false)assumesconfigis set and the Ruby helpers are loaded. This will be satisfied if thenative_modules.rbrequire is added (previous comment). Otherwise, this block fails at install time.If you prefer not to add the extra require, confirm your RN version defines
use_native_modules!viareact_native_pods.rb. If unsure, add the require to be safe across versions.
17-17: Xcode target “SelfDemoApp” verified – no changes needed.app/metro.config.cjs (1)
21-23: LGTM: Pinning react/react-native to monorepo root avoids multi-React issuesPrevents duplicate React instances and “Hooks can only be called inside the body of a function component” errors across workspaces.
| require Pod::Executable.execute_command("node", ["-p", | ||
| 'require.resolve( | ||
| "react-native/scripts/react_native_pods.rb", | ||
| {paths: [process.argv[1]]}, | ||
| )', __dir__]).strip |
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.
Add missing require for native_modules to avoid NameError on use_native_modules!.
On many RN versions, use_native_modules! is defined in @react-native-community/cli-platform-ios/native_modules.rb, not in react_native_pods.rb. Without requiring it, pod install can fail. Hoisted/monorepo-safe resolution similar to your first require keeps things robust.
Apply this diff right after Line 6:
require Pod::Executable.execute_command("node", ["-p",
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
+# Ensure use_native_modules! is available (monorepo/hoist-safe resolution)
+require Pod::Executable.execute_command("node", ["-p",
+ 'require.resolve(
+ "@react-native-community/cli-platform-ios/native_modules.rb",
+ {paths: [process.argv[1]]},
+ )', __dir__]).stripAlso applies to: 18-19
🧰 Tools
🪛 RuboCop (1.76.1)
[convention] 6-6: Put a comma after the last item of a multiline array.
(Style/TrailingCommaInArrayLiteral)
🤖 Prompt for AI Agents
In packages/mobile-sdk-alpha/demo-app/ios/Podfile around lines 2-6 (and also
apply at lines 18-19), the Podfile currently requires react_native_pods.rb but
does not require the native_modules helper, causing use_native_modules! to raise
NameError on some RN versions; add a second require using
Pod::Executable.execute_command("node", ["-p", 'require.resolve("
@react-native-community/cli-platform-ios/native_modules.rb", {paths:
[process.argv[1]]})', __dir__]).strip (monorepo/hoisted-safe resolution like the
first require) placed immediately after the existing react_native_pods require
at line 6 and likewise add the corresponding require where the other
react_native_pods require appears at lines 18-19 so use_native_modules! is
defined.
| linkage = ENV["USE_FRAMEWORKS"] | ||
| if linkage != nil | ||
| Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green | ||
| use_frameworks! :linkage => linkage.to_sym | ||
| end |
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
Validate USE_FRAMEWORKS to prevent CocoaPods misconfiguration.
If USE_FRAMEWORKS is set to an unexpected value, use_frameworks! linkage: <sym> can break installs. Gate it to static|dynamic and warn otherwise.
-linkage = ENV["USE_FRAMEWORKS"]
-if linkage != nil
- Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
- use_frameworks! :linkage => linkage.to_sym
-end
+linkage = ENV["USE_FRAMEWORKS"]
+if linkage
+ allowed = %w[static dynamic]
+ unless allowed.include?(linkage)
+ Pod::UI.warn "Ignoring invalid USE_FRAMEWORKS='#{linkage}'. Allowed: #{allowed.join(', ')}"
+ else
+ Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
+ use_frameworks! :linkage => linkage.to_sym
+ end
+end📝 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.
| linkage = ENV["USE_FRAMEWORKS"] | |
| if linkage != nil | |
| Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green | |
| use_frameworks! :linkage => linkage.to_sym | |
| end | |
| linkage = ENV["USE_FRAMEWORKS"] | |
| if linkage | |
| allowed = %w[static dynamic] | |
| unless allowed.include?(linkage) | |
| Pod::UI.warn "Ignoring invalid USE_FRAMEWORKS='#{linkage}'. Allowed: #{allowed.join(', ')}" | |
| else | |
| Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green | |
| use_frameworks! :linkage => linkage.to_sym | |
| end | |
| end |
🤖 Prompt for AI Agents
In packages/mobile-sdk-alpha/demo-app/ios/Podfile around lines 11 to 15, the
Podfile currently reads linkage = ENV["USE_FRAMEWORKS"] and blindly calls
use_frameworks! :linkage => linkage.to_sym which can break CocoaPods if
USE_FRAMEWORKS is an unexpected value; validate linkage against allowed values
"static" and "dynamic" and only call use_frameworks! with linkage.to_sym when it
matches one of those, otherwise print a clear warning (via Pod::UI.warn or puts)
and skip calling use_frameworks! to avoid misconfiguration.
* 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…
Summary
Testing
yarn installyarn workspace @selfxyz/mobile-sdk-alpha testyarn workspace @selfxyz/mobile-sdk-alpha build(fails: Module '"@selfxyz/common/utils/types"' has no exported member 'DocumentCatalog')yarn workspace @selfxyz/contracts build(fails: Hardhat config error)yarn typesyarn buildhttps://chatgpt.com/codex/tasks/task_b_68b284e0bbdc832db7b6dd4da7386230
Summary by CodeRabbit
New Features
Documentation
Tests
Chores
CI