Skip to content

Conversation

@transphorm
Copy link
Member

@transphorm transphorm commented Jul 23, 2025

Summary

  • refresh mobile app ESLint configuration
  • rename Socket.IO import in provingMachine
  • add ESLint plugins and lock eslint-config-prettier at 10.1.8
  • document security reason for the pinned version

Testing

  • yarn lint
  • yarn build
  • yarn workspace @selfxyz/contracts build (fails: Invalid account for network)
  • yarn types
  • yarn workspace @selfxyz/common test
  • yarn workspace @selfxyz/circuits test (fails: Unsupported signature algorithm)
  • yarn workspace @selfxyz/mobile-app test

https://chatgpt.com/codex/tasks/task_b_68805e6240e8832dba8fdd5cf5512d3a

Summary by CodeRabbit

  • Chores

    • Updated and enhanced ESLint configuration for improved TypeScript and React Native support, import sorting, and rule adjustments.
    • Added and updated ESLint and TypeScript-related dependencies for better linting and import resolution.
    • Updated TypeScript configuration to support the @env import alias.
    • Added TypeScript declaration for .png files to support image imports.
    • Added TypeScript declaration for .svg files to support React components.
    • Added new environment variable for Google Sign-In Android client ID.
    • Added runtime check for Google Sign-In Android client ID in cloud backup utility.
    • Added mock environment variables for testing including Google Sign-In client IDs and analytics keys.
  • Refactor

    • Simplified import statements and improved code clarity across multiple utilities, components, and screens.
    • Streamlined function signatures and mock implementations in deployment and test scripts.
    • Improved code immutability by changing variable declarations from mutable to immutable where applicable.
    • Updated socket.io client imports and initialization for consistent usage across modules.
    • Enhanced React hook dependencies and imports for more accurate effect and callback updates.
    • Reorganized component state hooks and effect dependencies for improved reactivity.
    • Refined memoization and callback dependencies in various UI components and screens.
    • Improved URL parsing and cryptographic library imports for consistency and robustness.
    • Replaced shorthand style props with full CSS property names throughout multiple components for clarity and consistency.
    • Updated React import styles to use named imports and direct hook usage for cleaner code.
  • New Features

    • Added robust URL query parameter parsing and validation utility to improve deeplink handling and error resilience.
    • Introduced comprehensive tests for deeplink URL parsing, validation, and error handling to ensure reliability.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 23, 2025

Walkthrough

This update overhauls the ESLint configuration to improve TypeScript and React Native support, updates and adds related dependencies, refines import statements in multiple components and utilities, simplifies a deployment script function signature, adjusts a mock function's parameter, and introduces a TypeScript path alias for environment configuration. It also includes socket.io import alias fixes, environment variable handling improvements, and consistent style prop naming across many UI components.

Changes

File(s) Change Summary
app/.eslintrc.cjs Major rewrite: enhanced TypeScript/React Native support, expanded plugins/rules, improved import sorting, React settings, and rule adjustments.
app/package.json Added/updated ESLint, TypeScript, and import-related devDependencies.
app/src/utils/proving/provingMachine.ts Refactored Socket.IO import and instantiation; minor type annotation update.
app/src/stores/selfAppStore.tsx Refactored Socket.IO import and instantiation.
app/scripts/mobile-deploy-confirm.cjs Simplified displayDeploymentHeader function signature and call site; removed unused parameter.
app/tests/setup/notificationServiceMock.js Mock function getStateMessage no longer takes a parameter; implementation remains functionally identical.
app/tsconfig.json Added @env path alias for environment file resolution; expanded exclude/include lists.
app/src/components/NavBar/BaseNavBar.tsx Changed children declaration from let to const inside LeftAction component; expanded useMemo dependencies.
app/src/components/native/RCTFragment.tsx Consolidated multiple React Native imports into a single grouped import statement.
app/src/providers/passportDataProvider.tsx Grouped and reordered imports from @selfxyz/common and authProvider.
app/src/screens/dev/MockDataScreen.tsx Consolidated imports; changed some variables from let to const for immutability; moved constants to module scope; reordered useCallback dependencies; renamed style props to full names.
app/src/screens/dev/MockDataScreenDeepLink.tsx Consolidated multiple imports from @selfxyz/common into a single grouped import; updated useEffect dependencies; renamed style props to full names.
app/src/screens/misc/SplashScreen.tsx Grouped related imports; explicitly imported useState; updated hooks to use direct imports; added dependencies to useEffect.
app/src/screens/prove/ProveScreen.tsx Consolidated imports; updated useEffect dependency arrays to include additional dependencies; renamed style props.
app/src/screens/settings/SettingsScreen.tsx Consolidated icon imports; updated useCallback dependencies; renamed style props to full names.
app/src/stores/proofHistoryStore.ts Changed totalCount declaration from let to const in method.
app/src/utils/proving/provingInputs.ts Consolidated imports; initialized SMT instances immediately; improved import clarity.
app/src/index.js Added import for react-native-gesture-handler.
app/src/components/ErrorBoundary.tsx Explicitly imported Component from React; extended Component directly.
app/src/components/Mnemonic.tsx Expanded useCallback dependencies; updated button padding style from theme token to numeric value.
app/src/components/native/PassportCamera.web.tsx Explicitly imported useEffect; replaced React.useEffect with useEffect.
app/src/hooks/useConnectionModal.ts Updated useEffect dependencies; removed direct call from dependencies; added modal show/hide functions.
app/src/hooks/useMnemonic.ts Added getOrCreateMnemonic to useCallback dependencies.
app/src/layouts/SimpleScrolledTitleLayout.tsx Explicitly imported PropsWithChildren; updated interface extension; changed button margin style.
app/src/mocks/react-native-gesture-handler.ts Explicitly imported createElement; replaced React.createElement usage.
app/src/mocks/react-native-safe-area-context.js Changed React import to named imports; replaced React.createElement, React.Fragment, React.createContext with named imports.
app/src/navigation/index.tsx Removed side-effect import of react-native-gesture-handler; explicitly imported useEffect; replaced React.useEffect usage.
app/src/providers/authProvider.tsx Updated useCallback and useMemo dependency arrays to include additional dependencies.
app/src/screens/dev/DevFeatureFlagsScreen.tsx Added ESLint disable comment for exhaustive-deps in cleanup effect; renamed style props to full names.
app/src/screens/dev/DevSettingsScreen.tsx Imported useMemo explicitly; replaced React.useMemo with useMemo; emptied dependency array; renamed style props to full names.
app/src/screens/home/HomeScreen.tsx Explicitly imported useCallback; replaced React.useCallback with useCallback; renamed style props to full names.
app/src/screens/home/ProofHistoryDetailScreen.tsx Expanded useMemo dependencies to include additional value.
app/src/screens/home/ProofHistoryScreen.tsx Added navigation to useCallback dependencies; renamed style props to full names.
app/src/screens/misc/LoadingScreen.tsx Moved terminalStates array to module scope; disabled exhaustive-deps rule for effect; renamed style props.
app/src/screens/passport/PassportCameraTroubleScreen.tsx Explicitly imported useEffect; replaced React.useEffect with useEffect.
app/src/screens/passport/PassportNFCScanScreen.tsx Reordered and expanded dependencies in callbacks and effects; removed some dependencies; renamed style props.
app/src/screens/passport/PassportNFCTroubleScreen.tsx Explicitly imported useEffect; replaced React.useEffect with useEffect.
app/src/screens/prove/ConfirmBelongingScreen.tsx Refactored to use multiple store selectors instead of single store reference; updated effect and handlers accordingly.
app/src/screens/prove/ProofRequestStatusScreen.tsx Expanded effect dependencies to include multiple new values.
app/src/screens/prove/QRCodeTroubleScreen.tsx Explicitly imported useEffect; replaced React.useEffect with useEffect.
app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx Reordered and expanded dependencies in useCallback; renamed style props.
app/src/screens/recovery/PassportDataNotFoundScreen.tsx Explicitly imported useEffect; replaced React.useEffect with useEffect; renamed style props.
app/src/screens/recovery/RecoverWithPhraseScreen.tsx Expanded useCallback dependencies; renamed style props.
app/src/screens/recovery/SaveRecoveryPhraseScreen.tsx Added loadMnemonic to useCallback dependencies.
app/src/screens/settings/ManageDocumentsScreen.tsx Converted async function to memoized callback with explicit dependencies; updated effect dependencies; renamed style props.
app/src/screens/settings/ShowRecoveryPhraseScreen.tsx Added loadMnemonic to useCallback dependencies.
app/src/types/svg.d.ts Added TypeScript declaration module for .svg files exporting React functional components with SvgProps.
app/src/utils/deeplinks.ts Added new parseAndValidateUrlParams function with strict validation; refactored handleUrl to use it with improved error handling.
app/src/utils/proving/attest.ts Changed elliptic import from default to named import; updated instantiations accordingly.
app/src/utils/proving/cose.ts Changed cose from named export to non-exported const with default export retained.
app/tests/setup/svgMock.js Changed React import to named import of createElement; replaced usage accordingly.
app/env.ts Added export for GOOGLE_SIGNIN_ANDROID_CLIENT_ID environment variable.
app/src/utils/cloudBackup/google.ts Added runtime check for GOOGLE_SIGNIN_ANDROID_CLIENT_ID env var; fallback for test environment.
app/src/utils/nfcScanner.ts Changed assignment of enableDebugLogs to JSON.parse of env var string instead of boolean comparison.
app/tests/setup/@env.js Added multiple mock environment variables for testing, including Google client IDs and debug flags.
app/src/screens/prove/ViewFinderScreen.tsx Replaced custom URL param parsing with parseAndValidateUrlParams; added error handling for JSON parsing; renamed style props.
app/src/screens/recovery/AccountRecoveryScreen.tsx Replaced shorthand style props with full equivalents in JSX layout.
app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx Replaced shorthand style props with full equivalents in JSX layout.
app/src/screens/settings/CloudBackupScreen.tsx Replaced shorthand style props with full equivalents in JSX layout.
app/src/screens/settings/PassportDataInfoScreen.tsx Replaced shorthand style props with full equivalents in JSX layout.
app/src/types/png.d.ts Added TypeScript declaration module for .png files exporting default any type.
app/src/screens/home/DisclaimerScreen.tsx Replaced shorthand style props with full equivalents in JSX layout.
app/src/screens/misc/LaunchScreen.tsx Replaced shorthand style props with full equivalents in JSX layout.
app/src/screens/misc/ModalScreen.tsx Replaced shorthand style props with full equivalents in JSX layout.
app/src/screens/passport/PassportCameraScreen.tsx Replaced shorthand style props with full equivalents in JSX layout.
app/src/screens/passport/PassportNFCScanScreen.web.tsx Replaced shorthand style props with full equivalents in JSX layout.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant ESLint
    participant TypeScript
    participant ReactNativeApp

    Developer->>ESLint: Lint code (with new config)
    ESLint->>TypeScript: Parse and analyze TS files
    ESLint->>ReactNativeApp: Apply React/React Native rules
    ESLint->>Developer: Report issues (import sorting, rules, etc.)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

  • Fix socket.io import alias #782: The main PR changes the socket.io import alias from io to socketIo in app/src/utils/proving/provingMachine.ts, which is the same import alias fix applied in the retrieved PR Fix socket.io import alias #782 for app/src/stores/selfAppStore.tsx, indicating a related change pattern in socket.io import aliasing.
  • Start of Web App #689: The main PR's changes to ESLint configuration and TypeScript support are related to the retrieved PR's ESLint ignore patterns and TypeScript config exclusions, as both enhance the project's linting and build setup for web and native platforms.
  • Fix style prop shorthands #787: The main PR and the retrieved PR both include the identical change in app/src/layouts/ExpandableBottomLayout.tsx removing the fallback from props.pb when determining incomingBottom padding, indicating a direct code-level relation in this file and function.

Poem

Linting rules now shine anew,
TypeScript’s power coming through!
Imports sorted, mocks made neat,
Socket calls now more discrete.
With paths aligned and scripts refined,
This codebase’s future is well-designed.
🚀✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/apply-eslint-rules-from-pr-and-update-dev-branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@transphorm transphorm changed the title Update ESLint rules & lock prettier config SEL-269: Update ESLint rules & lock prettier config Jul 23, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🔭 Outside diff range comments (1)
app/src/utils/proving/cose.ts (1)

24-64: Strong cryptographic implementation with minor security enhancements needed.

The COSE_Sign1 verification implementation follows cryptographic best practices and correctly implements the COSE specification. The use of SHA-384 with elliptic curve verification is appropriate for AWS Nitro Enclaves attestation.

Security considerations:

  1. Input validation: Consider adding more comprehensive validation for the verifier key parameters to prevent potential attacks through malformed inputs.

  2. Buffer bounds checking: Add explicit length validation for signature components to prevent potential buffer overflow issues.

 verify: async (
   data: Buffer,
   verifier: { key: { x: string; y: string; curve: string } },
   _options: { defaultType: number },
 ) => {
+  // Validate inputs
+  if (!Buffer.isBuffer(data) || data.length === 0) {
+    throw new Error('Invalid COSE data provided');
+  }
+  if (!verifier?.key?.x || !verifier?.key?.y || !verifier?.key?.curve) {
+    throw new Error('Invalid verifier key parameters');
+  }
+  
   const decoded = decode(new Uint8Array(data));
   if (!Array.isArray(decoded) || decoded.length !== 4) {
     throw new Error('Invalid COSE_Sign1 format');
   }
   
   const [protectedHeaderBytes, _unprotectedHeader, payload, signature] = decoded;
   
+  // Validate signature buffer
+  if (!signature || signature.length === 0) {
+    throw new Error('Invalid signature data');
+  }
+  
   const sigBuffer = Buffer.from(signature);
   if (sigBuffer.length % 2 !== 0) {
     throw new Error('Invalid signature length');
   }
+  
+  // Ensure minimum signature length
+  if (sigBuffer.length < 64) { // Minimum for P-256, adjust based on curve
+    throw new Error('Signature too short');
+  }
🧹 Nitpick comments (5)
app/src/screens/misc/LoadingScreen.tsx (1)

145-146: Consider extracting the terminal state check into a helper function.

The terminal state checking pattern is repeated twice with the same type assertion. Consider extracting this into a helper function for better maintainability:

+const isTerminalState = (state: ProvingStateType): boolean => {
+  return terminalStates.includes(state);
+};

Then use it as:

-if (terminalStates.includes(currentState as ProvingStateType)) {
+if (isTerminalState(currentState as ProvingStateType)) {
-const shouldLoopAnimation = !terminalStates.includes(
-  currentState as ProvingStateType,
-);
+const shouldLoopAnimation = !isTerminalState(currentState as ProvingStateType);

Also applies to: 160-162

app/src/utils/proving/cose.ts (2)

59-61: Consider generic error messages for security-critical verification failures.

The specific error message "AWS root certificate signature verification failed" could potentially leak implementation details to attackers. For cryptographic verification failures, consider using more generic error messages while maintaining internal logging for debugging.

 const valid = key.verify(hash, { r: rHex, s: sHex });
 if (!valid) {
-  throw new Error('AWS root certificate signature verification failed');
+  throw new Error('Signature verification failed');
 }

Alternatively, you could log the specific failure reason internally while throwing a generic error:

 const valid = key.verify(hash, { r: rHex, s: sHex });
 if (!valid) {
+  console.debug('AWS root certificate signature verification failed'); // Internal logging
+  throw new Error('Signature verification failed');
 }

24-28: Consider creating interfaces for better type reusability.

The inline type definitions are clear, but creating dedicated interfaces could improve type reusability and maintainability across the codebase.

+interface COSEVerifierKey {
+  x: string;
+  y: string;
+  curve: string;
+}
+
+interface COSEVerifier {
+  key: COSEVerifierKey;
+}
+
+interface COSEVerifyOptions {
+  defaultType: number;
+}
+
 verify: async (
   data: Buffer,
-  verifier: { key: { x: string; y: string; curve: string } },
-  _options: { defaultType: number },
+  verifier: COSEVerifier,
+  _options: COSEVerifyOptions,
 ) => {
app/src/components/Mnemonic.tsx (1)

101-101: Consider maintaining theme consistency.

The change from py="$2" to paddingVertical={16} works functionally but loses the benefit of the design system's spacing tokens. Theme tokens provide consistency and make global spacing adjustments easier.

Consider reverting to the theme token if 16px corresponds to $2:

-          paddingVertical={16}
+          py="$2"

Alternatively, if 16px is intentionally different from the theme, document why this specific value is needed.

app/src/screens/settings/ManageDocumentsScreen.tsx (1)

37-55: Good refactoring to useCallback, but consider optimizing dependencies.

Converting loadPassportDataInfo to useCallback improves stability and prevents unnecessary re-renders. However, including state setters (setDocumentCatalog, setAllDocuments) in the dependency array is unnecessary since React guarantees these functions are stable across renders.

Consider this optimization:

  const loadPassportDataInfo = useCallback(async () => {
    setLoading(true);
    const catalog = await loadDocumentCatalog();
    const docs = await getAllDocuments();
    setDocumentCatalog(catalog);
    setAllDocuments(docs);
    trackEvent(DocumentEvents.DOCUMENTS_FETCHED, {
      count: catalog.documents.length,
    });
    if (catalog.documents.length === 0) {
      trackEvent(DocumentEvents.NO_DOCUMENTS_FOUND);
    }
    setLoading(false);
  }, [
    loadDocumentCatalog,
    getAllDocuments,
-   setDocumentCatalog,
-   setAllDocuments,
  ]);
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2487343 and d836b8f.

📒 Files selected for processing (41)
  • app/index.js (1 hunks)
  • app/src/components/ErrorBoundary.tsx (2 hunks)
  • app/src/components/Mnemonic.tsx (2 hunks)
  • app/src/components/NavBar/BaseNavBar.tsx (2 hunks)
  • app/src/components/native/PassportCamera.web.tsx (2 hunks)
  • app/src/hooks/useConnectionModal.ts (1 hunks)
  • app/src/hooks/useMnemonic.ts (1 hunks)
  • app/src/layouts/SimpleScrolledTitleLayout.tsx (3 hunks)
  • app/src/mocks/react-native-gesture-handler.ts (2 hunks)
  • app/src/mocks/react-native-safe-area-context.js (3 hunks)
  • app/src/navigation/index.tsx (2 hunks)
  • app/src/providers/authProvider.tsx (2 hunks)
  • app/src/screens/dev/DevFeatureFlagsScreen.tsx (1 hunks)
  • app/src/screens/dev/DevSettingsScreen.tsx (3 hunks)
  • app/src/screens/dev/MockDataScreen.tsx (5 hunks)
  • app/src/screens/dev/MockDataScreenDeepLink.tsx (2 hunks)
  • app/src/screens/home/HomeScreen.tsx (2 hunks)
  • app/src/screens/home/ProofHistoryDetailScreen.tsx (1 hunks)
  • app/src/screens/home/ProofHistoryScreen.tsx (1 hunks)
  • app/src/screens/misc/LoadingScreen.tsx (2 hunks)
  • app/src/screens/misc/SplashScreen.tsx (3 hunks)
  • app/src/screens/passport/PassportCameraTroubleScreen.tsx (2 hunks)
  • app/src/screens/passport/PassportNFCScanScreen.tsx (2 hunks)
  • app/src/screens/passport/PassportNFCTroubleScreen.tsx (2 hunks)
  • app/src/screens/prove/ConfirmBelongingScreen.tsx (1 hunks)
  • app/src/screens/prove/ProofRequestStatusScreen.tsx (1 hunks)
  • app/src/screens/prove/ProveScreen.tsx (3 hunks)
  • app/src/screens/prove/QRCodeTroubleScreen.tsx (2 hunks)
  • app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx (1 hunks)
  • app/src/screens/recovery/PassportDataNotFoundScreen.tsx (2 hunks)
  • app/src/screens/recovery/RecoverWithPhraseScreen.tsx (1 hunks)
  • app/src/screens/recovery/SaveRecoveryPhraseScreen.tsx (1 hunks)
  • app/src/screens/settings/ManageDocumentsScreen.tsx (3 hunks)
  • app/src/screens/settings/SettingsScreen.tsx (2 hunks)
  • app/src/screens/settings/ShowRecoveryPhraseScreen.tsx (1 hunks)
  • app/src/types/svg.d.ts (1 hunks)
  • app/src/utils/deeplinks.ts (2 hunks)
  • app/src/utils/proving/attest.ts (3 hunks)
  • app/src/utils/proving/cose.ts (1 hunks)
  • app/tests/__setup__/svgMock.js (1 hunks)
  • app/tsconfig.json (1 hunks)
✅ Files skipped from review due to trivial changes (15)
  • app/src/components/ErrorBoundary.tsx
  • app/src/screens/recovery/PassportDataNotFoundScreen.tsx
  • app/src/screens/passport/PassportCameraTroubleScreen.tsx
  • app/index.js
  • app/src/types/svg.d.ts
  • app/src/screens/dev/DevFeatureFlagsScreen.tsx
  • app/src/screens/passport/PassportNFCTroubleScreen.tsx
  • app/src/navigation/index.tsx
  • app/src/utils/proving/attest.ts
  • app/src/mocks/react-native-gesture-handler.ts
  • app/src/screens/prove/QRCodeTroubleScreen.tsx
  • app/src/components/native/PassportCamera.web.tsx
  • app/tests/setup/svgMock.js
  • app/src/mocks/react-native-safe-area-context.js
  • app/src/utils/deeplinks.ts
🚧 Files skipped from review as they are similar to previous changes (6)
  • app/src/components/NavBar/BaseNavBar.tsx
  • app/src/screens/prove/ProveScreen.tsx
  • app/tsconfig.json
  • app/src/screens/settings/SettingsScreen.tsx
  • app/src/screens/misc/SplashScreen.tsx
  • app/src/screens/dev/MockDataScreen.tsx
🧰 Additional context used
📓 Path-based instructions (1)
app/src/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit Configuration File

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

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

Files:

  • app/src/screens/recovery/SaveRecoveryPhraseScreen.tsx
  • app/src/screens/prove/ConfirmBelongingScreen.tsx
  • app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx
  • app/src/screens/settings/ShowRecoveryPhraseScreen.tsx
  • app/src/screens/recovery/RecoverWithPhraseScreen.tsx
  • app/src/screens/home/ProofHistoryScreen.tsx
  • app/src/screens/home/ProofHistoryDetailScreen.tsx
  • app/src/screens/home/HomeScreen.tsx
  • app/src/hooks/useConnectionModal.ts
  • app/src/screens/dev/DevSettingsScreen.tsx
  • app/src/screens/prove/ProofRequestStatusScreen.tsx
  • app/src/screens/settings/ManageDocumentsScreen.tsx
  • app/src/layouts/SimpleScrolledTitleLayout.tsx
  • app/src/screens/passport/PassportNFCScanScreen.tsx
  • app/src/screens/misc/LoadingScreen.tsx
  • app/src/hooks/useMnemonic.ts
  • app/src/utils/proving/cose.ts
  • app/src/components/Mnemonic.tsx
  • app/src/providers/authProvider.tsx
  • app/src/screens/dev/MockDataScreenDeepLink.tsx
🧠 Learnings (1)
app/src/screens/passport/PassportNFCScanScreen.tsx (1)

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

🧬 Code Graph Analysis (4)
app/src/screens/prove/ProofRequestStatusScreen.tsx (2)
app/src/stores/database.ts (1)
  • updateProofStatus (143-156)
app/src/stores/database.web.ts (1)
  • updateProofStatus (218-253)
app/src/screens/settings/ManageDocumentsScreen.tsx (1)
app/src/providers/passportDataProvider.tsx (2)
  • loadDocumentCatalog (104-118)
  • getAllDocuments (235-251)
app/src/layouts/SimpleScrolledTitleLayout.tsx (1)
app/src/components/buttons/SecondaryButton.tsx (1)
  • SecondaryButton (8-23)
app/src/screens/misc/LoadingScreen.tsx (1)
app/src/utils/proving/provingMachine.ts (1)
  • ProvingStateType (134-156)
🪛 Biome (2.1.2)
app/src/screens/dev/MockDataScreenDeepLink.tsx

[error] 68-68: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)

⏰ 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: build
🔇 Additional comments (31)
app/src/hooks/useConnectionModal.ts (1)

59-59: LGTM! Dependency array correctly updated.

The addition of hideNetworkModal and showModal to the useEffect dependency array is the right fix. These values are used within the effect logic (lines 48-49 and 52), so they should be included as dependencies to ensure the effect re-runs when these values change. This improves the hook's reactivity and follows React hooks best practices.

app/src/screens/misc/LoadingScreen.tsx (2)

29-37: Good performance optimization by moving terminalStates to module scope.

Moving this array outside the component prevents unnecessary recreation on each render, which is a solid performance improvement. The states correctly represent terminal conditions from the ProvingStateType union, and the descriptive comment makes the intent clear.


102-103: Verify the intentional omission of passportData from dependencies.

The ESLint disable appears intentional since you only want to reinitialize when the screen becomes focused, not when passportData changes. However, ensure this won't cause stale closure issues - the effect accesses passportData in the condition but doesn't depend on it.

Consider if this logic is correct: should the initialization effect re-run if passportData becomes null after being set?

app/src/utils/proving/cose.ts (2)

8-21: Excellent documentation and TypeScript usage.

The comprehensive JSDoc documentation clearly explains the function's purpose, parameters, and usage context. The TypeScript typing is appropriate and the reference to AWS Nitro Enclaves documentation provides valuable context for future maintainers.


22-22: Verified COSE Export Change Is Safe

Search results confirm there are no named imports of the cose module—every reference (e.g. in app/src/utils/proving/attest.ts) uses the default import syntax. The refactor from a named to a default-only export will not break existing code.

No further changes required.

app/src/screens/recovery/RecoverWithPhraseScreen.tsx (2)

85-85: LGTM! Dependency array correctly updated.

The addition of navigation and trackEvent to the dependency array ensures proper memoization of the restoreAccount callback. This prevents stale closures and ensures the callback updates when these dependencies change.


50-55: Good input validation and early return pattern.

The mnemonic validation using ethers.Mnemonic.isValidMnemonic() provides proper cryptographic validation before attempting restoration. The trimming and early return on invalid input prevents unnecessary processing.

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

301-301: Excellent dependency array fix!

Adding navigation to the dependency array ensures the renderItem callback properly tracks the navigation object used in the onPress handler. This prevents potential issues with stale navigation references.


392-396: Well-optimized SectionList configuration.

The performance optimizations are well-implemented:

  • initialNumToRender={10} and maxToRenderPerBatch={10} for controlled rendering
  • removeClippedSubviews={true} for memory efficiency
  • windowSize={10} for optimal viewport management

These settings will provide smooth scrolling even with large proof history datasets.

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

66-66: Dependency array properly updated.

The expanded dependency array now correctly includes onRevealWords and setHasViewedRecoveryPhrase, ensuring the callback responds to changes in all referenced variables. This prevents stale closure issues.


55-66: Good security practices for mnemonic handling.

The component properly:

  • Uses state to control mnemonic visibility
  • Implements reveal-then-copy workflow
  • Provides visual feedback for copy operations
  • Uses redacted placeholder content

This prevents accidental exposure of sensitive mnemonic data.

app/src/screens/home/HomeScreen.tsx (2)

8-8: Good modernization of React hook imports.

The explicit import of useCallback and direct usage (instead of React.useCallback) follows modern React best practices and improves code clarity. This pattern is more tree-shakable and aligns with current community standards.

Also applies to: 56-56


74-74: Appropriate navigation prevention.

Using usePreventRemove(true, () => {}) on the home screen prevents accidental back navigation, which is correct for a main application screen. This ensures users don't accidentally navigate away from the primary interface.

app/src/screens/dev/DevSettingsScreen.tsx (3)

173-191: Appropriate security warnings for destructive operations.

The handleClearSecretsPress function properly:

  • Shows a clear warning about data loss
  • Explains the consequences of the action
  • Requires explicit confirmation
  • Uses destructive button styling

This follows security best practices for dangerous operations in development tools.


269-320: Well-implemented private key security pattern.

The private key display implementation correctly:

  • Starts with redacted view by default
  • Requires explicit user action to reveal
  • Uses monospace font for better readability
  • Implements proper text selection for copying

This prevents accidental exposure while maintaining developer utility.


9-9: Memoization safe: items is static

Our inspection confirms that items is declared once as a constant array at line 54 in app/src/screens/dev/DevSettingsScreen.tsx with no reassignments or mutations elsewhere. Using an empty dependency array for useMemo is therefore correct and won’t introduce stale data. No changes required.

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

90-97: Excellent dependency array fix for account recovery callback.

The expanded dependency array now correctly includes all referenced variables (navigation, toggleCloudBackupEnabled), preventing potential stale closure bugs in this security-critical account recovery flow. This ensures the callback always has access to the latest values.

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

4-8: Good import consolidation for better readability.

Consolidating related imports from @selfxyz/common into a single grouped statement improves code organization and readability.

app/src/layouts/SimpleScrolledTitleLayout.tsx (3)

3-3: Good explicit import pattern for better tree-shaking.

Explicitly importing PropsWithChildren instead of accessing it via React.PropsWithChildren improves tree-shaking and code clarity.


14-21: Consistent interface update following import changes.

The interface correctly uses the explicitly imported PropsWithChildren type, maintaining consistency with the import changes.


47-47: Acceptable styling property change.

The change from shorthand mb="$2" to explicit marginBottom={16} is functionally equivalent and acceptable, though it moves away from the tamagui styling system's shorthand notation.

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

92-100: Comprehensive dependency array fix for proof status effect.

The expanded dependency array now correctly includes all referenced variables (appName, sessionId, errorCode, reason, updateProofStatus), ensuring the effect properly reacts to changes in the proof verification flow. This prevents stale closure bugs in this security-critical component that handles proof status updates and analytics tracking.

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

92-92: Correct memoization dependency fix for disclosure strings.

Adding data.appName to the dependency array is essential since the memoized disclosures computation incorporates appName into multiple disclosure strings (lines 59, 65, 68, 71, 74, 77, 80, 83). Without this dependency, the disclosure strings could display stale app names when the data changes.

app/src/screens/passport/PassportNFCScanScreen.tsx (2)

262-272: LGTM! Improved hook dependency management.

The expanded dependency array for onVerifyPress correctly includes all referenced values (route.params, navigation, openErrorModal) and ensures the callback updates when any of these dependencies change. This prevents stale closures and aligns with ESLint's exhaustive-deps rule.


282-282: Correct dependency array simplification.

Since the _cancelScanIfRunning function body is commented out (lines 280-281), an empty dependency array is appropriate. This prevents unnecessary re-renders while maintaining the callback reference stability.

app/src/screens/settings/ManageDocumentsScreen.tsx (1)

57-59: Correct useEffect dependency update.

The useEffect now properly depends on the memoized loadPassportDataInfo callback, ensuring it re-runs only when the callback's dependencies change. This is a significant improvement over the previous empty dependency array.

app/src/screens/settings/ShowRecoveryPhraseScreen.tsx (1)

19-19: Correct dependency array update.

Adding loadMnemonic to the dependency array ensures the callback recreates when the loadMnemonic function reference changes. This prevents stale closures and aligns with the exhaustive-deps ESLint rule.

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

30-30: Appropriate dependency array enhancement.

Including loadMnemonic in the dependency array ensures the callback remains fresh when the mnemonic loading function changes. This maintains correct reactivity and prevents potential stale closure issues.

app/src/hooks/useMnemonic.ts (1)

19-19: Essential dependency fix for hook stability.

Adding getOrCreateMnemonic to the dependency array is crucial since the callback directly calls this function. This foundational improvement ensures that all components using this hook (like the recovery screens) receive fresh mnemonic loading logic when the auth provider updates.

app/src/providers/authProvider.tsx (2)

223-223: LGTM: Correct dependency array update for useCallback

The addition of authenticationTimeoutinMs to the dependency array is correct since this value is used within the callback (line 221). This ensures the callback is recreated when the timeout value changes, preventing stale closures.


249-255: LGTM: Proper dependency array update for useMemo

The addition of getOrCreateMnemonic and restoreAccountFromMnemonic to the dependency array is correct since these functions are included in the memoized state object. This ensures the context value updates appropriately when these callbacks change, following React hooks best practices.

The dependency array now properly includes all values from the component scope that are used within the memoized computation.

transphorm and others added 3 commits July 24, 2025 12:41
* Expand view style props

* Expand remaining style props

* update types

* fix pipeline

* fix test env check
@transphorm
Copy link
Member Author

@coderabbitai full review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 25, 2025

✅ Actions performed

Full review triggered.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
app/src/screens/misc/ModalScreen.tsx (1)

100-105: Prefer design-system spacing tokens over raw numbers

Hard-coding 8 bypasses the theme’s spacing scale and risks visual drift if the global scale changes. Tamagui (and our design system) exposes $space.* tokens that remain semantically meaningful and automatically adjust across breakpoints.

-        marginHorizontal={8}
+        // `$2` = 8px on current scale
+        marginHorizontal="$2"

Aligns with the ongoing effort in this PR to make style props explicit and consistent.

app/src/types/png.d.ts (1)

1-4: Standard PNG module declaration with room for improvement

The module declaration follows standard patterns for asset imports. While using any is common for image assets, consider using a more specific type for better type safety.

Consider using a more specific type for better type safety:

 declare module '*.png' {
-  const content: any;
+  const content: string;
   export default content;
 }

This assumes PNG imports resolve to URL strings (common in most bundler configurations).

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f739fed and 2231a77.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (68)
  • app/.eslintrc.cjs (2 hunks)
  • app/env.ts (1 hunks)
  • app/index.js (1 hunks)
  • app/package.json (1 hunks)
  • app/scripts/mobile-deploy-confirm.cjs (2 hunks)
  • app/src/components/ErrorBoundary.tsx (2 hunks)
  • app/src/components/Mnemonic.tsx (2 hunks)
  • app/src/components/NavBar/BaseNavBar.tsx (2 hunks)
  • app/src/components/native/PassportCamera.web.tsx (2 hunks)
  • app/src/components/native/RCTFragment.tsx (1 hunks)
  • app/src/hooks/useAesopRedesign.ts (1 hunks)
  • app/src/hooks/useConnectionModal.ts (1 hunks)
  • app/src/hooks/useMnemonic.ts (1 hunks)
  • app/src/layouts/ExpandableBottomLayout.tsx (1 hunks)
  • app/src/layouts/SimpleScrolledTitleLayout.tsx (3 hunks)
  • app/src/mocks/react-native-gesture-handler.ts (2 hunks)
  • app/src/mocks/react-native-safe-area-context.js (3 hunks)
  • app/src/navigation/index.tsx (2 hunks)
  • app/src/providers/authProvider.tsx (2 hunks)
  • app/src/providers/passportDataProvider.tsx (2 hunks)
  • app/src/screens/dev/DevFeatureFlagsScreen.tsx (7 hunks)
  • app/src/screens/dev/DevSettingsScreen.tsx (9 hunks)
  • app/src/screens/dev/MockDataScreen.tsx (18 hunks)
  • app/src/screens/dev/MockDataScreenDeepLink.tsx (6 hunks)
  • app/src/screens/home/DisclaimerScreen.tsx (1 hunks)
  • app/src/screens/home/HomeScreen.tsx (3 hunks)
  • app/src/screens/home/ProofHistoryDetailScreen.tsx (1 hunks)
  • app/src/screens/home/ProofHistoryScreen.tsx (2 hunks)
  • app/src/screens/misc/LaunchScreen.tsx (1 hunks)
  • app/src/screens/misc/LoadingScreen.tsx (3 hunks)
  • app/src/screens/misc/ModalScreen.tsx (1 hunks)
  • app/src/screens/misc/SplashScreen.tsx (3 hunks)
  • app/src/screens/passport/PassportCameraScreen.tsx (1 hunks)
  • app/src/screens/passport/PassportCameraTroubleScreen.tsx (2 hunks)
  • app/src/screens/passport/PassportNFCScanScreen.tsx (4 hunks)
  • app/src/screens/passport/PassportNFCScanScreen.web.tsx (1 hunks)
  • app/src/screens/passport/PassportNFCTroubleScreen.tsx (2 hunks)
  • app/src/screens/prove/ConfirmBelongingScreen.tsx (2 hunks)
  • app/src/screens/prove/ProofRequestStatusScreen.tsx (1 hunks)
  • app/src/screens/prove/ProveScreen.tsx (4 hunks)
  • app/src/screens/prove/QRCodeTroubleScreen.tsx (2 hunks)
  • app/src/screens/prove/ViewFinderScreen.tsx (1 hunks)
  • app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx (5 hunks)
  • app/src/screens/recovery/AccountRecoveryScreen.tsx (1 hunks)
  • app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx (1 hunks)
  • app/src/screens/recovery/PassportDataNotFoundScreen.tsx (3 hunks)
  • app/src/screens/recovery/RecoverWithPhraseScreen.tsx (2 hunks)
  • app/src/screens/recovery/SaveRecoveryPhraseScreen.tsx (1 hunks)
  • app/src/screens/settings/CloudBackupScreen.tsx (2 hunks)
  • app/src/screens/settings/ManageDocumentsScreen.tsx (10 hunks)
  • app/src/screens/settings/PassportDataInfoScreen.tsx (2 hunks)
  • app/src/screens/settings/SettingsScreen.tsx (6 hunks)
  • app/src/screens/settings/ShowRecoveryPhraseScreen.tsx (1 hunks)
  • app/src/stores/proofHistoryStore.ts (1 hunks)
  • app/src/stores/selfAppStore.tsx (2 hunks)
  • app/src/types/png.d.ts (1 hunks)
  • app/src/types/svg.d.ts (1 hunks)
  • app/src/utils/cloudBackup/google.ts (1 hunks)
  • app/src/utils/deeplinks.ts (2 hunks)
  • app/src/utils/nfcScanner.ts (1 hunks)
  • app/src/utils/proving/attest.ts (3 hunks)
  • app/src/utils/proving/cose.ts (1 hunks)
  • app/src/utils/proving/provingInputs.ts (2 hunks)
  • app/src/utils/proving/provingMachine.ts (2 hunks)
  • app/tests/__setup__/@env.js (1 hunks)
  • app/tests/__setup__/notificationServiceMock.js (1 hunks)
  • app/tests/__setup__/svgMock.js (1 hunks)
  • app/tsconfig.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
app/src/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit Configuration File

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

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

Files:

  • app/src/screens/prove/QRCodeTroubleScreen.tsx
  • app/src/navigation/index.tsx
  • app/src/components/native/RCTFragment.tsx
  • app/src/screens/passport/PassportCameraTroubleScreen.tsx
  • app/src/screens/misc/ModalScreen.tsx
  • app/src/screens/passport/PassportCameraScreen.tsx
  • app/src/screens/recovery/SaveRecoveryPhraseScreen.tsx
  • app/src/components/native/PassportCamera.web.tsx
  • app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx
  • app/src/screens/recovery/PassportDataNotFoundScreen.tsx
  • app/src/screens/settings/ShowRecoveryPhraseScreen.tsx
  • app/src/screens/home/HomeScreen.tsx
  • app/src/screens/misc/LaunchScreen.tsx
  • app/src/providers/passportDataProvider.tsx
  • app/src/screens/home/ProofHistoryScreen.tsx
  • app/src/types/png.d.ts
  • app/src/hooks/useAesopRedesign.ts
  • app/src/components/NavBar/BaseNavBar.tsx
  • app/src/utils/deeplinks.ts
  • app/src/screens/recovery/RecoverWithPhraseScreen.tsx
  • app/src/screens/recovery/AccountRecoveryScreen.tsx
  • app/src/layouts/ExpandableBottomLayout.tsx
  • app/src/stores/proofHistoryStore.ts
  • app/src/mocks/react-native-gesture-handler.ts
  • app/src/utils/proving/provingMachine.ts
  • app/src/screens/prove/ProofRequestStatusScreen.tsx
  • app/src/screens/passport/PassportNFCScanScreen.web.tsx
  • app/src/utils/proving/attest.ts
  • app/src/screens/passport/PassportNFCScanScreen.tsx
  • app/src/components/Mnemonic.tsx
  • app/src/layouts/SimpleScrolledTitleLayout.tsx
  • app/src/utils/proving/cose.ts
  • app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx
  • app/src/mocks/react-native-safe-area-context.js
  • app/src/screens/home/ProofHistoryDetailScreen.tsx
  • app/src/components/ErrorBoundary.tsx
  • app/src/screens/dev/DevFeatureFlagsScreen.tsx
  • app/src/screens/home/DisclaimerScreen.tsx
  • app/src/stores/selfAppStore.tsx
  • app/src/screens/prove/ConfirmBelongingScreen.tsx
  • app/src/screens/settings/CloudBackupScreen.tsx
  • app/src/screens/misc/SplashScreen.tsx
  • app/src/screens/passport/PassportNFCTroubleScreen.tsx
  • app/src/hooks/useMnemonic.ts
  • app/src/screens/dev/MockDataScreenDeepLink.tsx
  • app/src/utils/nfcScanner.ts
  • app/src/screens/prove/ViewFinderScreen.tsx
  • app/src/screens/dev/DevSettingsScreen.tsx
  • app/src/utils/proving/provingInputs.ts
  • app/src/utils/cloudBackup/google.ts
  • app/src/providers/authProvider.tsx
  • app/src/types/svg.d.ts
  • app/src/screens/prove/ProveScreen.tsx
  • app/src/screens/settings/PassportDataInfoScreen.tsx
  • app/src/hooks/useConnectionModal.ts
  • app/src/screens/dev/MockDataScreen.tsx
  • app/src/screens/settings/SettingsScreen.tsx
  • app/src/screens/settings/ManageDocumentsScreen.tsx
  • app/src/screens/misc/LoadingScreen.tsx
🧠 Learnings (14)
app/src/screens/prove/QRCodeTroubleScreen.tsx (1)

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

app/src/screens/passport/PassportCameraTroubleScreen.tsx (2)

Learnt from: transphorm
PR: #636
File: app/src/utils/cameraPermission.ts:19-21
Timestamp: 2025-07-12T22:00:02.041Z
Learning: The Android permission handling in app/src/utils/cameraPermission.ts is robust and properly implemented using PermissionsAndroid.request() and PermissionsAndroid.check(). Previous issues with Android permission assumptions have been resolved in the current implementation.

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

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

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

app/src/screens/passport/PassportCameraScreen.tsx (2)

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

Learnt from: transphorm
PR: #636
File: app/src/utils/cameraPermission.ts:19-21
Timestamp: 2025-07-12T22:00:02.041Z
Learning: The Android permission handling in app/src/utils/cameraPermission.ts is robust and properly implemented using PermissionsAndroid.request() and PermissionsAndroid.check(). Previous issues with Android permission assumptions have been resolved in the current implementation.

app/src/components/native/PassportCamera.web.tsx (2)

Learnt from: transphorm
PR: #636
File: app/src/utils/cameraPermission.ts:19-21
Timestamp: 2025-07-12T22:00:02.041Z
Learning: The Android permission handling in app/src/utils/cameraPermission.ts is robust and properly implemented using PermissionsAndroid.request() and PermissionsAndroid.check(). Previous issues with Android permission assumptions have been resolved in the current implementation.

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

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

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

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

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

app/src/screens/passport/PassportNFCScanScreen.web.tsx (1)

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

app/src/screens/passport/PassportNFCScanScreen.tsx (1)

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

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

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

app/src/utils/nfcScanner.ts (1)

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

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

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

app/src/utils/cloudBackup/google.ts (1)

Learnt from: transphorm
PR: #636
File: app/src/utils/cameraPermission.ts:19-21
Timestamp: 2025-07-12T22:00:02.041Z
Learning: The Android permission handling in app/src/utils/cameraPermission.ts is robust and properly implemented using PermissionsAndroid.request() and PermissionsAndroid.check(). Previous issues with Android permission assumptions have been resolved in the current implementation.

app/src/screens/settings/PassportDataInfoScreen.tsx (1)

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

🧬 Code Graph Analysis (25)
app/src/screens/misc/ModalScreen.tsx (1)
app/src/utils/colors.ts (1)
  • white (7-7)
app/src/screens/passport/PassportCameraScreen.tsx (1)
app/src/components/typography/Title.tsx (1)
  • Title (8-27)
app/src/screens/recovery/PassportDataNotFoundScreen.tsx (1)
app/src/utils/colors.ts (1)
  • slate200 (10-10)
app/src/screens/home/HomeScreen.tsx (3)
app/src/utils/colors.ts (2)
  • black (6-6)
  • amber500 (5-5)
app/src/utils/constants.ts (1)
  • extraYPadding (3-3)
app/src/components/typography/Caption.tsx (1)
  • Caption (8-21)
app/src/screens/misc/LaunchScreen.tsx (1)
app/src/utils/colors.ts (1)
  • black (6-6)
app/src/screens/home/ProofHistoryScreen.tsx (2)
app/src/utils/colors.ts (1)
  • slate50 (8-8)
app/src/utils/constants.ts (1)
  • extraYPadding (3-3)
app/src/hooks/useAesopRedesign.ts (2)
app/env.ts (1)
  • IS_TEST_BUILD (7-7)
app/tests/__setup__/@env.js (2)
  • IS_TEST_BUILD (3-3)
  • IS_TEST_BUILD (3-3)
app/src/screens/recovery/AccountRecoveryScreen.tsx (3)
app/src/utils/colors.ts (2)
  • slate600 (14-14)
  • white (7-7)
app/src/layouts/ExpandableBottomLayout.tsx (1)
  • ExpandableBottomLayout (158-163)
app/src/components/typography/Title.tsx (1)
  • Title (8-27)
app/src/screens/prove/ProofRequestStatusScreen.tsx (2)
app/src/stores/database.ts (1)
  • updateProofStatus (143-156)
app/src/stores/database.web.ts (1)
  • updateProofStatus (218-253)
app/src/utils/proving/attest.ts (1)
app/src/utils/proving/provingUtils.ts (1)
  • ec (13-13)
app/src/layouts/SimpleScrolledTitleLayout.tsx (1)
app/src/components/buttons/SecondaryButton.tsx (1)
  • SecondaryButton (8-23)
app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx (2)
app/src/utils/colors.ts (2)
  • slate600 (14-14)
  • white (7-7)
app/src/layouts/ExpandableBottomLayout.tsx (1)
  • ExpandableBottomLayout (158-163)
app/src/screens/prove/ConfirmBelongingScreen.tsx (3)
app/src/utils/proving/provingMachine.ts (1)
  • useProvingStore (198-1012)
app/src/utils/haptic/index.ts (1)
  • notificationSuccess (16-16)
app/src/consts/analytics.ts (1)
  • ProofEvents (55-111)
app/env.ts (1)
app/tests/__setup__/@env.js (2)
  • GOOGLE_SIGNIN_ANDROID_CLIENT_ID (4-4)
  • GOOGLE_SIGNIN_ANDROID_CLIENT_ID (4-4)
app/src/utils/nfcScanner.ts (2)
app/env.ts (1)
  • ENABLE_DEBUG_LOGS (14-14)
app/tests/__setup__/@env.js (2)
  • ENABLE_DEBUG_LOGS (8-8)
  • ENABLE_DEBUG_LOGS (8-8)
app/src/screens/prove/ViewFinderScreen.tsx (1)
app/src/components/typography/Title.tsx (1)
  • Title (8-27)
app/src/screens/dev/DevSettingsScreen.tsx (1)
app/src/utils/colors.ts (1)
  • textBlack (39-39)
app/src/utils/cloudBackup/google.ts (2)
app/env.ts (1)
  • GOOGLE_SIGNIN_ANDROID_CLIENT_ID (8-9)
app/tests/__setup__/@env.js (2)
  • GOOGLE_SIGNIN_ANDROID_CLIENT_ID (4-4)
  • GOOGLE_SIGNIN_ANDROID_CLIENT_ID (4-4)
app/src/screens/prove/ProveScreen.tsx (2)
app/src/components/typography/BodyText.ts (1)
  • BodyText (7-9)
app/src/utils/colors.ts (1)
  • slate300 (11-11)
app/src/screens/settings/PassportDataInfoScreen.tsx (2)
app/src/utils/constants.ts (1)
  • extraYPadding (3-3)
app/src/utils/colors.ts (1)
  • white (7-7)
app/src/screens/dev/MockDataScreen.tsx (8)
common/src/utils/passports/genMockIdDoc.ts (1)
  • genMockIdDoc (47-77)
app/src/utils/colors.ts (4)
  • white (7-7)
  • borderColor (38-38)
  • textBlack (39-39)
  • separatorColor (40-40)
app/src/utils/constants.ts (1)
  • extraYPadding (3-3)
app/src/mocks/react-native-gesture-handler.ts (1)
  • GestureDetector (43-48)
app/src/components/typography/Title.tsx (1)
  • Title (8-27)
app/src/components/typography/BodyText.ts (1)
  • BodyText (7-9)
app/src/utils/haptic/index.ts (2)
  • buttonTap (19-19)
  • selectionChange (18-18)
app/src/consts/analytics.ts (1)
  • MockDataEvents (138-150)
app/src/screens/settings/SettingsScreen.tsx (2)
app/src/utils/colors.ts (1)
  • black (6-6)
app/src/utils/constants.ts (1)
  • extraYPadding (3-3)
app/src/screens/settings/ManageDocumentsScreen.tsx (3)
app/src/providers/passportDataProvider.tsx (2)
  • loadDocumentCatalog (104-118)
  • getAllDocuments (235-251)
app/src/utils/colors.ts (3)
  • textBlack (39-39)
  • borderColor (38-38)
  • white (7-7)
app/src/utils/constants.ts (1)
  • extraYPadding (3-3)
app/tests/__setup__/@env.js (1)
app/env.ts (9)
  • GOOGLE_SIGNIN_ANDROID_CLIENT_ID (8-9)
  • GOOGLE_SIGNIN_WEB_CLIENT_ID (10-11)
  • SENTRY_DSN (12-12)
  • SEGMENT_KEY (13-13)
  • ENABLE_DEBUG_LOGS (14-14)
  • DEFAULT_PNUMBER (15-15)
  • DEFAULT_DOB (16-16)
  • DEFAULT_DOE (17-17)
  • MIXPANEL_NFC_PROJECT_TOKEN (18-18)
app/src/screens/misc/LoadingScreen.tsx (2)
app/src/utils/proving/provingMachine.ts (1)
  • ProvingStateType (134-156)
app/src/utils/colors.ts (1)
  • black (6-6)
🔇 Additional comments (129)
app/src/screens/misc/LaunchScreen.tsx (1)

38-45: Explicit backgroundColor prop improves readability and avoids shorthand ambiguity—nice touch.
This aligns with the new ESLint style rules and keeps the styling intent crystal-clear. No functional impact observed.

app/src/layouts/SimpleScrolledTitleLayout.tsx (3)

3-3: Good TypeScript modernization!

Explicitly importing PropsWithChildren directly is cleaner than accessing it via the React namespace. This improves code readability and follows modern React TypeScript patterns.


14-14: Consistent with import modernization.

The interface correctly uses the directly imported PropsWithChildren type, maintaining the same type safety while being consistent with the updated import statement.


47-47: Confirm Tamagui spacing token mapping

I didn’t find a local definition for the $2 token in the repo, so it’s likely coming from Tamagui’s default theme. Please double-check that $2 indeed resolves to 16px. If it doesn’t, hard-coding 16 here could drift from your design system.

• Affected locations:
app/src/layouts/SimpleScrolledTitleLayout.tsx (SecondaryButton marginBottom={16})
app/src/screens/misc/LaunchScreen.tsx (marginBottom: 16)
app/src/components/native/PassportCamera.web.tsx (marginBottom: '16px')

Recommendations:

  • If $2 equals 16px in your theme, feel free to keep it explicit—but be aware future token changes won’t propagate.
  • Otherwise, revert to token usage (marginBottom="$2") or define a custom token for 16px spacing to preserve design consistency.
app/src/screens/passport/PassportNFCScanScreen.web.tsx (1)

35-37: LGTM! Style prop standardization improves readability.

The change from shorthand props (h, w) to full CSS property names (height, width) enhances code clarity and aligns with the updated ESLint configuration. This standardization makes the codebase more maintainable.

app/src/components/native/RCTFragment.tsx (1)

4-9: LGTM! Import consolidation enhances code organization.

Consolidating the React Native imports into a single grouped statement improves readability and aligns with the updated ESLint import sorting rules. The functionality remains unchanged while the code structure is cleaner.

app/src/stores/proofHistoryStore.ts (1)

170-170: LGTM! Enforcing immutability with const declaration.

Changing from let to const for totalCount is appropriate since the variable is never reassigned. This enforces immutability and prevents accidental modifications, improving code safety and aligning with TypeScript best practices.

app/src/screens/prove/QRCodeTroubleScreen.tsx (2)

3-3: LGTM! Explicit hook import follows modern React patterns.

Explicitly importing useEffect and using it directly instead of React.useEffect improves code consistency and follows modern React development patterns. This standardization enhances maintainability across the codebase.


48-50: LGTM! Consistent hook usage after explicit import.

The direct useEffect call aligns with the explicit import pattern and maintains the same functionality for analytics flushing on error screen mount. The dependency array is correctly empty for one-time execution.

app/src/screens/passport/PassportCameraTroubleScreen.tsx (2)

3-3: LGTM! Consistent hook import pattern across trouble screens.

The explicit useEffect import maintains consistency with other trouble screen components and follows modern React development practices. This standardization improves codebase maintainability.


51-53: LGTM! Proper analytics flushing on error screen mount.

The direct useEffect usage with empty dependency array correctly flushes analytics once when the trouble screen mounts. This pattern is consistent with other error screens in the application.

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

3-3: LGTM: Clean import modernization

The update from React.Component to named imports aligns with modern React patterns and improves code clarity. The functionality remains unchanged while making dependencies more explicit.

Also applies to: 18-18

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

92-92: Excellent dependency array fix

Adding data.appName to the dependency array is crucial since the disclosure strings are templated with the app name. This prevents stale closures and ensures the UI updates correctly when the app name changes.

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

35-40: Good standardization of style props

Replacing shorthand Tamagui props with full CSS property names improves code readability and maintainability. This makes the styling more explicit and easier to understand for developers familiar with standard CSS.

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

38-38: Consistent style prop standardization

Converting shorthand props (f, jc, pb) to full CSS property names (flex, justifyContent, paddingBottom) maintains consistency with the codebase-wide standardization effort and improves code clarity.

app/src/screens/passport/PassportNFCTroubleScreen.tsx (1)

3-3: Clean React hook import modernization

Updating from React.useEffect to direct useEffect import follows modern React patterns and improves code clarity. The change maintains identical functionality while making hook dependencies more explicit.

Also applies to: 50-50

app/src/components/native/PassportCamera.web.tsx (2)

3-3: LGTM: Import modernization aligns with React best practices.

The explicit import of useEffect follows modern React patterns and improves code readability. This change is consistent with the broader ESLint configuration updates across the codebase.


30-30: Clean conversion from React.useEffect to direct useEffect usage.

The direct usage of useEffect is more concise and aligns with contemporary React development patterns. The hook's functionality and dependencies remain unchanged.

app/src/screens/recovery/PassportDataNotFoundScreen.tsx (3)

3-3: Good modernization of React import pattern.

Explicit import of useEffect improves code clarity and follows current React best practices.


19-19: Clean conversion to direct useEffect usage.

The direct useEffect call is more readable and consistent with modern React development patterns.


29-33: Improved prop readability with explicit marginTop.

Converting from the shorthand mt={8} to explicit marginTop={8} with multi-line formatting enhances code readability and maintainability. This change aligns with the project-wide effort to standardize prop naming conventions.

app/src/layouts/ExpandableBottomLayout.tsx (1)

107-107: No remaining pb usages found – removal of shorthand fallback is safe

I ran a project-wide search for any pb= attributes (including on ExpandableBottomLayout and BottomSection) in all .ts/.tsx files under app/src and found zero occurrences. You can safely standardize on paddingBottom without breaking existing components.

app/src/mocks/react-native-safe-area-context.js (2)

3-3: Excellent modernization of React imports in mock file.

Converting to named imports (createContext, createElement, Fragment) from default React import improves consistency with the broader codebase changes and follows modern React patterns.


7-7: Clean conversion to direct React API usage.

The direct usage of createElement, Fragment, and createContext eliminates the need to access these through the React object, making the code more concise and consistent with the project's updated import style.

Also applies to: 19-19, 37-37, 39-44

app/src/utils/proving/cose.ts (1)

22-22: No named cose imports detected – removal of named export is safe

I performed a repo-wide search under app/src and found only a default import of cose in

  • app/src/utils/proving/attest.ts:14

No instances of import { cose } were found. Removing the named export from cose.ts won’t break any existing internal usage.

app/src/screens/home/HomeScreen.tsx (3)

8-8: Good practice: Explicit hook imports improve code clarity

The change from importing React as a namespace to explicitly importing useCallback alongside React improves code readability and makes dependencies more transparent.


56-69: Proper useCallback implementation for useFocusEffect optimization

Wrapping the async function in useCallback with correct dependencies ([getAllDocuments, navigation]) is essential for preventing unnecessary re-renders and ensuring the effect updates when dependencies change.


78-80: Style prop standardization enhances code consistency

The changes from shorthand props (bg, jc, ai) to full CSS property names (backgroundColor, justifyContent, alignItems) improve code readability and align with explicit styling conventions across the codebase. This standardization reduces ambiguity and makes the code more accessible to developers unfamiliar with Tamagui's shorthand syntax.

Also applies to: 85-85, 92-92

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

92-100: Essential fix: Complete dependency array prevents stale closures

The expanded dependency array now correctly includes all variables used within the effect (appName, sessionId, errorCode, reason, updateProofStatus). This prevents stale closure bugs where the effect might use outdated values and ensures proper re-execution when any of these dependencies change. This is particularly important for the analytics tracking and database updates performed in this effect.

app/src/screens/recovery/RecoverWithPhraseScreen.tsx (2)

85-85: Correct dependency array ensures callback freshness

Adding navigation and trackEvent to the dependency array is essential since both are used within the restoreAccount callback. This prevents stale closures and ensures the callback always has access to the current navigation instance and tracking function, which is critical for the account recovery flow.


88-93: Style prop standardization maintains consistency

The conversion from pb to paddingBottom aligns with the codebase-wide effort to use explicit CSS property names. The reformatted YStack props also improve readability by placing each prop on its own line.

Also applies to: 122-122

app/scripts/mobile-deploy-confirm.cjs (1)

282-282: Good refactoring: Removed unused parameter improves function clarity

The removal of the unused versions parameter from displayDeploymentHeader is a clean refactoring that simplifies the function signature. Since the parameter wasn't used within the function implementation, this change reduces complexity without affecting functionality. The corresponding call site was correctly updated to match the new signature.

Also applies to: 353-353

app/src/screens/settings/PassportDataInfoScreen.tsx (1)

51-51: Style standardization improves code readability

The conversion of shorthand style props (py, f, jc, px) to their full CSS property equivalents (paddingVertical, flex, justifyContent, paddingHorizontal) enhances code clarity and maintains consistency with the broader codebase refactoring effort. These explicit property names make the styling intentions more transparent and accessible to all developers.

Also applies to: 91-91, 93-93, 97-97

app/src/screens/passport/PassportNFCScanScreen.tsx (3)

262-272: Dependency array improvements look good!

The addition of route.params, navigation, and openErrorModal to the dependency array correctly captures all values used within the onVerifyPress callback. This ensures the callback stays fresh when these dependencies change.


282-282: Appropriate dependency array simplification.

Since the function body is commented out and only contains empty logic, the empty dependency array is correct.


330-331: Consistent style prop naming improves readability.

The change from shorthand style props (h, w, mt, mb) to full property names (height, width, marginTop, marginBottom) enhances code clarity and consistency across the codebase.

Also applies to: 360-371, 377-377

app/src/providers/authProvider.tsx (2)

223-223: Correct dependency array for loginWithBiometrics.

Adding authenticationTimeoutinMs to the dependency array is necessary since it's used within the callback on line 221. This ensures the callback updates when the timeout value changes.


249-255: Proper memoization dependencies for context state.

Including getOrCreateMnemonic and restoreAccountFromMnemonic in the useMemo dependency array ensures the context state updates correctly when these callback functions change. This prevents stale closures in the context value.

app/src/providers/passportDataProvider.tsx (2)

41-48: Clean import consolidation from @selfxyz/common.

Grouping related imports together improves code organization and readability. The added imports (brutforceSignatureAlgorithmDsc, parseCertificateSimple, PassportData) are properly integrated with existing imports.


59-59: Streamlined authProvider imports.

Combining unsafe_getPrivateKey and useAuth into a single import statement follows best practices for import organization.

app/src/screens/misc/SplashScreen.tsx (3)

6-6: Improved React hook imports and usage.

Direct import and usage of useState is cleaner and more explicit than accessing it through the React namespace. This aligns with modern React patterns.

Also applies to: 27-28


15-15: Good import consolidation.

Grouping storePassportData with other passport data provider imports improves code organization.


110-110: Correct useEffect dependencies.

Adding checkBiometricsAvailable and setBiometricsAvailable to the dependency array ensures the effect re-runs when these functions change, maintaining proper hook behavior.

app/src/hooks/useConnectionModal.ts (1)

59-59: Improved useEffect dependency array.

The updated dependencies correctly include all state and functions used within the effect (dismissModal, hasNoConnection, hideNetworkModal, showModal, visible). Removing the direct navigationRef.isReady() call from dependencies is appropriate since it's called within the effect rather than being a dependency.

app/src/screens/prove/ConfirmBelongingScreen.tsx (2)

35-37: Excellent refactoring to individual store selectors.

The change from using the entire provingStore object to individual selectors (init, setFcmToken, setUserConfirmed) is a significant improvement. This prevents unnecessary re-renders when unrelated store state changes and follows Zustand best practices.


42-43: Proper useEffect dependency management.

The dependency array now correctly includes [init] instead of the entire store object. This ensures the effect only re-runs if the init function reference changes, which should be stable with Zustand's selector pattern.

app/src/screens/dev/DevSettingsScreen.tsx (4)

9-9: Good practice: Direct import of React hooks.

Importing useMemo directly from React improves code clarity and follows modern React patterns.


116-129: Correct useMemo optimization for static data.

The useMemo with an empty dependency array is appropriate here since the items array is static and defined outside the component. This optimization prevents unnecessary re-creation of the Select.Item components on every render.


214-221: Style prop standardization improves readability.

The changes from shorthand style props (e.g., p, bg, w, mt, mb, ai) to full property names (padding, backgroundColor, width, marginTop, marginBottom, alignItems) enhance code clarity and maintainability.

Also applies to: 223-231, 242-254, 256-264, 278-306, 329-356


97-97: Please verify Adapt’s when prop type and remove the as any cast if possible

The literal {'sm' as any} implies that AdaptProps['when'] may not accept the string "sm" directly. Locate the type definition in your tamagui package (e.g. node_modules/tamagui/dist/types/src/adapt/index.d.ts) and confirm whether "sm" is included in the allowed union. If it is, you can simplify the JSX as follows:

• app/src/screens/dev/DevSettingsScreen.tsx: line 97

-   <Adapt when={'sm' as any} platform="touch">
+   <Adapt when="sm" platform="touch">
app/src/screens/settings/ManageDocumentsScreen.tsx (4)

5-5: Good addition of useCallback import.

Direct import of useCallback follows modern React patterns and improves code organization.


37-55: Proper memoization with comprehensive dependencies.

Converting loadPassportDataInfo to a useCallback with explicit dependencies is excellent for performance. The dependency array correctly includes all functions used within the callback (loadDocumentCatalog, getAllDocuments, setDocumentCatalog, setAllDocuments).


57-59: Correct useEffect dependency management.

The useEffect now properly depends on the memoized loadPassportDataInfo callback, ensuring it re-runs when dependencies change while preventing unnecessary executions.


142-158: Consistent style prop standardization.

The updates from shorthand props (ai, jc, p, py, mb, f, bg, w) to full property names (alignItems, justifyContent, padding, paddingVertical, marginBottom, flex, backgroundColor, width) align with the codebase-wide consistency improvements.

Also applies to: 163-177, 181-257, 281-314

app/index.js (1)

7-7: Correct placement of gesture handler import.

Moving the react-native-gesture-handler import to the app entry point is the recommended approach for proper initialization. This ensures the gesture handler is set up before any navigation or gesture-dependent components are loaded.

app/src/screens/settings/ShowRecoveryPhraseScreen.tsx (1)

19-19: Proper useCallback dependency management.

Adding loadMnemonic to the dependency array ensures the callback is correctly memoized and re-created when the loadMnemonic function reference changes. This aligns with the broader effort to maintain accurate hook dependencies across recovery phrase components.

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

42-42: Good immutability practice with const declaration.

Changing from let to const improves code clarity and prevents accidental reassignment.


72-72: Essential dependency array fix for useMemo correctness.

The expanded dependency array [color, component, onPress] is crucial - the previous [component] array was missing color and onPress dependencies, which could lead to stale closures and UI bugs when these props change.

app/src/screens/passport/PassportCameraScreen.tsx (1)

135-135: Improved style prop clarity with explicit property names.

The change from shorthand style props (pb, pt) to explicit property names (paddingBottom, paddingTop) enhances code readability and maintainability, especially for developers less familiar with the shorthand syntax.

Also applies to: 138-138

app/src/navigation/index.tsx (2)

9-9: Improved import efficiency with named imports.

Using named imports { useEffect } instead of accessing through the React namespace enables better tree-shaking and is the preferred React pattern.


76-76: Cleaner hook usage with direct useEffect import.

Direct useEffect usage is more concise than React.useEffect and follows React best practices.

app/src/stores/selfAppStore.tsx (1)

5-5: Enhanced code clarity with descriptive import naming.

Renaming the Socket.IO client import from io to socketIo improves readability and makes the code more self-documenting, especially valuable in files with multiple imports.

Also applies to: 35-35

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

30-30: Critical useCallback dependency array fix for mnemonic security.

Adding [loadMnemonic] to the dependency array is essential - the previous empty array could lead to stale closures where the callback uses an outdated loadMnemonic reference. This is particularly important for security-sensitive recovery phrase operations.

app/src/screens/prove/ViewFinderScreen.tsx (2)

141-141: Style prop expansion improves readability

Good change from shorthand pb to explicit paddingBottom - this enhances code clarity and maintains consistency with the broader codebase refactoring effort.


144-144: Consistent style prop naming

The change from pt to paddingTop aligns well with the standardization effort across the codebase. This makes the styling more explicit and easier to understand.

app/src/screens/settings/CloudBackupScreen.tsx (2)

113-113: Style standardization continues

Excellent consistency with the codebase-wide effort to replace shorthand style props with explicit names. The change from pb to paddingBottom improves readability.


137-137: Explicit padding property naming

The change from pt to paddingTop maintains the standardization pattern seen across other components. This makes the styling intentions more explicit.

app/env.ts (1)

8-9: Approve: Runtime validation and test mocks confirmed for GOOGLE_SIGNIN_ANDROID_CLIENT_ID

  • Runtime check in app/src/utils/cloudBackup/google.ts throws an error if the Android client ID is missing in non-test environments.
  • Test setup in app/tests/__setup__/@env.js provides a mock GOOGLE_SIGNIN_ANDROID_CLIENT_ID.
  • Sample env file (app/env.sample) includes the new variable placeholder.

All patterns align with existing exports and security best practices—no further changes needed.

app/src/mocks/react-native-gesture-handler.ts (3)

7-7: Explicit import improves clarity

Good change to explicitly import createElement alongside React. This makes the dependencies more explicit and follows modern React import patterns.


14-14: Consistent use of explicit import

Using the directly imported createElement function is cleaner and more explicit than accessing it through the React namespace.


47-47: Maintains consistency across mock components

The same pattern applied to GestureDetector maintains consistency throughout the mock implementation.

app/src/screens/recovery/AccountRecoveryScreen.tsx (3)

29-34: Style prop standardization looks good.

The conversion from shorthand p="$5" to explicit padding="$5" improves code readability and aligns with the broader ESLint configuration updates in this PR.


39-39: Consistent style prop naming applied.

The change from pb="$2.5" to paddingBottom="$2.5" maintains the same styling behavior while improving code clarity.


46-46: Final style prop conversion completed properly.

The transformation from pt="$6" to paddingTop="$6" completes the standardization pattern consistently applied throughout this component.

app/src/utils/deeplinks.ts (2)

3-3: Improved import specificity enhances tree shaking.

The change from default import to named import (parseUrl) is a good practice that enables better bundle optimization and aligns with the updated ESLint configuration.


28-28: Usage correctly updated to match new import.

The function call has been properly updated to use the directly imported parseUrl function, maintaining identical functionality while improving code clarity.

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

66-66: Critical dependency array fix improves React hooks correctness.

Adding onRevealWords and setHasViewedRecoveryPhrase to the dependency array is essential to prevent stale closure bugs. This ensures the callback updates correctly when these dependencies change.


101-101: Verify use of spacing tokens vs. hardcoded padding

Our grep search shows that nearly every component (e.g. ProofHistoryScreen, SettingsScreen, ProofHistoryDetailScreen, Disclosures, Tips, Mnemonic) uses hardcoded paddingVertical values (2, 12, 16, 20, 22, 28) and we found no instances of a theme-based py="$n" token in app/src​.

Please confirm whether the design system offers spacing tokens for vertical padding. If it does, consider swapping paddingVertical={16} (and the other numeric paddingVerticals) for the corresponding token (e.g. py="$2"). Otherwise, keeping the hardcoded value here is consistent with the rest of the codebase.

• Files using hardcoded paddingVertical:

  • app/src/screens/home/ProofHistoryScreen.tsx (paddingVertical={2})
  • app/src/screens/settings/SettingsScreen.tsx (paddingVertical={20})
  • app/src/screens/home/ProofHistoryDetailScreen.tsx (paddingVertical={4, 12, 16})
  • app/src/components/Disclosures.tsx (paddingVertical={22})
  • app/src/components/Mnemonic.tsx (paddingVertical={28}, later 16)
  • app/src/components/Tips.tsx (paddingVertical={10})
app/src/types/svg.d.ts (1)

1-6: Excellent TypeScript support for SVG imports.

This declaration file provides proper type safety for SVG assets in React Native, ensuring imported SVG components have correct SvgProps typing. This eliminates TypeScript errors and improves developer experience when working with SVG assets.

app/src/utils/proving/attest.ts (3)

8-8: Import optimization maintains cryptographic security.

The change to named import (ec as ellipticEc) improves bundle optimization and code clarity while preserving identical cryptographic functionality for TEE attestation verification.


292-292: Elliptic curve instantiation correctly updated.

The usage has been properly updated to use the renamed import, maintaining the same p384 elliptic curve operations for public key extraction from PEM certificates.


340-340: Certificate signature verification maintains consistency.

The elliptic curve instantiation in the signature verification function correctly uses the updated import, preserving the cryptographic integrity of certificate chain validation.

app/tests/__setup__/svgMock.js (1)

3-5: Modern React import pattern implemented correctly.

The change from default React import to named createElement import aligns with React 17+ best practices and reduces bundle size. The component implementation is correctly updated to use the direct import.

app/src/hooks/useMnemonic.ts (1)

19-19: Correct dependency array fix for useCallback.

Adding getOrCreateMnemonic to the dependency array ensures the callback updates when the function reference changes, preventing stale closure bugs. This follows React hooks best practices and aligns with ESLint rules for exhaustive dependencies.

app/tests/__setup__/notificationServiceMock.js (1)

6-8: Good cleanup of unused parameter.

Removing the unused state parameter simplifies the mock implementation while maintaining the same functionality. This cleanup aligns with modern linting practices and improves code maintainability.

app/src/hooks/useAesopRedesign.ts (1)

6-6: Clarify IS_TEST_BUILD conversion without JSON.parse

The current hook uses JSON.parse(String(IS_TEST_BUILD ?? 'false')) to coerce both boolean and string inputs into a boolean. While it “works,” replacing it with Boolean() or returning IS_TEST_BUILD directly would break the test stub (since Boolean('false') yields true and a non‐empty string is truthy). Instead, pick one of these cleaner approaches:

• Update the test stub to export a boolean, then simplify the hook:
File: app/tests/__setup__/@env.js

- export const IS_TEST_BUILD = 'false';
+ export const IS_TEST_BUILD = false;

File: app/src/hooks/useAesopRedesign.ts

- return JSON.parse(String(IS_TEST_BUILD ?? 'false'));
+ return IS_TEST_BUILD;

• Or, handle both types explicitly in the hook without JSON.parse:
File: app/src/hooks/useAesopRedesign.ts

export function shouldShowAesopRedesign() {
  return typeof IS_TEST_BUILD === 'string'
    ? IS_TEST_BUILD === 'true'
    : IS_TEST_BUILD;
}

Either change makes the conversion intention clear, avoids misuse of JSON.parse, and keeps tests green.

Likely an incorrect or invalid review comment.

app/src/utils/cloudBackup/google.ts (3)

3-3: LGTM: Clean import using the new path alias.

The import statement correctly uses the @env path alias, which aligns with the TypeScript configuration changes in this PR.


11-19: Excellent runtime validation implementation.

The dual test environment detection (NODE_ENV === 'test' and JEST_WORKER_ID) provides robust coverage, and the descriptive error message makes debugging straightforward. This prevents potential runtime failures in production when the environment variable is missing.


24-24: Good fallback strategy for test environments.

The fallback to 'mock-client-id' ensures tests can execute without requiring actual Google Sign-In credentials, while the runtime check above ensures production environments have proper configuration.

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

301-301: Correct dependency array fix prevents stale closures.

Adding navigation to the dependency array ensures the renderItem callback is properly updated when the navigation object changes, preventing potential stale closure issues since navigation.navigate() is used within the callback.


373-377: Good stylistic improvement for clarity.

Replacing shorthand props (bg, pb) with full property names (backgroundColor, paddingBottom) improves code readability and aligns with the consistent styling approach being adopted across the codebase.

app/src/utils/proving/provingMachine.ts (2)

12-12: Good naming improvement for clarity.

Renaming the Socket.IO import from io to socketIo makes the code more self-documenting and aligns with the consistent naming approach being adopted across the codebase.


408-408: Improved variable declaration and consistency.

The changes correctly update the function call to match the renamed import, and using const instead of let is more appropriate since the socket variable isn't reassigned after instantiation.

app/src/screens/misc/LoadingScreen.tsx (3)

29-37: Good performance optimization.

Moving the terminalStates array to module level prevents unnecessary recreation on every render since the array contents are static. This is a solid performance improvement.


102-103: Verify the ESLint disable is justified.

The ESLint disable for react-hooks/exhaustive-deps should be used cautiously. Ensure that excluding passportData from the dependency array won't cause issues if it changes while the component is focused.

Consider if the effect should re-run when passportData changes, or if there's a specific reason to exclude it from dependencies.


166-168: Consistent stylistic improvement.

Replacing shorthand props (bg, jc) with full property names (backgroundColor, justifyContent) improves code readability and maintains consistency with the styling approach being standardized across the codebase.

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

4-4: Clean import consolidation.

Consolidating the two imports from @selfxyz/common into a single line improves code organization while maintaining readability.


75-75: Correct dependency array fix.

Adding addProofHistory to the dependency array ensures the effect properly updates when the function reference changes, following React hooks best practices and preventing stale closures.


97-97: Proper dependency tracking for store usage.

Adding provingStore to the dependency array ensures the effect correctly responds to store changes since provingStore.init() is called within the effect.


204-204: Consistent style prop standardization.

Replacing shorthand mb with marginBottom improves code clarity and aligns with the consistent styling approach being adopted throughout the codebase.

Also applies to: 211-211

app/src/screens/settings/SettingsScreen.tsx (4)

4-4: Good consolidation of icon imports.

The consolidation of Bug and FileText imports from @tamagui/lucide-icons improves maintainability and reduces import clutter.


118-119: Excellent style prop standardization.

Converting shorthand props (py, px) to their full equivalents (paddingVertical, paddingHorizontal) significantly improves code readability and consistency. This makes the codebase more accessible to developers unfamiliar with the shorthand syntax.


135-135: Proper useCallback dependency array update.

Adding href to the dependency array ensures the callback is properly memoized and will update when the href changes. This prevents potential stale closure issues.


219-233: Consistent style prop improvements throughout the component.

The systematic replacement of shorthand style props (bg, jc, ai) with their full equivalents (backgroundColor, justifyContent, alignItems) creates a more maintainable and readable codebase. This consistency will help new team members understand the styling patterns more quickly.

Also applies to: 246-261

app/src/screens/dev/DevFeatureFlagsScreen.tsx (2)

197-197: Appropriate ESLint disable for cleanup-only effect.

The ESLint disable comment for react-hooks/exhaustive-deps is correctly applied here. This cleanup effect should only run on unmount to clear debounce timers, and including debounceTimers in the dependency array would cause the effect to run unnecessarily on every timer change.


225-229: Consistent style prop standardization across the component.

The conversion of shorthand style props to their full equivalents (backgroundColor, paddingHorizontal, paddingVertical) maintains consistency with the broader codebase changes. This improves readability and makes the styling more explicit.

Also applies to: 252-255, 271-276

app/package.json (3)

156-157: Good addition of TypeScript ESLint support.

Adding @typescript-eslint/eslint-plugin and @typescript-eslint/parser at version ^7.18.0 provides enhanced TypeScript linting capabilities. This will help catch TypeScript-specific issues and improve code quality.


161-163: Enhanced import management capabilities.

The addition of eslint-import-resolver-typescript and eslint-plugin-import will provide better import path resolution and linting for TypeScript files. This supports the enhanced ESLint configuration mentioned in the PR objectives.


160-160: Approve pinning to [email protected]

Locking to 10.1.8 is the recommended mitigation after the July 2025 supply-chain compromise (CVE-2025-54313) that affected only versions 8.10.1, 9.1.1, 10.1.6, and 10.1.7. Version 10.1.8 is the first clean release in the 10.x series and contains no known vulnerabilities, so this pin both prevents accidental upgrades into the malicious range and maintains the latest safe fixes.

app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx (2)

90-97: Comprehensive useCallback dependency array fix.

The updated dependency array now correctly includes all dependencies used within the callback:

  • navigation (used for navigation.navigate calls)
  • toggleCloudBackupEnabled (used conditionally)
  • cloudBackupEnabled (used in conditional logic)

This ensures the callback will update properly when any of these values change, preventing stale closure bugs.


107-112: Consistent style prop standardization.

The systematic replacement of shorthand style props (p, pb, pt, ai, pl) with their full equivalents (padding, paddingBottom, paddingTop, alignItems, paddingLeft) maintains consistency with the broader codebase improvements and enhances readability.

Also applies to: 117-117, 130-130, 139-139, 151-151

app/tsconfig.json (2)

7-9: Clean environment variable import alias.

The @env path alias pointing to ./env.ts provides a clean, consistent way to import environment variables throughout the application. This improves maintainability and makes environment variable usage more explicit.


11-45: Comprehensive TypeScript compilation optimization.

The addition of explicit include and exclude configurations optimizes TypeScript compilation by:

  • Focusing compilation on source files (src/**/*)
  • Excluding build artifacts, configuration files, and platform-specific directories
  • Preventing unnecessary type checking of third-party and generated files

This will improve compilation performance and reduce potential type conflicts.

app/src/screens/dev/MockDataScreenDeepLink.tsx (3)

4-8: LGTM: Clean import consolidation

The import consolidation from @selfxyz/common improves readability and maintainability by grouping related imports together.


46-85: Excellent resolution of the temporal dead zone issue

The handleGenerate function is now properly declared before the useEffect that depends on it, and the dependency array correctly includes handleGenerate. This resolves the previously reported temporal dead zone violation.


89-202: Approve style prop standardization

The conversion from shorthand Tamagui props (e.g., f, bg, pt) to their full equivalents (e.g., flex, backgroundColor, paddingTop) significantly improves code readability and maintainability. This change aligns with the broader pattern applied across the codebase.

app/src/utils/proving/provingInputs.ts (2)

5-21: Well-organized import consolidation

The expanded imports from @selfxyz/common are properly organized and include the necessary utility functions and constants for the proving logic. This consolidation improves maintainability.


80-81: Good streamlining of SMT instantiation

The immediate declaration and instantiation of nameAndDobSMT and nameAndYobSMT reduces code complexity while maintaining the same functionality. This is a clean refactoring.

app/src/screens/dev/MockDataScreen.tsx (5)

4-10: Clean import consolidation

The consolidated imports from @selfxyz/common improve code organization and maintainability.


52-124: Excellent code organization improvements

Moving the signature algorithm mapping and helper function to module scope significantly improves code readability and organization. Since this is a development screen, the module-scope constant won't impact performance in production.


156-156: Good immutability enforcement

Changing from let to const for the value variable enforces immutability where appropriate, improving code safety.


241-249: Proper dependency array organization

The reordered dependency array maintains alphabetical ordering which improves readability and reduces the likelihood of missing dependencies during code reviews.


261-595: Comprehensive style prop standardization

The systematic replacement of shorthand Tamagui props with full CSS property names throughout the component greatly improves code readability and maintainability. This change aligns perfectly with the broader codebase improvements.

app/tests/__setup__/@env.js (1)

4-12: Well-structured test environment setup

The mock environment constants are appropriately configured for testing:

  • Mock Google Sign-In client IDs prevent real authentication in tests
  • Mock Sentry DSN and Segment key avoid sending test data to production services
  • ENABLE_DEBUG_LOGS as string 'false' matches the pattern from the main environment configuration
  • Undefined values for personal data fields are appropriate for test isolation

This setup ensures tests run in a controlled environment without external dependencies.

app/.eslintrc.cjs (5)

3-8: Proper TypeScript parser configuration

The @typescript-eslint/parser with ECMAScript 2021 and JSX support is correctly configured for a React Native TypeScript project.


9-19: Comprehensive and well-ordered extends configuration

The extends array provides excellent coverage with recommended configurations for:

  • ESLint core rules
  • TypeScript-specific linting
  • React and React Hooks best practices
  • Import/export validation with TypeScript support
  • Jest testing rules
  • Prettier integration

This configuration ensures high code quality across all aspects of the React Native TypeScript project.


32-41: Essential settings for TypeScript and React

The settings configuration is excellent:

  • Automatic React version detection prevents version mismatch warnings
  • TypeScript import resolver with alwaysTryTypes ensures proper module resolution
  • Ignoring react-native imports prevents false positives from React Native's module structure

42-88: Well-balanced rule configuration

The rule configuration strikes an excellent balance between code quality and developer productivity:

Import Rules: Properly configured simple-import-sort with disabled conflicting rules
React Rules: Sensible overrides for React Native development
TypeScript Rules: Appropriate warnings for any types while allowing necessary flexibility
General Rules: Warnings instead of errors for common issues like console.log

The rules support modern React Native development practices while maintaining code quality standards.


89-107: Necessary CommonJS override configuration

The override for .cjs files is essential and properly configured:

  • Correct Node.js environment settings
  • Disabled header rule for configuration files
  • Appropriate parser options for CommonJS modules

@transphorm
Copy link
Member Author

@coderabbitai full review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 25, 2025

✅ Actions performed

Full review triggered.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🔭 Outside diff range comments (2)
app/src/screens/prove/ProveScreen.tsx (1)

85-98: Reduce dependency churn in useEffect

provingStore is the entire Zustand store state.
Every field update – even ones unrelated to init – will retrigger this effect and call provingStore.init('disclose'), which is probably not what you want.

Extract only the stable callback you need:

-const provingStore = useProvingStore();
+const initProving = useProvingStore(s => s.init);

Then:

-}, [selectedApp, isFocused, provingStore]);
+}, [selectedApp, isFocused, initProving]);

This keeps the effect deterministic and avoids unnecessary initialisations.

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

48-86: Potential race-condition on restoring flag

setRestoring(false) is executed on each early return, but there’s no finally block.
If an unexpected exception is thrown between the early returns, the flag might stay true, freezing the UI.

-const restoreAccount = useCallback(async () => {
+const restoreAccount = useCallback(async () => {
   setRestoring(true);
   try {
     ...
   } finally {
     setRestoring(false);
   }
 }, [mnemonic, navigation, restoreAccountFromMnemonic, trackEvent]);
♻️ Duplicate comments (1)
app/src/screens/dev/MockDataScreenDeepLink.tsx (1)

46-60: Excellent fix for the temporal dead zone issue.

The handleGenerate function is now properly positioned above the useEffect that depends on it and correctly wrapped in useCallback. This addresses the critical issue identified in previous reviews.

🧹 Nitpick comments (8)
app/src/components/native/RCTFragment.tsx (1)

46-46: Fix typo in error comment

There's a missing space in the comment.

-    // Error creatingthe fragment
+    // Error creating the fragment
app/src/types/png.d.ts (1)

1-4: LGTM: Standard PNG import declaration

This TypeScript declaration properly enables PNG imports without type errors. The any type is appropriate here given the variability in how bundlers handle image assets.

Consider if a more specific type could be used in the future if the bundler consistently returns a specific format (e.g., string for URLs or ImageSourcePropType for React Native):

declare module '*.png' {
-  const content: any;
+  const content: string; // or ImageSourcePropType
  export default content;
}
app/src/utils/nfcScanner.ts (1)

25-25: Consider a simpler boolean conversion approach.

While JSON.parse(String(ENABLE_DEBUG_LOGS)) works, it's unnecessarily complex. Based on the previous review feedback, a more direct approach would be clearer:

const enableDebugLogs = ENABLE_DEBUG_LOGS === true || ENABLE_DEBUG_LOGS === 'true';

This explicitly handles both boolean and string inputs without the string conversion and JSON parsing overhead, making the intent more obvious.

app/src/screens/settings/SettingsScreen.tsx (1)

118-120: Prefer tokenised spacing over magic numbers

Hard-coded pixel values (20, 10) break theming consistency and scale poorly across screen sizes. Tamagui already exposes spacing tokens ($4, $5, …). Consider:

-    paddingVertical={20}
-    paddingHorizontal={10}
+    paddingVertical="$5"
+    paddingHorizontal="$4"
app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx (1)

139-152: Minor spacing nit

paddingLeft={12} mixes raw numbers with tokenised spacing elsewhere. If possible, swap to $3 (or whichever token matches 12 px).

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

35-44: Combine selectors to avoid triple re-subscribe

Calling useProvingStore three times creates three independent subscriptions; each store update now triggers three re-renders. Grab all actions in one shot:

-  const init = useProvingStore(state => state.init);
-  const setFcmToken = useProvingStore(state => state.setFcmToken);
-  const setUserConfirmed = useProvingStore(state => state.setUserConfirmed);
+  const { init, setFcmToken, setUserConfirmed } = useProvingStore(state => ({
+    init: state.init,
+    setFcmToken: state.setFcmToken,
+    setUserConfirmed: state.setUserConfirmed,
+  }));

This keeps the component at a single subscription and avoids redundant renders.

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

97-97: Type casting workaround noted.

The as any cast for the when prop suggests a TypeScript compatibility issue with Tamagui's Adapt component. While this resolves the immediate issue, consider checking if there's a more type-safe solution in future Tamagui updates.

app/.eslintrc.cjs (1)

74-84: Consider stricter TypeScript rules for better code quality

Several TypeScript safety rules are disabled which could lead to code quality issues:

  1. @typescript-eslint/ban-ts-comment: Disabling this allows @ts-ignore comments that can hide real type issues
  2. @typescript-eslint/ban-types: This prevents use of problematic types like Object, Function, {}
  3. no-empty: Empty blocks are often mistakes or incomplete code
  4. @typescript-eslint/no-explicit-any: Consider making this an error instead of warning for better type safety

Consider enabling these rules gradually:

-    '@typescript-eslint/no-explicit-any': 'warn',
+    '@typescript-eslint/no-explicit-any': 'error',
-    '@typescript-eslint/ban-ts-comment': 'off',
+    '@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': 'allow-with-description' }],
-    'no-empty': 'off',
+    'no-empty': ['warn', { allowEmptyCatch: true }],
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f739fed and 2182524.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (68)
  • app/.eslintrc.cjs (2 hunks)
  • app/env.ts (1 hunks)
  • app/index.js (1 hunks)
  • app/package.json (1 hunks)
  • app/scripts/mobile-deploy-confirm.cjs (2 hunks)
  • app/src/components/ErrorBoundary.tsx (2 hunks)
  • app/src/components/Mnemonic.tsx (2 hunks)
  • app/src/components/NavBar/BaseNavBar.tsx (2 hunks)
  • app/src/components/native/PassportCamera.web.tsx (2 hunks)
  • app/src/components/native/RCTFragment.tsx (1 hunks)
  • app/src/hooks/useAesopRedesign.ts (1 hunks)
  • app/src/hooks/useConnectionModal.ts (1 hunks)
  • app/src/hooks/useMnemonic.ts (1 hunks)
  • app/src/layouts/ExpandableBottomLayout.tsx (1 hunks)
  • app/src/layouts/SimpleScrolledTitleLayout.tsx (3 hunks)
  • app/src/mocks/react-native-gesture-handler.ts (2 hunks)
  • app/src/mocks/react-native-safe-area-context.js (3 hunks)
  • app/src/navigation/index.tsx (2 hunks)
  • app/src/providers/authProvider.tsx (2 hunks)
  • app/src/providers/passportDataProvider.tsx (2 hunks)
  • app/src/screens/dev/DevFeatureFlagsScreen.tsx (7 hunks)
  • app/src/screens/dev/DevSettingsScreen.tsx (9 hunks)
  • app/src/screens/dev/MockDataScreen.tsx (18 hunks)
  • app/src/screens/dev/MockDataScreenDeepLink.tsx (6 hunks)
  • app/src/screens/home/DisclaimerScreen.tsx (1 hunks)
  • app/src/screens/home/HomeScreen.tsx (3 hunks)
  • app/src/screens/home/ProofHistoryDetailScreen.tsx (1 hunks)
  • app/src/screens/home/ProofHistoryScreen.tsx (2 hunks)
  • app/src/screens/misc/LaunchScreen.tsx (1 hunks)
  • app/src/screens/misc/LoadingScreen.tsx (3 hunks)
  • app/src/screens/misc/ModalScreen.tsx (1 hunks)
  • app/src/screens/misc/SplashScreen.tsx (3 hunks)
  • app/src/screens/passport/PassportCameraScreen.tsx (1 hunks)
  • app/src/screens/passport/PassportCameraTroubleScreen.tsx (2 hunks)
  • app/src/screens/passport/PassportNFCScanScreen.tsx (4 hunks)
  • app/src/screens/passport/PassportNFCScanScreen.web.tsx (1 hunks)
  • app/src/screens/passport/PassportNFCTroubleScreen.tsx (2 hunks)
  • app/src/screens/prove/ConfirmBelongingScreen.tsx (2 hunks)
  • app/src/screens/prove/ProofRequestStatusScreen.tsx (1 hunks)
  • app/src/screens/prove/ProveScreen.tsx (4 hunks)
  • app/src/screens/prove/QRCodeTroubleScreen.tsx (2 hunks)
  • app/src/screens/prove/ViewFinderScreen.tsx (1 hunks)
  • app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx (5 hunks)
  • app/src/screens/recovery/AccountRecoveryScreen.tsx (1 hunks)
  • app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx (1 hunks)
  • app/src/screens/recovery/PassportDataNotFoundScreen.tsx (3 hunks)
  • app/src/screens/recovery/RecoverWithPhraseScreen.tsx (2 hunks)
  • app/src/screens/recovery/SaveRecoveryPhraseScreen.tsx (1 hunks)
  • app/src/screens/settings/CloudBackupScreen.tsx (2 hunks)
  • app/src/screens/settings/ManageDocumentsScreen.tsx (10 hunks)
  • app/src/screens/settings/PassportDataInfoScreen.tsx (2 hunks)
  • app/src/screens/settings/SettingsScreen.tsx (6 hunks)
  • app/src/screens/settings/ShowRecoveryPhraseScreen.tsx (1 hunks)
  • app/src/stores/proofHistoryStore.ts (1 hunks)
  • app/src/stores/selfAppStore.tsx (2 hunks)
  • app/src/types/png.d.ts (1 hunks)
  • app/src/types/svg.d.ts (1 hunks)
  • app/src/utils/cloudBackup/google.ts (1 hunks)
  • app/src/utils/deeplinks.ts (2 hunks)
  • app/src/utils/nfcScanner.ts (1 hunks)
  • app/src/utils/proving/attest.ts (3 hunks)
  • app/src/utils/proving/cose.ts (1 hunks)
  • app/src/utils/proving/provingInputs.ts (2 hunks)
  • app/src/utils/proving/provingMachine.ts (2 hunks)
  • app/tests/__setup__/@env.js (1 hunks)
  • app/tests/__setup__/notificationServiceMock.js (1 hunks)
  • app/tests/__setup__/svgMock.js (1 hunks)
  • app/tsconfig.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
app/src/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit Configuration File

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

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

Files:

  • app/src/screens/misc/ModalScreen.tsx
  • app/src/mocks/react-native-gesture-handler.ts
  • app/src/screens/passport/PassportNFCScanScreen.web.tsx
  • app/src/screens/settings/ShowRecoveryPhraseScreen.tsx
  • app/src/navigation/index.tsx
  • app/src/screens/home/DisclaimerScreen.tsx
  • app/src/components/Mnemonic.tsx
  • app/src/screens/passport/PassportCameraTroubleScreen.tsx
  • app/src/components/native/PassportCamera.web.tsx
  • app/src/screens/misc/SplashScreen.tsx
  • app/src/stores/proofHistoryStore.ts
  • app/src/screens/passport/PassportCameraScreen.tsx
  • app/src/stores/selfAppStore.tsx
  • app/src/providers/passportDataProvider.tsx
  • app/src/screens/passport/PassportNFCTroubleScreen.tsx
  • app/src/screens/misc/LaunchScreen.tsx
  • app/src/components/NavBar/BaseNavBar.tsx
  • app/src/screens/home/ProofHistoryDetailScreen.tsx
  • app/src/screens/recovery/SaveRecoveryPhraseScreen.tsx
  • app/src/types/svg.d.ts
  • app/src/utils/deeplinks.ts
  • app/src/layouts/ExpandableBottomLayout.tsx
  • app/src/layouts/SimpleScrolledTitleLayout.tsx
  • app/src/mocks/react-native-safe-area-context.js
  • app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx
  • app/src/screens/settings/CloudBackupScreen.tsx
  • app/src/utils/proving/provingMachine.ts
  • app/src/screens/prove/QRCodeTroubleScreen.tsx
  • app/src/screens/home/HomeScreen.tsx
  • app/src/screens/recovery/PassportDataNotFoundScreen.tsx
  • app/src/screens/prove/ViewFinderScreen.tsx
  • app/src/screens/prove/ProofRequestStatusScreen.tsx
  • app/src/components/ErrorBoundary.tsx
  • app/src/hooks/useMnemonic.ts
  • app/src/screens/recovery/RecoverWithPhraseScreen.tsx
  • app/src/utils/nfcScanner.ts
  • app/src/screens/prove/ProveScreen.tsx
  • app/src/screens/settings/SettingsScreen.tsx
  • app/src/providers/authProvider.tsx
  • app/src/screens/misc/LoadingScreen.tsx
  • app/src/types/png.d.ts
  • app/src/screens/passport/PassportNFCScanScreen.tsx
  • app/src/components/native/RCTFragment.tsx
  • app/src/screens/settings/PassportDataInfoScreen.tsx
  • app/src/hooks/useAesopRedesign.ts
  • app/src/utils/proving/attest.ts
  • app/src/hooks/useConnectionModal.ts
  • app/src/screens/recovery/AccountRecoveryScreen.tsx
  • app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx
  • app/src/screens/dev/MockDataScreenDeepLink.tsx
  • app/src/screens/dev/DevSettingsScreen.tsx
  • app/src/utils/cloudBackup/google.ts
  • app/src/screens/dev/DevFeatureFlagsScreen.tsx
  • app/src/utils/proving/cose.ts
  • app/src/screens/dev/MockDataScreen.tsx
  • app/src/screens/settings/ManageDocumentsScreen.tsx
  • app/src/screens/home/ProofHistoryScreen.tsx
  • app/src/screens/prove/ConfirmBelongingScreen.tsx
  • app/src/utils/proving/provingInputs.ts
🧠 Learnings (16)
📓 Common learnings
Learnt from: transphorm
PR: selfxyz/self#636
File: app/ios/Podfile:14-14
Timestamp: 2025-06-30T15:27:13.795Z
Learning: React Native 0.80 supports iOS 15.1 as the minimum deployment target, not iOS 16.0. This allows for broader device compatibility while still being compatible with the React Native 0.80 upgrade.
app/src/screens/misc/ModalScreen.tsx (1)

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

app/src/screens/passport/PassportNFCScanScreen.web.tsx (1)

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

app/src/screens/passport/PassportCameraTroubleScreen.tsx (2)

Learnt from: transphorm
PR: #636
File: app/src/utils/cameraPermission.ts:19-21
Timestamp: 2025-07-12T22:00:02.041Z
Learning: The Android permission handling in app/src/utils/cameraPermission.ts is robust and properly implemented using PermissionsAndroid.request() and PermissionsAndroid.check(). Previous issues with Android permission assumptions have been resolved in the current implementation.

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

app/src/components/native/PassportCamera.web.tsx (2)

Learnt from: transphorm
PR: #636
File: app/src/utils/cameraPermission.ts:19-21
Timestamp: 2025-07-12T22:00:02.041Z
Learning: The Android permission handling in app/src/utils/cameraPermission.ts is robust and properly implemented using PermissionsAndroid.request() and PermissionsAndroid.check(). Previous issues with Android permission assumptions have been resolved in the current implementation.

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

app/src/screens/passport/PassportCameraScreen.tsx (2)

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

Learnt from: transphorm
PR: #636
File: app/src/utils/cameraPermission.ts:19-21
Timestamp: 2025-07-12T22:00:02.041Z
Learning: The Android permission handling in app/src/utils/cameraPermission.ts is robust and properly implemented using PermissionsAndroid.request() and PermissionsAndroid.check(). Previous issues with Android permission assumptions have been resolved in the current implementation.

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

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

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

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

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

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

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

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

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

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

app/src/utils/nfcScanner.ts (1)

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

app/src/screens/passport/PassportNFCScanScreen.tsx (1)

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

app/src/screens/settings/PassportDataInfoScreen.tsx (1)

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

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

Learnt from: transphorm
PR: #636
File: app/src/components/native/QRCodeScanner.tsx:135-142
Timestamp: 2025-07-16T02:20:44.173Z
Learning: In app/src/components/native/QRCodeScanner.tsx, the Android camera dimension multipliers (screenWidth * 3 and screenHeight * 2) are intentionally set to these values and should not be changed. These multipliers are correct and any visual issues with black areas in the camera preview are caused by other factors, not the dimension calculations.

app/src/utils/cloudBackup/google.ts (1)

Learnt from: transphorm
PR: #636
File: app/src/utils/cameraPermission.ts:19-21
Timestamp: 2025-07-12T22:00:02.041Z
Learning: The Android permission handling in app/src/utils/cameraPermission.ts is robust and properly implemented using PermissionsAndroid.request() and PermissionsAndroid.check(). Previous issues with Android permission assumptions have been resolved in the current implementation.

🧬 Code Graph Analysis (25)
app/src/screens/misc/ModalScreen.tsx (1)
app/src/utils/colors.ts (1)
  • white (7-7)
app/env.ts (1)
app/tests/__setup__/@env.js (2)
  • GOOGLE_SIGNIN_ANDROID_CLIENT_ID (4-4)
  • GOOGLE_SIGNIN_ANDROID_CLIENT_ID (4-4)
app/src/screens/passport/PassportCameraScreen.tsx (1)
app/src/components/typography/Title.tsx (1)
  • Title (8-27)
app/src/screens/misc/LaunchScreen.tsx (1)
app/src/utils/colors.ts (1)
  • black (6-6)
app/src/layouts/SimpleScrolledTitleLayout.tsx (1)
app/src/components/buttons/SecondaryButton.tsx (1)
  • SecondaryButton (8-23)
app/src/screens/home/HomeScreen.tsx (3)
app/src/utils/colors.ts (2)
  • black (6-6)
  • amber500 (5-5)
app/src/utils/constants.ts (1)
  • extraYPadding (3-3)
app/src/components/typography/Caption.tsx (1)
  • Caption (8-21)
app/src/screens/recovery/PassportDataNotFoundScreen.tsx (1)
app/src/utils/colors.ts (1)
  • slate200 (10-10)
app/src/screens/prove/ViewFinderScreen.tsx (1)
app/src/components/typography/Title.tsx (1)
  • Title (8-27)
app/src/screens/prove/ProofRequestStatusScreen.tsx (2)
app/src/stores/database.ts (1)
  • updateProofStatus (143-156)
app/src/stores/database.web.ts (1)
  • updateProofStatus (218-253)
app/src/utils/nfcScanner.ts (2)
app/env.ts (1)
  • ENABLE_DEBUG_LOGS (14-14)
app/tests/__setup__/@env.js (2)
  • ENABLE_DEBUG_LOGS (8-8)
  • ENABLE_DEBUG_LOGS (8-8)
app/src/screens/prove/ProveScreen.tsx (2)
app/src/components/typography/BodyText.ts (1)
  • BodyText (7-9)
app/src/utils/colors.ts (1)
  • slate300 (11-11)
app/src/screens/settings/SettingsScreen.tsx (2)
app/src/utils/colors.ts (1)
  • black (6-6)
app/src/utils/constants.ts (1)
  • extraYPadding (3-3)
app/src/screens/misc/LoadingScreen.tsx (2)
app/src/utils/proving/provingMachine.ts (1)
  • ProvingStateType (134-156)
app/src/utils/colors.ts (1)
  • black (6-6)
app/src/screens/settings/PassportDataInfoScreen.tsx (2)
app/src/utils/constants.ts (1)
  • extraYPadding (3-3)
app/src/utils/colors.ts (1)
  • white (7-7)
app/src/hooks/useAesopRedesign.ts (2)
app/env.ts (1)
  • IS_TEST_BUILD (7-7)
app/tests/__setup__/@env.js (2)
  • IS_TEST_BUILD (3-3)
  • IS_TEST_BUILD (3-3)
app/src/utils/proving/attest.ts (1)
app/src/utils/proving/provingUtils.ts (1)
  • ec (13-13)
app/src/screens/recovery/AccountRecoveryScreen.tsx (3)
app/src/utils/colors.ts (2)
  • slate600 (14-14)
  • white (7-7)
app/src/layouts/ExpandableBottomLayout.tsx (1)
  • ExpandableBottomLayout (158-163)
app/src/components/typography/Title.tsx (1)
  • Title (8-27)
app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx (2)
app/src/utils/colors.ts (2)
  • slate600 (14-14)
  • white (7-7)
app/src/layouts/ExpandableBottomLayout.tsx (1)
  • ExpandableBottomLayout (158-163)
app/src/screens/dev/DevSettingsScreen.tsx (1)
app/src/utils/colors.ts (1)
  • textBlack (39-39)
app/src/utils/cloudBackup/google.ts (2)
app/env.ts (1)
  • GOOGLE_SIGNIN_ANDROID_CLIENT_ID (8-9)
app/tests/__setup__/@env.js (2)
  • GOOGLE_SIGNIN_ANDROID_CLIENT_ID (4-4)
  • GOOGLE_SIGNIN_ANDROID_CLIENT_ID (4-4)
app/tests/__setup__/@env.js (1)
app/env.ts (9)
  • GOOGLE_SIGNIN_ANDROID_CLIENT_ID (8-9)
  • GOOGLE_SIGNIN_WEB_CLIENT_ID (10-11)
  • SENTRY_DSN (12-12)
  • SEGMENT_KEY (13-13)
  • ENABLE_DEBUG_LOGS (14-14)
  • DEFAULT_PNUMBER (15-15)
  • DEFAULT_DOB (16-16)
  • DEFAULT_DOE (17-17)
  • MIXPANEL_NFC_PROJECT_TOKEN (18-18)
app/src/screens/dev/MockDataScreen.tsx (8)
common/src/utils/passports/genMockIdDoc.ts (1)
  • genMockIdDoc (47-77)
app/src/utils/colors.ts (4)
  • white (7-7)
  • borderColor (38-38)
  • textBlack (39-39)
  • separatorColor (40-40)
app/src/utils/constants.ts (1)
  • extraYPadding (3-3)
app/src/mocks/react-native-gesture-handler.ts (1)
  • GestureDetector (43-48)
app/src/components/typography/Title.tsx (1)
  • Title (8-27)
app/src/components/typography/BodyText.ts (1)
  • BodyText (7-9)
app/src/utils/haptic/index.ts (2)
  • buttonTap (19-19)
  • selectionChange (18-18)
app/src/consts/analytics.ts (1)
  • MockDataEvents (138-150)
app/src/screens/settings/ManageDocumentsScreen.tsx (3)
app/src/providers/passportDataProvider.tsx (2)
  • loadDocumentCatalog (104-118)
  • getAllDocuments (235-251)
app/src/utils/colors.ts (3)
  • textBlack (39-39)
  • borderColor (38-38)
  • white (7-7)
app/src/utils/constants.ts (1)
  • extraYPadding (3-3)
app/src/screens/home/ProofHistoryScreen.tsx (2)
app/src/utils/colors.ts (1)
  • slate50 (8-8)
app/src/utils/constants.ts (1)
  • extraYPadding (3-3)
app/src/screens/prove/ConfirmBelongingScreen.tsx (3)
app/src/utils/proving/provingMachine.ts (1)
  • useProvingStore (198-1012)
app/src/utils/haptic/index.ts (1)
  • notificationSuccess (16-16)
app/src/consts/analytics.ts (1)
  • ProofEvents (55-111)
🔇 Additional comments (113)
app/src/components/native/RCTFragment.tsx (1)

4-9: LGTM: Import consolidation improves readability

The consolidation of React Native imports into a single grouped statement enhances code organization and aligns with the updated ESLint configuration.

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

3-3: LGTM: Modern React import pattern adopted

The change from default React import to explicit named imports improves code clarity and aligns with modern React and TypeScript best practices.

Also applies to: 18-18

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

42-42: LGTM: Improved immutability with const

Changing from let to const is a good practice since the variable is never reassigned, making the code more predictable.


72-72: LGTM: Fixed incomplete dependency array

Excellent fix! The previous dependency array was missing color and onPress, which could have caused stale closures and incorrect memoization behavior. The expanded array ensures the memoized component updates correctly when any of these props change.

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

66-66: LGTM: Fixed incomplete dependency array

Great fix! The previous dependency array was missing onRevealWords and setHasViewedRecoveryPhrase, which could have caused stale closures and incorrect callback behavior. The expanded array ensures proper reactivity.


101-101: Verify $2 theme token equals 16px

I wasn’t able to find a local theme or spacing scale in the repo—please confirm that token $2 indeed corresponds to 16px so we don’t introduce unintended layout shifts.

Next steps:

  • Locate your theme definition (e.g. theme.ts/theme.js, tailwind.config.js or design-system package).
  • Check the space or spacing scale and ensure that the entry at index 2 (the $2 token) is set to 16px.

Relevant change:

- <Box py="$2" …/>
+ <Box paddingVertical={16} …/>
app/src/layouts/ExpandableBottomLayout.tsx (1)

107-107: Change Approved: No pb prop usage detected

Ran targeted searches for any <ExpandableBottomLayout pb= and <BottomSection pb= across all .ts/.tsx files—zero occurrences found. Removing the shorthand fallback is safe and keeps our explicit-style conventions consistent.

app/src/mocks/react-native-safe-area-context.js (2)

3-3: Good modernization of React imports

The shift from default React import to explicit named imports (createContext, createElement, Fragment) aligns with modern React patterns and ESLint best practices. This improves tree-shaking and makes dependencies more explicit.


7-7: Consistent application of named imports throughout

All React API usages have been properly updated to use the directly imported functions instead of accessing them via the React namespace. The mock functionality remains identical while following modern conventions.

Also applies to: 19-19, 37-37, 39-44

app/src/utils/proving/cose.ts (1)

22-22: Export pattern simplification looks good

Converting from both named and default export to only default export (export default cose;) simplifies the module's API and maintains consistency. The functionality remains accessible to consumers while following a cleaner export pattern.

app/scripts/mobile-deploy-confirm.cjs (2)

282-286: Function signature correctly simplified

Removing the unused versions parameter from displayDeploymentHeader is a good cleanup. The function only uses platform internally, making this change more accurate and reducing parameter noise.


353-353: Function call properly updated

The call to displayDeploymentHeader correctly reflects the simplified signature by passing only the required platform parameter. The versions data is still appropriately used by displayPlatformVersions called on the next line.

app/src/layouts/SimpleScrolledTitleLayout.tsx (3)

3-3: Import modernization aligns with best practices

Explicitly importing PropsWithChildren instead of accessing it via React.PropsWithChildren improves import clarity and follows modern React conventions.


14-14: Interface properly updated for direct PropsWithChildren usage

The interface correctly extends the directly imported PropsWithChildren type, maintaining the same functionality while following the updated import pattern.


47-47: Confirm correct spacing value
It looks like you replaced the design token mb="$2" (which is typically 8px) with an explicit marginBottom={16}. Please double-check that this 16px value matches the intended spacing (i.e. that you didn’t accidentally double the gap).
• Verify what pixel value $2 maps to in your spacing scale.
• If you need a 16px gap, consider using the corresponding token (e.g. $4) for consistency.

app/src/hooks/useConnectionModal.ts (1)

59-59: Excellent fix for React hooks exhaustive dependencies

The updated dependency array properly includes all state and functions used within the effect (dismissModal, hasNoConnection, hideNetworkModal, showModal, visible) while correctly excluding navigationRef.isReady() which is called conditionally inside the effect. This prevents unnecessary re-renders and follows React hooks best practices.

app/src/screens/passport/PassportNFCScanScreen.web.tsx (1)

36-37: LGTM! Style prop standardization improves code clarity.

The change from shorthand props (h, w) to explicit props (height, width) enhances readability and aligns with the ESLint configuration updates. This standardization makes the codebase more consistent and easier to understand for developers.

app/index.js (1)

7-7: Excellent placement of gesture handler import.

Moving the react-native-gesture-handler import to the app entry point is the correct approach. This ensures proper initialization of native gesture handling before any components are rendered, which is a requirement for the library to function correctly.

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

39-39: Style prop standardization maintains consistency.

The change from bg={black} to backgroundColor={black} follows the established pattern in this PR of using explicit style property names. This improves code consistency and readability while maintaining identical functionality.

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

100-105: Consistent style prop naming enhances maintainability.

The standardization of mx={8} to marginHorizontal={8} continues the pattern of using explicit style property names throughout the codebase. This change improves code readability and consistency without affecting functionality.

app/src/screens/settings/ShowRecoveryPhraseScreen.tsx (1)

17-19: Critical dependency array fix enhances callback reliability.

Adding loadMnemonic to the useCallback dependency array is essential for proper React hooks behavior. The previous empty dependency array could result in stale closures, which is particularly problematic in security-sensitive contexts like recovery phrase handling. This fix ensures the callback always references the current loadMnemonic function.

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

38-38: LGTM! Style prop standardization improves readability.

The conversion from Tamagui shorthand props (f, jc, pb) to explicit CSS-style properties (flex, justifyContent, paddingBottom) enhances code clarity and maintainability. This aligns with React Native best practices for self-documenting component props.

app/src/stores/proofHistoryStore.ts (1)

170-170: LGTM! Improved immutability with const declaration.

Converting totalCount from let to const correctly enforces immutability since the variable is never reassigned after initialization. This follows TypeScript best practices and prevents potential bugs from accidental mutations.

app/src/screens/passport/PassportCameraTroubleScreen.tsx (2)

3-3: LGTM! Modernized React import pattern.

Explicitly importing useEffect alongside React follows modern React development patterns and improves code clarity. This standardization across the codebase enhances maintainability.


51-51: LGTM! Direct hook usage is cleaner.

Using useEffect directly instead of React.useEffect is more readable and consistent with the explicit import pattern. The analytics flush logic remains properly implemented.

app/src/navigation/index.tsx (2)

9-9: LGTM! Consistent React import modernization.

The explicit import of useEffect aligns with the standardization effort across the codebase and follows modern React development patterns for better code clarity.


76-76: LGTM! Direct useEffect usage is cleaner.

Using useEffect directly instead of through the React namespace improves readability and maintains consistency with the explicit import pattern. The universal link setup logic remains properly implemented.

app/src/screens/prove/QRCodeTroubleScreen.tsx (2)

3-3: LGTM! Final consistent React import modernization.

The explicit useEffect import completes the standardization pattern across the codebase, following modern React development practices for improved clarity and bundling efficiency.


48-48: LGTM! Direct hook usage maintains consistency.

Using useEffect directly is cleaner and consistent with the modernized import pattern. The analytics flush functionality on component mount remains properly implemented.

app/src/stores/selfAppStore.tsx (2)

5-5: LGTM: Import standardization aligns with ESLint updates.

The renaming from io to socketIo improves code clarity and consistency across the codebase.


35-43: No further sanitization needed for WS_DB_RELAYER

WS_DB_RELAYER is a static, hard-coded constant imported from common/src/constants/constants.ts and isn’t influenced by user input. Your WebSocket setup already enforces:

  • wss protocol via startsWith('https')wss
  • transports: ['websocket']
  • fixed path: '/'

Locations verified:
common/src/constants/constants.ts
app/src/stores/selfAppStore.tsx
app/src/stores/proofHistoryStore.ts

Everything looks secure—no additional sanitization required.

app/src/mocks/react-native-gesture-handler.ts (1)

7-7: LGTM: Explicit import improves tree-shaking and aligns with ESLint rules.

The explicit import of createElement is a good practice that can improve bundle size through better tree-shaking and aligns with modern React/ESLint conventions.

Also applies to: 14-14, 47-47

app/env.ts (1)

8-9: Approved: Google Sign-In Android Client ID Configuration

The GOOGLE_SIGNIN_ANDROID_CLIENT_ID export follows the existing pattern and is now referenced in app/src/utils/cloudBackup/google.ts with proper runtime checks and error handling:

  • Throws an error if the variable is missing in non-test environments
  • Uses a mock fallback only in tests
  • Sample and test files have been updated accordingly

• Ensure your staging and production deployments include this environment variable.
• Verify your CI/CD and secret management systems inject GOOGLE_SIGNIN_ANDROID_CLIENT_ID as needed.

Great work keeping consistency and guarding against missing values!

app/src/screens/passport/PassportCameraScreen.tsx (1)

135-135: LGTM: Style prop standardization improves code clarity.

Converting shorthand props (pb, pt) to explicit forms (paddingBottom, paddingTop) enhances readability and aligns with the ESLint configuration updates. This standardization makes the codebase more maintainable.

Also applies to: 138-138

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

92-92: Excellent fix: Dependency array now includes all referenced values.

Adding data.appName to the dependency array is crucial since the useMemo computation references data.appName multiple times (lines 59, 65, 68, etc.). This prevents stale closures and ensures the memoized value updates correctly when the app name changes.

app/src/screens/prove/ViewFinderScreen.tsx (2)

141-141: LGTM: Style prop standardization improves consistency.

The expansion from shorthand to explicit paddingBottom aligns with the codebase-wide effort to standardize style property naming for better readability.


144-144: LGTM: Consistent style prop naming.

The explicit paddingTop property name enhances code clarity and maintains consistency with the standardization effort across the codebase.

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

30-30: LGTM: Correct dependency array fixes potential stale closure issue.

Adding loadMnemonic to the dependency array is essential since the callback invokes this function. This prevents potential bugs from stale closures and satisfies React hooks ESLint rules.

app/src/screens/passport/PassportNFCTroubleScreen.tsx (2)

3-3: LGTM: Modern React hook import pattern.

Explicitly importing useEffect instead of accessing it via the React namespace follows modern React practices and improves code clarity.


50-50: LGTM: Consistent hook usage pattern.

Using useEffect directly matches the explicit import and maintains consistency with modern React patterns.

app/src/screens/settings/CloudBackupScreen.tsx (2)

113-113: LGTM: Consistent style prop standardization.

The explicit paddingBottom property name enhances readability and aligns with the codebase-wide standardization effort.


137-137: LGTM: Style property standardization improves clarity.

Using explicit paddingTop instead of shorthand maintains consistency with the modernization effort across the codebase.

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

35-40: LGTM: Comprehensive style prop standardization enhances readability.

Excellent work replacing all shorthand style props (pt, px, pb, jc, ai, mb) with their explicit equivalents. This significantly improves code clarity and maintains consistency with the broader modernization effort across the codebase.

app/src/components/native/PassportCamera.web.tsx (1)

3-3: LGTM: Consistent hook import pattern

The explicit import of useEffect and its direct usage aligns with modern React patterns and improves code consistency across the codebase.

Also applies to: 30-30

app/src/screens/recovery/PassportDataNotFoundScreen.tsx (2)

3-3: LGTM: Modern React hook import pattern

The explicit import and direct usage of useEffect follows current React best practices and improves code consistency.

Also applies to: 19-19


29-33: LGTM: Improved style prop clarity

The change from shorthand mt={8} to explicit marginTop={8} with multi-line formatting enhances code readability and aligns with the codebase standardization effort.

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

29-34: LGTM: Consistent style prop naming

The conversion from shorthand style props (p, pb, pt) to explicit names (padding, paddingBottom, paddingTop) improves code clarity and aligns with the codebase standardization effort. The styling behavior remains unchanged.

Also applies to: 39-39, 46-46

app/src/hooks/useMnemonic.ts (1)

19-19: LGTM! Proper dependency array management.

Adding getOrCreateMnemonic to the dependency array is correct since the callback uses this function internally. This follows React hooks best practices and prevents stale closures.

app/src/types/svg.d.ts (1)

1-6: Excellent TypeScript enhancement for SVG support.

This declaration properly types SVG imports as React functional components with SvgProps, enabling type safety and better developer experience. The implementation follows standard patterns for React Native SVG handling.

app/src/utils/proving/attest.ts (3)

8-8: Good refactoring to named imports.

Changing from default import to named import with alias { ec as ellipticEc } improves code clarity and follows modern JavaScript best practices. The alias makes it explicit that we're using the elliptic curve functionality.


292-292: Consistent usage update.

The usage correctly reflects the new import pattern. The functionality remains unchanged while improving code clarity.


340-340: Consistent usage update.

The usage correctly reflects the new import pattern, maintaining consistency across both functions that use the elliptic curve functionality.

app/src/providers/passportDataProvider.tsx (2)

41-48: Excellent import consolidation.

Consolidating the imports from @selfxyz/common into a single statement improves readability and follows best practices. The new imports (brutforceSignatureAlgorithmDsc, parseCertificateSimple, PassportData) are properly utilized in the existing functions.


59-59: Good import consolidation.

Combining the imports from authProvider into a single statement improves code organization and reduces clutter while maintaining all necessary functionality.

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

92-100: Critical fix for useEffect dependencies.

Excellent work expanding the dependency array to include all variables used within the effect (appName, sessionId, errorCode, reason, updateProofStatus). This prevents stale closures and ensures the effect properly responds to changes in proof status, error states, and database operations.

This is particularly important for updateProofStatus since it performs async database operations that need to track the latest session state.

app/tests/__setup__/svgMock.js (1)

3-5: LGTM! Clean refactoring to named imports.

The change from default React import to named createElement import improves code clarity and aligns with modern React patterns. The functionality remains identical while making dependencies more explicit.

app/src/utils/proving/provingMachine.ts (1)

12-12: LGTM! More descriptive import naming.

The rename from io to socketIo improves code readability and makes the Socket.IO dependency more explicit.

app/src/utils/cloudBackup/google.ts (2)

11-19: Excellent environment variable validation!

The runtime check for GOOGLE_SIGNIN_ANDROID_CLIENT_ID with proper test environment detection is a robust approach that prevents silent failures in production while maintaining test functionality. The dual check for both NODE_ENV === 'test' and JEST_WORKER_ID ensures comprehensive test environment detection.


24-24: Good fallback strategy for tests.

The fallback to 'mock-client-id' when the environment variable is missing ensures tests can run without configuration while the runtime check above prevents production issues.

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

301-301: Good fix for hook dependencies!

Adding navigation to the dependency array is correct since the renderItem callback uses navigation.navigate(). This prevents potential stale closure issues and follows React Hook best practices.


373-377: Improved style prop consistency.

The change from shorthand props (bg, pb) to explicit names (backgroundColor, paddingBottom) enhances code readability and aligns with React Native conventions. This is part of a broader consistency improvement across the codebase.

app/src/screens/misc/SplashScreen.tsx (4)

6-6: Clean import modernization.

Adding useState to the named imports and removing React.useState usage improves code clarity and follows modern React patterns.


15-15: Good import organization.

Grouping storePassportData with other imports from passportDataProvider improves code organization and readability.


27-28: Consistent state management.

The switch from React.useState to direct useState calls maintains consistency with the import changes and improves readability.


110-110: Critical dependency array fix!

Adding checkBiometricsAvailable and setBiometricsAvailable to the dependency array is essential since the effect uses these functions. This prevents potential stale closure bugs and ensures the effect behaves correctly if these functions change.

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

8-8: LGTM! Excellent code standardization improvements.

The changes demonstrate good React Native practices:

  • Explicit useCallback import reduces bundle size compared to namespace imports
  • Style prop normalization (bgbackgroundColor, jcjustifyContent, aialignItems) improves code readability and consistency
  • Direct useCallback usage is more idiomatic than React.useCallback

These changes maintain functionality while improving code quality and consistency across the codebase.

Also applies to: 56-56, 78-78, 80-80, 85-85, 92-92

app/tests/__setup__/notificationServiceMock.js (1)

6-8: Good cleanup of unused mock parameter.

Removing the unused state parameter simplifies the mock function signature while maintaining the expected return behavior. This eliminates potential ESLint warnings and makes the mock's purpose clearer.

app/src/screens/misc/LoadingScreen.tsx (3)

29-37: Excellent performance optimization by moving terminalStates to module level.

Moving the terminalStates array outside the component prevents unnecessary recreation on each render. The proper TypeScript typing with ProvingStateType[] maintains type safety while improving performance.


102-103: Appropriate ESLint disable for intentional dependency exclusion.

The ESLint disable is justified here since the effect is specifically designed to only respond to isFocused changes, not passportData changes. The comment clearly explains the intention.


166-166: Consistent style prop normalization.

The changes from bg to backgroundColor and jc to justifyContent align with the broader codebase standardization effort, improving readability and consistency.

Also applies to: 168-168

app/src/hooks/useAesopRedesign.ts (1)

6-6: Robust environment variable handling with proper fallback.

The implementation correctly handles type inconsistencies between runtime (boolean from app/env.ts) and test environments (string from test setup). The String() conversion ensures consistent input to JSON.parse, while the nullish coalescing operator (??) provides a sensible fallback for undefined values.

This approach is more robust than a simple boolean check since it handles all possible input types gracefully.

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

204-212: 👍 Explicit style props look good

Replacing the shorthand mb with marginBottom on both Image and BodyText improves readability and aligns with the new lint rule set.

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

85-94: UI prop renaming approved

Migrating from pb to paddingBottom (and other explicit props) is consistent with the new ESLint / Prettier rules. No functional impact detected.

app/package.json (1)

156-164: Ensure editor tooling picks up the TypeScript resolver

You added eslint-import-resolver-typescript, but it only becomes active when settings["import/resolver"] is configured. Verify .eslintrc.cjs declares:

settings: {
  'import/resolver': {
    typescript: {}
  }
}

Without this, the plugin is installed but unused.

app/src/screens/passport/PassportNFCScanScreen.tsx (3)

262-272: Dependency array now complete – good catch

Adding route.params, navigation, and openErrorModal removes hidden stale-closure bugs in onVerifyPress.


330-332: Token-based dimensions may bypass accessibility checks

height="$8" / width="$8" rely on Tamagui tokens; ensure $8 maps to a pixel value ≥ 44 px (Apple HIG minimum touch target).
If not, consider bumping to $10 or explicit height={48} / width={48}.


360-372: 👍 Style-prop expansion looks correct

Explicit marginTop / marginBottom props improve clarity and satisfy the lint rule.

app/src/providers/authProvider.tsx (2)

223-224: Including authenticationTimeoutinMs in deps is necessary

The callback will now refresh if the timeout changes – solid improvement.


239-255: Memo dependency list now exhaustive

Adding getOrCreateMnemonic and restoreAccountFromMnemonic prevents stale references inside the context value.

app/src/screens/settings/PassportDataInfoScreen.tsx (1)

50-58: Explicit style props improve clarity – looks good

Replacing the former shorthand (py, jc, etc.) with paddingVertical, justifyContent, and friends removes ambiguity and matches the new ESLint preset. Implementation is correct and token-based values remain unchanged, so nothing further to do here.

Also applies to: 90-98

app/src/screens/settings/SettingsScreen.tsx (3)

131-136: Good call adding href to the dependency array

The callback really depends on href; this fixes a subtle stale-closure bug.


219-233: Style-prop renames are correct

backgroundColor, justifyContent, alignItems, and width now align with RN props and lint rules. No functional impact.


259-261: Consistency win on button layout

Using justifyContent="center" / alignItems="center" is clearer than the earlier abbreviations—nice tidy-up.

app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx (2)

90-97: Dependency list now complete – avoids stale values

Adding cloudBackupEnabled, navigation, and toggleCloudBackupEnabled ensures the callback reflects the latest state and avoids surprises after enabling backup.


107-113: Border & padding tokens match palette – looks fine

Switching from shorthand to verbose style props keeps design tokens intact; no issues.

app/src/screens/dev/DevFeatureFlagsScreen.tsx (4)

197-199: Reasonable ESLint suppression

Documenting why exhaustive-deps is disabled makes intent explicit and keeps lint noise down.


218-229: Background tokens are correct – UI behaviour unchanged

Renaming bg / bc to backgroundColor keeps semantics identical. Implementation is fine.


235-255: Input styling consistent with rest of form

Verbose padding / background props mirror surrounding elements – looks good.


270-378: Bulk prop renames OK – but check bundle size

Hundreds of terse-prop removals slightly bloat JSX. This is the trade-off for rule compliance; nothing actionable, just awareness.

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

55-63: Action calls updated – matches new selectors

The refactor correctly updates method usage; functional behaviour preserved.

app/src/screens/dev/MockDataScreenDeepLink.tsx (3)

4-8: LGTM: Clean import consolidation.

Consolidating the imports from @selfxyz/common into a single grouped import improves code organization and readability.


79-85: Proper dependency array management.

Correctly includes handleGenerate in the dependency array alongside the other deep link parameters, ensuring the effect runs when any dependency changes.


89-187: Good standardization of style props.

The systematic replacement of shorthand style props (e.g., fflex, bgbackgroundColor, aialignItems) with their full property names improves code readability and consistency. This aligns with the broader standardization effort across the codebase.

app/tsconfig.json (2)

7-9: Good addition of environment path alias.

The @env path alias provides a clean way to import environment variables throughout the application, improving code maintainability and avoiding complex relative imports.


11-45: Excellent TypeScript configuration refinement.

The explicit include array focusing on src/**/* and comprehensive exclude patterns provide better control over compilation scope. This should improve build performance by clearly defining what TypeScript should process.

app/src/screens/dev/DevSettingsScreen.tsx (3)

116-129: Verify the dependency array optimization.

Changing the useMemo dependency array to [] means the memoization will only run once. While the items array is currently a stable constant, this optimization could break if items ever becomes dynamic in the future.

Consider being explicit about the reasoning:

-              [],
+              [], // items is a stable constant, so no dependencies needed

9-9: Good React import modernization.

Importing useMemo directly follows modern React practices and is cleaner than using React.useMemo.


214-357: Consistent style prop standardization.

The replacement of shorthand style props with full property names (e.g., ppadding, bgbackgroundColor) maintains consistency with the broader codebase standardization effort and improves readability.

app/src/screens/settings/ManageDocumentsScreen.tsx (3)

37-59: Excellent React performance optimization.

Converting loadPassportDataInfo to useCallback with proper dependencies is a good optimization. The dependency array correctly includes all used functions, though the state setters (setDocumentCatalog, setAllDocuments) are stable by React's guarantee and could be omitted, but including them is good for explicitness.


5-5: Good React hook import addition.

Adding useCallback to the React imports enables cleaner hook usage following modern React practices.


142-313: Consistent style prop standardization.

The systematic replacement of shorthand style props with full property names (e.g., aialignItems, jcjustifyContent) continues the codebase-wide consistency improvement effort and enhances code readability.

app/src/screens/dev/MockDataScreen.tsx (6)

4-10: LGTM: Clean import consolidation.

Consolidating imports from @selfxyz/common into a single grouped import statement improves code organization and follows best practices.


52-124: Excellent code organization improvement.

Moving signatureAlgorithmToStrictSignatureAlgorithm and castDateToYYMMDDForExpiry to module scope prevents unnecessary redefinition on each render and improves code organization. The const assertion also enhances type safety.


156-156: Good immutability improvement.

Changing from let to const for the value variable is appropriate since it's not reassigned after initialization.


241-249: Proper dependency array management.

The useCallback dependency array correctly includes selectedAlgorithm and selectedCountry, ensuring the callback updates when these values change.


231-233: Correct function usage.

The calls to genMockIdDoc and initPassportDataParsing are properly using the imported functions with appropriate variable declarations.


261-595: Comprehensive style prop standardization.

The extensive replacement of shorthand style props with full property names (e.g., fflex, bgbackgroundColor, aialignItems) significantly improves code readability and maintains consistency with the broader codebase standardization effort. While extensive, these changes enhance maintainability without affecting functionality.

app/tests/__setup__/@env.js (1)

4-7: Test environment mocks look good

The mock values for Google Sign-In, Sentry, and Segment are appropriate for the test environment. The undefined values for personal data fields and Mixpanel token correctly match the production defaults.

Also applies to: 9-12

app/src/utils/proving/provingInputs.ts (2)

5-21: Import consolidation improves clarity

Good consolidation of imports from @selfxyz/common. This groups related imports together and makes the dependencies more explicit.


80-81: Cleaner SMT instantiation pattern

The immediate instantiation of nameAndDobSMT and nameAndYobSMT is more concise and follows better JavaScript/TypeScript patterns. This eliminates the unnecessary separation between declaration and initialization.

app/.eslintrc.cjs (3)

3-8: TypeScript parser configuration looks solid

The parser configuration properly sets up TypeScript parsing with ECMAScript 2021 features and JSX support. This is the correct setup for a React Native TypeScript project.


32-47: Import configuration is well-structured

The TypeScript import resolver and simple-import-sort setup provides good import management. Ignoring react-native in import resolution is appropriate since it's a built-in module in React Native projects.


18-18: Prettier integration configured correctly

The Prettier plugin is properly integrated through the extends array and the prettier rule is configured to use the project's .prettierrc file. Note that the PR objectives mention pinning eslint-config-prettier to version 10.1.8 for security reasons - ensure this is reflected in package.json.

Also applies to: 58-58

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
app/src/utils/deeplinks.ts (1)

66-87: Excellent implementation addressing the security concerns

This implementation successfully addresses the past review comment about input sanitization. The whitelisting approach ensures only expected parameters are processed, and the validation/sanitization is applied individually to each parameter.

🧹 Nitpick comments (2)
app/src/utils/deeplinks.ts (1)

114-121: Consider extracting the inline type definition

The MockDataDeepLinkRawParams type is defined inline within the function. Consider moving it to a shared types file for better reusability and maintainability.

app/tests/utils/deeplinks.test.ts (1)

243-252: Improve the duplicate key test assertion

The test for duplicate keys has an uncertain assertion that accepts either undefined or string. Consider testing the actual behavior more precisely by checking what query-string actually returns for duplicate keys.

-      // We'll accept either a valid sessionId or empty object if it creates an array
-      expect(
-        result.sessionId === undefined || typeof result.sessionId === 'string',
-      ).toBe(true);
+      // query-string v7+ returns the last value for duplicate keys
+      expect(result).toEqual({ sessionId: 'valid2' });
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a126261 and ea7454d.

📒 Files selected for processing (4)
  • app/src/screens/prove/ViewFinderScreen.tsx (3 hunks)
  • app/src/utils/deeplinks.ts (1 hunks)
  • app/src/utils/proving/provingMachine.ts (3 hunks)
  • app/tests/utils/deeplinks.test.ts (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/src/screens/prove/ViewFinderScreen.tsx
  • app/src/utils/proving/provingMachine.ts
🧰 Additional context used
📓 Path-based instructions (2)
app/src/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit Configuration File

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

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

Files:

  • app/src/utils/deeplinks.ts
**/*.{test,spec}.{ts,js,tsx,jsx}

⚙️ CodeRabbit Configuration File

**/*.{test,spec}.{ts,js,tsx,jsx}: Review test files for:

  • Test coverage completeness
  • Test case quality and edge cases
  • Mock usage appropriateness
  • Test readability and maintainability

Files:

  • app/tests/utils/deeplinks.test.ts
🧠 Learnings (2)
📓 Common learnings
Learnt from: transphorm
PR: selfxyz/self#636
File: app/ios/Podfile:14-14
Timestamp: 2025-06-30T15:27:13.795Z
Learning: React Native 0.80 supports iOS 15.1 as the minimum deployment target, not iOS 16.0. This allows for broader device compatibility while still being compatible with the React Native 0.80 upgrade.
app/src/utils/deeplinks.ts (1)

Learnt from: transphorm
PR: #636
File: app/src/utils/cameraPermission.ts:19-21
Timestamp: 2025-07-12T22:00:02.041Z
Learning: The Android permission handling in app/src/utils/cameraPermission.ts is robust and properly implemented using PermissionsAndroid.request() and PermissionsAndroid.check(). Previous issues with Android permission assumptions have been resolved in the current implementation.

🧬 Code Graph Analysis (1)
app/tests/utils/deeplinks.test.ts (2)
app/src/utils/deeplinks.ts (2)
  • parseAndValidateUrlParams (66-87)
  • handleUrl (89-147)
app/src/navigation/index.tsx (1)
  • navigationRef (59-59)
⏰ 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: build
🔇 Additional comments (2)
app/src/utils/deeplinks.ts (1)

29-59: Well-implemented parameter validation with proper error handling

The function correctly handles URL decoding errors and validates parameters against their respective patterns. The dev-only logging approach is appropriate.

app/tests/utils/deeplinks.test.ts (1)

52-142: Comprehensive test coverage for handleUrl with excellent security testing

The test suite properly covers all parameter types, error scenarios, and includes important security tests like XSS attempts. The console spy management is handled correctly.

@transphorm transphorm merged commit bf3ef98 into dev Jul 25, 2025
10 checks passed
@transphorm transphorm deleted the codex/apply-eslint-rules-from-pr-and-update-dev-branch branch July 25, 2025 04:17
remicolin added a commit that referenced this pull request Aug 20, 2025
* 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

* merge dev to main (#657)

* 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

---------

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]>

* 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)

* Dev (#677)

* 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)

---------

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]>

* 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

* update the smart contracts scripts (#684)

* remove the && false

* fix euid (#685)

* keep build and version in sync (#686)

* fix env set to null

* fix: circuit for register ci (#690)

* fix: circuit for register ci

* fix: rm duplicate workflow_dispatch

* feat: add better error handling (#691)

* fix: older than bug (#692)

* bump: sdk/[email protected]

* fix: config not found bug

* decrease parallel circuits to 3

* ci: add prettier check for contract sdk (#602)

* Add Prettier check for code formatting in contracts workflow

* Update contracts workflow: remove unused checkout action and fix build step name

* Run formatter

* Run lint fix

* chore: update build_cpp to 2 concurrent builds

* Contract/fix sdk (#695)

* fix contracts sdk

* fix contracts sdk

* Fix contract example v2 (#694)

* feat: add verification config ID functionality to Airdrop, HappyBirthday, and SelfIdentityERC721 contracts

* Run formatter

* SEL-473: Add lint rule for BUSL headers (#698)

* chore(app): enforce license header via eslint

* update lock and order

* fix formatting

* SEL-444: Fix android cloud backup (#697)

* feat(android): migrate google backup

* update lock and google services config

* add bulk format command

* backup fixes

* working drive settings!!!!!!!!

* remove unneeded intent filter

* add tests

* coderabbit feedback

* coderabbit feedback

* abstract google method

* coderabbit feedback and fix test

* more coderabbit suggestions and tests fixes

* chore: update relayer verifier enum to include the register circuits (#699)

* fix env sample (#700)

* Abstract iOS cloud backup logic (#701)

* feat(ios): abstract cloud backup logic

* prettier and cr feedback

* tested on iOS and android and functionality is the same

* Fix navigation serialization warnings (#702)

* test: cover modal callbacks

* coderabbit feedback

* feat(app): clarify passport linking (#704)

* Show NFC support message (#708)

* SEL-425: Add document management analytics events (#706)

* Add document management analytics

* coderabbit feedback

* SEL-447: Improve proof failure feedback (#707)

* feat: flag stale proofs as failed

* make a constant

* format

* SEL-330: Add backup check after verification (#711)

* route to save phrase if backup disabled

* format

* SEL-483: Implement recovery backup prompts (#710)

* feat: prompt users to back up account

* feat: prompt users to back up account

* format

* Add tests for recovery prompt logic

* more lint updates

* fix imports

* fix unused import

* update cursor suggestions

* implement coderabbit suggestions and fix tests

* SEL-472: Enable production push notifications (#703)

* chore: leave sandbox apns token comment

* tweak entitlement

* coderabbit ai feedback

* firebase tweaks

* Chore: ensure there is an extra empty line after the license declaration (#712)

* ensure there is an extra empty line after the license declaration

* ignore adding header to cjs config files

* add missing license header

* ignore linting metro config

* bump version and add mainnet hub address

* Bugfix: Show recovery prompt only when user has docs (#714)

* feat(app): prompt recovery only when docs exist

* cr feedbacl

* SEL-487: Prompt user to backup recovery phrase before registering (#715)

* feat: prompt backup before registration

* coderabbit feedback

* fix tests

* coderabbitai feedback and fix tests

* Remove StartupFlushPolicy (#717)

* SEL-479: Multi-ID onboarding mvp flow (#688)

* save new launch screen wip

* save wip

* finalize launch look

* replace launch screen

* rename

* update camera onboarding and scan screen

* update tips looks

* update nfc scan issue screens

* update copy

* add launch screen todo

* fix casing

* update launch screen link, copy and add tracking event

* bump project version to match app store

* match app store

* updated supported bio id link

* add dialog message support back in

* cr feedback

* bump version and build

* update images

* tweak animation layout

* loop with setTimeout

* fix onboarding assets (#719)

* feat: add flag to use PACEPolling (#680)

* feat: add flag to use PACEPolling

* fix: santize before storing in store

* bump ios build number and update podfile lock

* prettier

* bump build

* feat: add flag to use PACEPolling

* fix: santize before storing in store

* bump ios build number and update podfile lock

* prettier

* bump build

---------

Co-authored-by: Justin Hernandez <[email protected]>

* fix backup button label (#722)

* update version to 2.6.0 and bump build numbers (#721)

* SEL-179 & SEL-312: Add gitleaks and GitGuardian scanning (#705)

* chore: add secret scanning setup

* fix: correct GitGuardian action path

* cr feedbacak

* test husky commit

* pr feedback

* fix workflows

* tweaks

* fix versions

* upgrade: migrate from husky v8 to v9

- Update husky from ^8.0.0 to ^9.1.7
- Change prepare script from 'husky install' to 'husky'
- Remove v8 hook structure (shebang, husky.sh sourcing)
- Delete .husky/_/ directory as it's not needed in v9
- Maintain gitleaks pre-commit hook functionality

* coderabbitai feedback

* add bulk sort command (#723)

* feat(app): redirect empty docs to launch (#725)

* Apply consistent safe area padding across screens (#726)

* Contracts/update verifiers (#729)

* update the verifiers

* update deployment script

* update deployment script and deploy to prod

* prettier run write

* App/ethcc fixes (#730)

* fix mock data screen

* increase timout between dsc and register proof

* fix the isUserRegisteredWithAlternativeCSCA function

* yarn nice

* allow people to switch to a mock id (#732)

* yarn nice

* chore: update default config id method

* chore: use named exports

* Update README.md

* Temporarily disable recovery redirect and reminder prompts  (#733)

* Revert "SEL-487: Prompt user to backup recovery phrase before registering (#715)"

This reverts commit fe14ac655e11b4b9e0c4023002b84fcc79bedd31.

* revert update

* fix safe area context pkg

* Revert "SEL-487: Prompt user to backup recovery phrase before registering (#715)"

This reverts commit fe14ac655e11b4b9e0c4023002b84fcc79bedd31.

* fix old flow

* more silent tests

* update lock files

* hard code return

* SEL-486: Fix unwrap DO (#718)

* update podfile: unwrapDO

* update lock

* bump version and builds

* bump build; forgot to enable logs

* fix version to not interfere with release

---------

Co-authored-by: Justin Hernandez <[email protected]>

* SEL-494: Update proving machine event tracking (#734)

* Add extensive proof analytics instrumentation

* prettier and sort events by key name

* remove loading screen race condition redirect (#736)

* Chore: new build for v2.6.0 ios 145 android 81 (#737)

* bump version and build

* properly bump app

* bump build

* Improve manual mobile deploy workflow and docs (#728)

* Add basic Fastlane helper tests

* Upgrade fastlane and enhance helper tests (#738)

* simplify mobile deploy pipelines and make them manual. update readme

* update fastlane dev readme

* update tests and add helper script

* cr feedback, update tests, revert circuits package.json sort change

* tweaks

* fix slack

* cr feedback and fixes

* add better cjs eslint support

* save wip. add confirmation check script. update scripts

* remove auto increment feature

* migrate readme items over to DEV due to fastlane auto regen docs flow

* use regular xcode

* fix hermes compiler path

* coderabbit feedback

* reinstall when on local dev

* fix upload

* simplify

* simplify confirmation feedback with tests

* fix mobile deploys

* cr feedback

* test iOS building

* fix trigger logic

* cr feedback

* updates

* fix env var

* fix order

* re-enable upload to testflight for ios

* updated notes

* chore: update readme

* Bugfix: android deeplinks (#742)

* bugfix: deep linking

* add android manifest test

* bump build and version

* format readme

* fix deeplink genmockiddoc

* add the gender to the deeplink optoin

* bump version (#743)

* fix the female bug

* bump build 148 (#744)

* SEL-496: Add Firebase Remote Config and dev feature flag screen (#735)

* feat: add remote config support

* update lock

* tweak config logic. add feature flag viewing screen

* add tests

* allow for local overriding of feature flags

* save local override work

* save wip

* clean up ui

* update screen to handle multi value types

* fix tests

* cr feedback and fix tests

* remote config upates. fix tests, codex feedback

* Improve AGENTS workflow notes (#747)

* clarify workflow instructions

* agents feedback

* Address minor mobile deployment bugs (#745)

* feat: improve deployment tooling

* cr feedback

* for temp testing

* clean build artifacts after deploy

* add deploy source

* uncomment ios commands

* Add tests for minor deployment fixes (#750)

* Add test coverage for deployment scripts and Fastfile

* format

* increase github check to 5 minutes

* Extend platform build file tests (#748)

* Add build file tests

* cr feedback

* Add proving machine tests (#749)

* Add actor mock helper and tests

* format tests

* fix tests

* wip fix tests

* address cr feedback

* Add thorough test cases for mobile app (#752)

* Add actor mock helper and tests

* format tests

* fix tests

* Revert non-app tests

* update tests

* fix tests

* coderabbit feedback

* revert change

* remove spurious tests

* don't use crypto in core sdk

* Start of Web App (#689)

* Add .cursorignore to optimize AI editor performance and security (#758)

Prevents Cursor AI from accessing sensitive files (keys, credentials,
deployment configs) and large generated artifacts that slow down indexing.
Keeps source code accessible while excluding build outputs, node_modules,
and circuit/contract compilation artifacts across the monorepo.

* SEL-504: fix fonts and some styles (#762)

* fix fonts and some styles

* dry config

* fix some warnings

* lets start with coverage for app (#763)

* lets start with coverage for app

* lint

* better setup

* SEL-559: Update td1 regex (#760)

* feat: update td1 regex

* update review comments

* fix: NPE on expirationDate regex

* fix user defined data (#766)

* fix: name formatting for middle name

* bump: sdk/core to 1.0.7-beta.1

* Feat/retrieve OFAC trees from api (#769)

* retrieve the ofac trees from the api

* remove the ofac trees from the common repo

* fix ofac test

* yarn nice

* yarn nice

* yarn nice

* refactor ofac fetching

* Release new build v2.6.2 (#779)

* bump version and build

* ignore podfile

* Remove failing version test (#780)

* remove version check test

* remove test all together

* SEL-269: Update ESLint rules & lock prettier config (#781)

* Update ESLint config and lock prettier config

* Refine ESLint config and fix lint issues

* Apply eslint fixes

* Use socketIo alias (#782)

* move gesture handler

* save wip updates

* fix svg imports

* update tsconfig

* eslint updates

* eslint fixes

* improve ignore folders

* coderabbit feedback

* Fix style prop shorthands (#787)

* Expand view style props

* Expand remaining style props

* update types

* fix pipeline

* fix test env check

* nicer casting

* fix booleans

* update deeplink url handling and make it more robust

* add socket error handler

* Add COSE signature verification tests (#788)

* Update ESLint config and lock prettier config

* Refine ESLint config and fix lint issues

* save wip updates

* eslint updates

* eslint fixes

* Add COSE signature verification tests

* fix tests

* SEL-553: Show NFC Progress (#764)

* feat: add haptics

* fix: BAC FAILED error event

* update lock file

---------

Co-authored-by: Justin Hernandez <[email protected]>

* SEL-566: Navigate Home based on document validity (#768)

* feat: navigate home if atleast one valid document is present

* update comments

* Review: Remove unnecessary continue statement

* feat: add tracking

* SEL-544: Generate Mock DSC on mock-passport flow (#772)

* feat: Generate mock DSC on mock-passport flow

* Remove console log

* yarn format

* revert to mock dsc generation

* SEL-570: Display user ID in prove screen (#790)

* Display user ID on prove screen

* Add user ID formatting util and tests

* Clarify user ID formatting

* fix nice

* add tests and save toggle wip

* update tests based on feedback

* say connected wallet when wallet

* fix: Add localhost validation to prevent invalid endpoint usage in QR Code SDK (#794)

* Feat/mobile deployment automation (#759)

* feat: add version management system with build number tracking

- Add version.json to track iOS/Android build numbers separately
- Create version.cjs script for build number management
- Add Fastlane version_manager.rb helper
- Keep npm version for semver, version.json for build tracking

* feat: integrate version.json with Fastlane deployment process

## What Changed
- Updated iOS and Android Fastlane lanes to use version.json for build number management
- Added automatic build number increment on deployment
- Added deployment timestamp tracking

## How It Works

### iOS Deployment
1. Reads current build number from version.json
2. Increments iOS build number (e.g., 148 → 149)
3. Updates Xcode project with new build number via increment_build_number
4. Proceeds with TestFlight deployment
5. Updates lastDeployed timestamp on successful upload

### Android Deployment
1. Reads current build number from version.json
2. Increments Android build number (e.g., 82 → 83)
3. Updates build.gradle with new version code via increment_version_code
4. Proceeds with Play Store deployment
5. Updates lastDeployed timestamp on successful upload

## Why This Change
- Eliminates manual version/build number entry
- Prevents version conflicts between deployments
- Provides single source of truth for build numbers
- Enables automatic deployments without human intervention
- Tracks deployment history with timestamps

## Dependencies
- Requires version.json file (already created in previous commit)
- Uses existing Fastlane plugins:
  - increment_build_number (iOS - built-in)
  - increment_version_code (Android - from plugin)
- Version numbers still managed by npm version command

* feat: enhance deploy confirmation with version.json info

* fix: use ENV variable directly in increment_build_number to avoid secret masking

* fix: correct xcodeproj path for GitHub Actions workflow

* feat: add test mode to workflow for safe testing

- Skip store uploads when test_mode is true
- Test version bumps and builds without deployment
- Prevent accidental pushes to TestFlight/Play Store

* fix: use gradle_file_path instead of gradle_file for increment_version_code

* fix: use gsub to remove ../ prefix for CI compatibility

* chore: remove accidentally committed files

- Remove .cursor/mcp.json
- Remove .cursorignore
- Remove deployment-automation-summary.md
- Remove deployment-meeting-questions.md
- Remove pipeline.md

* feat: auto-commit version.json after successful deployment

- Commits version.json changes back to repository
- Only runs when test_mode is false
- Uses [skip ci] to prevent infinite loops
- Checks for actual changes before committing

* feat : update package.json in build step using npm version

* feat: add comprehensive caching to mobile deployment workflow

- Add caching for Yarn dependencies, Ruby gems, CocoaPods, Gradle, and Android NDK
- Implement cache versioning strategy for easy cache invalidation
- Fix cache order: caches now restored after checkout but before dependency installation
- Update mobile-setup action to skip installs when dependencies are cached
- Add cache size monitoring to track usage against GitHub's 10GB limit
- Fix Slack notification bug: skip notifications in test_mode
- Add detailed logging for package.json version updates (show from/to versions)

Expected performance improvement: ~50% faster builds (from ~15min to ~7-10min)

* fix: move bundler config after Ruby setup in mobile-setup action

* fix: rename cache env vars to avoid Yarn conflicts

Yarn was interpreting YARN_CACHE_VERSION as its own config setting.
Prefixed all cache version env vars with GH_ to avoid conflicts.

* fix: remove bundler deployment mode to allow Gemfile updates

The deployment mode was causing bundler to fail when Gemfile
changed (nokogiri was removed). CI should be able to update
the lockfile as needed.

* feat: implement strict lock file enforcement (Option 1)

- Re-enable bundler deployment mode for strict Gemfile.lock checking
- Use yarn install --immutable for strict yarn.lock checking
- Add clear error messages when lock files are out of date
- Add pre-checks to verify lock files exist
- This ensures reproducible builds and makes caching maximally effective

When developers change dependencies, they must now:
1. Run yarn install or bundle install locally
2. Commit the updated lock files
3. CI will fail with helpful instructions if they forget

* fix: update Gemfile.lock for CI environment

Remove nokogiri from Gemfile.lock since it's excluded in CI
environments (GITHUB_ACTIONS=true). This allows the strict
lock file checks to pass in CI.

* fix: correct yarn.lock path for monorepo workspace

The project uses Yarn workspaces with yarn.lock at the repository
root, not in the app directory. Updated paths to check for yarn.lock
at workspace root and use it for cache keys.

* fix: handle both boolean and string test_mode parameter

The test_mode parameter was only checking for string 'true' but
could be passed as boolean true from command line. Now handles both
cases to ensure test mode works correctly for iOS and Android.

* fix: address code review feedback for mobile deployment workflow

- Replace jq with Node.js for version extraction (jq not available on macOS runners)
- Fix concurrent commit race condition by creating separate update-version job
- Add platform validation to version_manager.rb and version.cjs scripts
- Use POSIX-compatible single = for shell string comparisons
- Ensure single atomic commit when deploying to both platforms

* fix: formatting and linting issues

- Remove trailing spaces from workflow YAML file
- Fix prettier formatting in JavaScript files
- Add -y flag to yarn version command for non-interactive mode
- Address all lint warnings from CI

---------

Co-authored-by: Jayaditya Gupta <[email protected]>

* fix: increment iOS build number

* fix: bump app version to 2.6.3 for iOS release

* App/deeplink callback (#789)

* add deepllinkCallback support

* bump package version

* yarn nice

* fix background countdown

* cast the URL to prevent malicious code introduction

* fix: use cleanDocumentNumber (#784)

* increment iOS bundle version

* Feat/push to dev main (#767)

* feat: add version management system with build number tracking

- Add version.json to track iOS/Android build numbers separately
- Create version.cjs script for build number management
- Add Fastlane version_manager.rb helper
- Keep npm version for semver, version.json for build tracking

* feat: integrate version.json with Fastlane deployment process

## What Changed
- Updated iOS and Android Fastlane lanes to use version.json for build number management
- Added automatic build number increment on deployment
- Added deployment timestamp tracking

## How It Works

### iOS Deployment
1. Reads current build number from version.json
2. Increments iOS build number (e.g., 148 → 149)
3. Updates Xcode project with new build number via increment_build_number
4. Proceeds with TestFlight deployment
5. Updates lastDeployed timestamp on successful upload

### Android Deployment
1. Reads current build number from version.json
2. Increments Android build number (e.g., 82 → 83)
3. Updates build.gradle with new version code via increment_version_code
4. Proceeds with Play Store deployment
5. Updates lastDeployed timestamp on successful upload

## Why This Change
- Eliminates manual version/build number entry
- Prevents version conflicts between deployments
- Provides single source of truth for build numbers
- Enables automatic deployments without human intervention
- Tracks deployment history with timestamps

## Dependencies
- Requires version.json file (already created in previous commit)
- Uses existing Fastlane plugins:
  - increment_build_number (iOS - built-in)
  - increment_version_code (Android - from plugin)
- Version numbers still managed by npm version command

* feat: enhance deploy confirmation with version.json info

* fix: use ENV variable directly in increment_build_number to avoid secret masking

* fix: correct xcodeproj path for GitHub Actions workflow

* feat: add test mode to workflow for safe testing

- Skip store uploads when test_mode is true
- Test version bumps and builds without deployment
- Prevent accidental pushes to TestFlight/Play Store

* fix: use gradle_file_path instead of gradle_file for increment_version_code

* fix: use gsub to remove ../ prefix for CI compatibility

* chore: remove accidentally committed files

- Remove .cursor/mcp.json
- Remove .cursorignore
- Remove deployment-automation-summary.md
- Remove deployment-meeting-questions.md
- Remove pipeline.md

* feat: auto-commit version.json after successful deployment

- Commits version.json changes back to repository
- Only runs when test_mode is false
- Uses [skip ci] to prevent infinite loops
- Checks for actual changes before committing

* feat : update package.json in build step using npm version

* feat: add comprehensive caching to mobile deployment workflow

- Add caching for Yarn dependencies, Ruby gems, CocoaPods, Gradle, and Android NDK
- Implement cache versioning strategy for easy cache invalidation
- Fix cache order: caches now restored after checkout but before dependency installation
- Update mobile-setup action to skip installs when dependencies are cached
- Add cache size monitoring to track usage against GitHub's 10GB limit
- Fix Slack notification bug: skip notifications in test_mode
- Add detailed logging for package.json version updates (show from/to versions)

Expected performance improvement: ~50% faster builds (from ~15min to ~7-10min)

* fix: move bundler config after Ruby setup in mobile-setup action

* fix: rename cache env vars to avoid Yarn conflicts

Yarn was interpreting YARN_CACHE_VERSION as its own config setting.
Prefixed all cache version env vars with GH_ to avoid conflicts.

* fix: remove bundler deployment mode to allow Gemfile updates

The deployment mode was causing bundler to fail when Gemfile
changed (nokogiri was removed). CI should be able to update
the lockfile as needed.

* feat: implement strict lock file enforcement (Option 1)

- Re-enable bundler deployment mode for strict Gemfile.lock checking
- Use yarn install --immutable for strict yarn.lock checking
- Add clear error messages when lock files are out of date
- Add pre-checks to verify lock files exist
- This ensures reproducible builds and makes caching maximally effective

When developers change dependencies, they must now:
1. Run yarn install or bundle install locally
2. Commit the updated lock files
3. CI will fail with helpful instructions if they forget

* fix: update Gemfile.lock for CI environment

Remove nokogiri from Gemfile.lock since it's excluded in CI
environments (GITHUB_ACTIONS=true). This allows the strict
lock file checks to pass in CI.

* fix: correct yarn.lock path for monorepo workspace

The project uses Yarn workspaces with yarn.lock at the repository
root, not in the app directory. Updated paths to check for yarn.lock
at workspace root and use it for cache keys.

* fix: handle both boolean and string test_mode parameter

The test_mode parameter was only checking for string 'true' but
could be passed as boolean true from command line. Now handles both
cases to ensure test mode works correctly for iOS and Android.

* fix: address code review feedback for mobile deployment workflow

- Replace jq with Node.js for version extraction (jq not available on macOS runners)
- Fix concurrent commit race condition by creating separate update-version job
- Add platform validation to version_manager.rb and version.cjs scripts
- Use POSIX-compatible single = for shell string comparisons
- Ensure single atomic commit when deploying to both platforms

* fix: formatting and linting issues

- Remove trailing spaces from workflow YAML file
- Fix prettier formatting in JavaScript files
- Add -y flag to yarn version command for non-interactive mode
- Address all lint warnings from CI

* feat: implement automated branch-based mobile deployments

- Add mobile-deploy-auto.yml workflow that triggers on PR merges to dev/main
- Update mobile-deploy.yml to support workflow_call for reusability
- Add deployment_track, version_bump, and auto_deploy parameters
- Create new Fastlane lanes (deploy_auto) for iOS and Android
- Implement smart version bumping based on PR labels (major/minor/patch)
- Add graceful error handling for Play Store permission issues
- Enhance Slack notifications with deployment track information

This enables automatic deployments when PRs are merged:
- dev branch → internal testing track
- main branch → production track
- Skip deployment with [skip-deploy] in PR or no-deploy label

* feat: add automated git tagging and release system

- Add automatic git tagging for production deployments (v2.5.5, platform-specific tags)
- Create GitHub releases with changelogs for production deployments
- Add manual release script (yarn release) for version bumping and tagging
- Implement simple changelog generation from git history
- Add comprehensive deployment documentation in .github/MOBILE_DEPLOYMENT.md
- Update app/README.md with deployment commands and workflows

This completes the release automation system requested in the ticket for
manual tagging and versioning with automated changelogs and release notes.

---------

Co-authored-by: Jayaditya Gupta <[email protected]>

* Implement basic code splitting

* cm feedback

* update lock

* yarn nice

* add typing to crypto loader

* fix type. more opportunities

* lint suggestions

* build dependencies before linting

* fix build command

* save updated imports

* update build checks

* fix import

* fix imports and test

* fix install commands

* Update Gemfile.lock to exclude nokogiri in CI environments

- Regenerated Gemfile.lock with GITHUB_ACTIONS=true to match the conditional
  nokogiri exclusion in the Ge…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants