-
Notifications
You must be signed in to change notification settings - Fork 210
SELF-1754: polish for document selection for proving flow #1570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SELF-1754: polish for document selection for proving flow #1570
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughWalkthroughThis PR enhances proof request verification UI by introducing scroll-state detection that feeds into button behavior, restructures badge rendering as a non-scrollable fixed element, and adds defensive handling for duplicate database insertions with improved loading indicators throughout the flow. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx (1)
17-24: Major:verifyingdoesn’t exit on session change + button is enabled while verifying + new required prop is a breaking SDK API.
- Line 166-168:
verifyingonly transitions out whenselectedAppSessionIdis falsy; if it changes to a different non-null session, the machine can remain inverifying.- Line 221-222: keeping the button enabled in
verifyingrisks repeated long-press interactions/telemetry (even ifonLongPressis guarded).- Line 21-22: making
isScrollablerequired is a breakingmobile-sdk-alphaAPI change.Proposed fix (make isScrollable non-breaking + disable during verifying + reset verifying on session change)
interface HeldPrimaryButtonProveScreenProps { onVerify: () => void; selectedAppSessionId: string | undefined | null; hasScrolledToBottom: boolean; - isScrollable: boolean; + isScrollable?: boolean; isReadyToProve: boolean; isDocumentExpired: boolean; } interface ButtonContext { selectedAppSessionId: string | undefined | null; hasScrolledToBottom: boolean; isReadyToProve: boolean; onVerify: () => void; isDocumentExpired: boolean; + verifyingSessionId: string | undefined | null; } context: ({ input }: { input: { onVerify: () => void } }) => ({ selectedAppSessionId: null as string | undefined | null, hasScrolledToBottom: false, isReadyToProve: false, onVerify: input.onVerify, isDocumentExpired: false, + verifyingSessionId: null as string | undefined | null, }), +// add a new action type types: {} as { context: ButtonContext; events: ButtonEvent; - actions: { type: 'callOnVerify' } | { type: 'updateContext' }; + actions: + | { type: 'callOnVerify' } + | { type: 'updateContext' } + | { type: 'markVerifyingSession' }; }, ready: { on: { - VERIFY: 'verifying', + VERIFY: { target: 'verifying', actions: 'markVerifyingSession' }, }, ... }, verifying: { entry: 'callOnVerify', always: { target: 'waitingForSession', - guard: ({ context }) => !context.selectedAppSessionId, + guard: ({ context }) => + !context.selectedAppSessionId || + context.selectedAppSessionId !== context.verifyingSessionId, }, }, actions: { + markVerifyingSession: assign(({ context }) => ({ + verifyingSessionId: context.selectedAppSessionId, + })), updateContext: assign(({ context, event }) => { ... - return context; + return context; }), callOnVerify: ({ context }) => { context.onVerify(); }, }, export const HeldPrimaryButtonProveScreen: React.FC<HeldPrimaryButtonProveScreenProps> = ({ onVerify, selectedAppSessionId, hasScrolledToBottom, - isScrollable, + isScrollable = true, isReadyToProve, isDocumentExpired, }) => { - const isDisabled = !state.matches('ready') && !state.matches('verifying'); + const isDisabled = !state.matches('ready');Also applies to: 72-169, 199-274
🧹 Nitpick comments (2)
app/tests/src/stores/database.test.ts (1)
177-212: Nice regression test for duplicate sessionId; recommend switching to shared SQLite mocks + slightly stronger assertion.
Per repo learnings, DB tests should mock SQLite viatests/__setup__/databaseMocks.tsto keep behavior consistent across suites. Also, this test currently allows any parameter array—consider asserting the full bound-values list (like earlier tests) so a reordering/column mismatch can’t slip through.Based on learnings, mock SQLite operations with
executeSqlutilities fromtests/__setup__/databaseMocks.ts.app/src/stores/database.ts (1)
130-135: Refactor to eliminate duplication and clarify INSERT OR IGNORE semantics usingrowsAffected.The pattern at lines 130–135, 158–163, and 187–192 appears three times identically in error handlers. The fallback
'0'id is safe becauseproofHistoryStore.ts:120correctly checksrowsAffected > 0before using the id, but the current approach is semantically opaque. Consolidate into a helper function that derivesidfromrowsAffected > 0 && insertId != null, matching the caller's intent more clearly.Proposed refactor
Extract a helper:
function buildInsertResult(insertResult, timestamp) { return { id: insertResult.rowsAffected > 0 && insertResult.insertId != null ? String(insertResult.insertId) : '0', timestamp, rowsAffected: insertResult.rowsAffected, }; }Then replace all three return blocks with
return buildInsertResult(insertResult, timestamp);
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
app/src/components/proof-request/BottomVerifyBar.tsxapp/src/components/proof-request/ProofRequestCard.tsxapp/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProveScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/stores/database.tsapp/tests/src/stores/database.test.tsapp/tests/src/stores/proofHistoryStore.test.tspackages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx
🧰 Additional context used
📓 Path-based instructions (30)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.cursorrules)
**/*.{js,jsx,ts,tsx}: NEVER log sensitive data including PII (names, DOB, passport numbers, addresses), credentials, tokens, API keys, private keys, or session identifiers.
ALWAYS redact/mask sensitive fields in logs using consistent patterns (e.g.,***-***-1234for passport numbers,J*** D***for names).
Files:
app/tests/src/stores/database.test.tsapp/src/components/proof-request/ProofRequestCard.tsxapp/src/components/proof-request/BottomVerifyBar.tsxapp/tests/src/stores/proofHistoryStore.test.tsapp/src/screens/verification/DocumentSelectorForProvingScreen.tsxpackages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsxapp/src/stores/database.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursorrules)
**/*.{ts,tsx,js,jsx}: Use React Navigation withcreateStaticNavigationfor type-safe navigation in React Native applications.
Implement platform-specific handling withPlatform.OS === 'ios' ? 'iOS' : 'Android'checks before platform-specific code in React Native.
Initialize native modules withinitializeNativeModules()before any native operations in React Native.
Implement lazy loading for screens usingReact.lazy()in React Native applications.
Implement custom modal system withuseModalhook and callback registry in React Native.
Integrate haptic feedback usinguseHapticNavigationhook in React Native navigation.
Use platform-specific initial routes: web uses 'Home', mobile uses 'Splash' in React Navigation.
Use Zustand for global state management in React Native applications.
Use custom hooks for complex state (useModal,useHapticNavigation) instead of inline logic.
Use AsyncStorage for simple data, SQLite for complex data, and Keychain for sensitive data in React Native.
Use@/alias for src imports and@tests/alias for test imports in TypeScript/JavaScript files.
Use conditional rendering with Platform.OS for platform-specific code in React Native.
Use Tamagui for UI components in React Native applications.
Do not log sensitive data in production, including identity verification and passport information.
Use Keychain for secure storage of sensitive data in React Native.
Implement proper cleanup of sensitive data after use.
Implement certificate validation for passport data verification.
Always use try-catch for async operations in React Native and TypeScript code.
Implement graceful degradation when native modules fail in React Native.
Provide user-friendly error messages in UI and error handlers.
Lazy load screens and components to optimize bundle size in React Native.
Prevent memory leaks in native modules in React Native.
Files:
app/tests/src/stores/database.test.tsapp/src/components/proof-request/ProofRequestCard.tsxapp/src/components/proof-request/BottomVerifyBar.tsxapp/tests/src/stores/proofHistoryStore.test.tsapp/src/screens/verification/DocumentSelectorForProvingScreen.tsxpackages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsxapp/src/stores/database.ts
**/*.test.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursorrules)
**/*.test.{ts,tsx,js,jsx}: UserenderHookfor testing custom React hooks instead of rendering components.
Mock console.error in tests to avoid test output clutter while testing error scenarios.
Test error boundaries and recovery mechanisms in React components.
Mock SQLite operations withexecuteSqlmethod in database tests using utilities fromtests/__setup__/databaseMocks.ts.
**/*.test.{ts,tsx,js,jsx}: Never userequire('react-native')in test files; use ES6importstatements instead to avoid nested require() calls that cause out-of-memory errors in CI/CD pipelines
Never userequire('react')in test files; use ES6import React from 'react'instead to avoid nested require() calls that cause out-of-memory errors
Files:
app/tests/src/stores/database.test.tsapp/tests/src/stores/proofHistoryStore.test.ts
**/*.{tsx,jsx,ts,js}
📄 CodeRabbit inference engine (.cursorrules)
Implement proper cleanup in useEffect and component unmount hooks in React.
Files:
app/tests/src/stores/database.test.tsapp/src/components/proof-request/ProofRequestCard.tsxapp/src/components/proof-request/BottomVerifyBar.tsxapp/tests/src/stores/proofHistoryStore.test.tsapp/src/screens/verification/DocumentSelectorForProvingScreen.tsxpackages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsxapp/src/stores/database.ts
**/{mobile,client,app,time,verification}/**/*.{ts,tsx,js,swift,kt}
📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)
Use server-signed time tokens or chain block timestamps for trusted time in mobile clients, do not trust device wall-clock alone
Files:
app/tests/src/stores/database.test.tsapp/src/components/proof-request/ProofRequestCard.tsxapp/src/components/proof-request/BottomVerifyBar.tsxapp/tests/src/stores/proofHistoryStore.test.tsapp/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsxapp/src/stores/database.ts
**/{mobile,client,app,proof,zk}/**/*.{ts,tsx,js,swift,kt}
📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)
**/{mobile,client,app,proof,zk}/**/*.{ts,tsx,js,swift,kt}: Include trusted time anchor in proof generation and verify time anchor authenticity before proof generation in mobile implementations
Achieve proof generation in <60 seconds on mid-tier mobile devices
Files:
app/tests/src/stores/database.test.tsapp/src/components/proof-request/ProofRequestCard.tsxapp/src/components/proof-request/BottomVerifyBar.tsxapp/tests/src/stores/proofHistoryStore.test.tsapp/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsxapp/src/stores/database.ts
{app,packages/mobile-sdk-alpha}/**/*.{test,spec}.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Never create nested require('react-native') calls in tests as this causes out-of-memory errors in CI/CD pipelines; use ES6 import statements instead and avoid dynamic require() calls in beforeEach/afterEach hooks
Files:
app/tests/src/stores/database.test.tsapp/tests/src/stores/proofHistoryStore.test.ts
app/**/*.{ts,tsx}
📄 CodeRabbit inference engine (app/AGENTS.md)
Ensure
yarn typespasses (TypeScript validation) before creating a PR
Files:
app/tests/src/stores/database.test.tsapp/src/components/proof-request/ProofRequestCard.tsxapp/src/components/proof-request/BottomVerifyBar.tsxapp/tests/src/stores/proofHistoryStore.test.tsapp/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsxapp/src/stores/database.ts
app/**/*.test.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (app/AGENTS.md)
app/**/*.test.{ts,tsx,js,jsx}: Ensureyarn testpasses (unit tests) before creating a PR
Avoid nestedrequire('react')orrequire('react-native')calls in test files - use ES6 import statements instead
Put all imports at the top of test files - avoid dynamic imports in hooks
Never userequire()calls inbeforeEach/afterEachhooks in test files
Verify no memory leaks introduced, including test memory patterns
Use ES6importstatements exclusively - never userequire('react')orrequire('react-native')in test files
Files:
app/tests/src/stores/database.test.tsapp/tests/src/stores/proofHistoryStore.test.ts
app/tests/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (app/AGENTS.md)
Do not create nested
require('react-native')calls in tests - causes OOM in CI
Files:
app/tests/src/stores/database.test.tsapp/tests/src/stores/proofHistoryStore.test.ts
app/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (app/AGENTS.md)
app/**/*.{ts,tsx,js,jsx}: Ensure web build succeeds withyarn webbefore creating a PR
Do not include sensitive data in logs - avoid logging PII, credentials, and tokens
Usereact-native-dotenvfor environment configuration via@envimport
Confirm no sensitive data exposed before PR merge
Files:
app/tests/src/stores/database.test.tsapp/src/components/proof-request/ProofRequestCard.tsxapp/src/components/proof-request/BottomVerifyBar.tsxapp/tests/src/stores/proofHistoryStore.test.tsapp/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsxapp/src/stores/database.ts
**/*.{test,spec}.{ts,js,tsx,jsx}
⚙️ CodeRabbit configuration file
**/*.{test,spec}.{ts,js,tsx,jsx}: Review test files for:
- Test coverage completeness
- Test case quality and edge cases
- Mock usage appropriateness
- Test readability and maintainability
Files:
app/tests/src/stores/database.test.tsapp/tests/src/stores/proofHistoryStore.test.ts
**/*.{tsx,jsx}
📄 CodeRabbit inference engine (.cursorrules)
Implement comprehensive error boundaries in React components.
Files:
app/src/components/proof-request/ProofRequestCard.tsxapp/src/components/proof-request/BottomVerifyBar.tsxapp/src/screens/verification/DocumentSelectorForProvingScreen.tsxpackages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsx
app/src/**/*.{ts,tsx,js,jsx}
⚙️ CodeRabbit configuration file
app/src/**/*.{ts,tsx,js,jsx}: Review React Native TypeScript code for:
- Component architecture and reusability
- State management patterns
- Performance optimizations
- TypeScript type safety
- React hooks usage and dependencies
- Navigation patterns
Files:
app/src/components/proof-request/ProofRequestCard.tsxapp/src/components/proof-request/BottomVerifyBar.tsxapp/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsxapp/src/stores/database.ts
**/{compliance,ofac,verification,identity}/**/*.{ts,tsx,js,py}
📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)
**/{compliance,ofac,verification,identity}/**/*.{ts,tsx,js,py}: Implement three-tier OFAC verification system: Passport Number Check (direct passport validation), Name + DOB Check (full name with exact date of birth), and Name + Year Check (name with year of birth, defaulting to Jan-01)
Apply Jaro–Winkler fuzzy matching algorithm with ≥0.92 threshold for OFAC name verification
Validate passport numbers by removing whitespace/punctuation and performing country-specific format validation
Protect all PII by committing via domain-separated hashes using Poseidon hash function with 'ofac-v1' domain separator
Implement per-issuer salt for additional privacy in OFAC hash commitments, with unique salt per issuing country
Files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsx
**/{compliance,ofac,verification,identity,utils}/**/*.{ts,tsx,js,py}
📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)
Normalize names using case-folding, Unicode NFKC normalization, and diacritics removal for OFAC matching
Files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsx
**/{compliance,ofac,verification,identity,age}/**/*.{ts,tsx,js,py}
📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)
Use ISO 8601 format (YYYY-MM-DD) for all date inputs in compliance verification
Files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsx
**/{age,verification,identity,compliance}/**/*.{ts,tsx,js,py}
📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)
Implement age verification with day-level precision for 'olderThan' checks accepting ISO 8601 date inputs
Files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsx
**/{circuits,age,verification,zk,proof}/**/*.{circom,ts,tsx,js,py}
📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)
Implement zero-knowledge proof of age without disclosing actual date of birth
Files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsx
**/{compliance,country,verification,identity}/**/*.{ts,tsx,js,py}
📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)
**/{compliance,country,verification,identity}/**/*.{ts,tsx,js,py}: Implement forbidden country validation using Bloom filter with false positive rate ≤1e-6
Validate country codes in ISO 3166-1 alpha-3 format for forbidden country checks
Files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsx
**/{circuits,country,verification,zk,proof}/**/*.{circom,ts,tsx,js,py}
📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)
Implement zero-knowledge proof of country non-inclusion without revealing actual country code
Files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsx
**/{compliance,country,verification}/**/*.{ts,tsx,js,py}
📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)
Implement graceful degradation for country validation when filter is unavailable
Files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsx
**/{compliance,verification,identity,age,country}/**/*.{ts,tsx,js,py}
📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)
**/{compliance,verification,identity,age,country}/**/*.{ts,tsx,js,py}: Use UTC timestamps only for all compliance verification operations
Allow ±5 minutes clock drift tolerance in timestamp validation for compliance checks
Files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsx
**/{compliance,verification,proof}/**/*.{ts,tsx,js,py}
📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)
Enforce 24-hour verification window with drift adjustment for compliance proof validity
Files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsx
**/{compliance,verification,proof,zk,identity,age,country}/**/*.{ts,tsx,js,py}
📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)
Maintain peak memory usage below 300MB for compliance verification operations
Files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsx
**/{compliance,verification,service,api}/**/*.{ts,tsx,js,py}
📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)
**/{compliance,verification,service,api}/**/*.{ts,tsx,js,py}: Make all network calls idempotent with exponential backoff retry logic
Implement exponential backoff with jitter for compliance verification retry logic
Files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsx
**/{compliance,audit,log,verification}/**/*.{ts,tsx,js,py}
📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)
Maintain privacy-preserving audit logs for compliance verification operations
Files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsx
packages/mobile-sdk-alpha/**/*.{ts,tsx}
📄 CodeRabbit inference engine (packages/mobile-sdk-alpha/AGENTS.md)
packages/mobile-sdk-alpha/**/*.{ts,tsx}: Check types across the codebase by runningyarn types
Runyarn typesoryarn typecheckto check TypeScript types across the codebase
Runyarn buildto build the package for distribution
Before committing changes, ensure TypeScript types are valid by runningyarn types
Before committing changes, ensure the build succeeds by runningyarn build
Before creating a PR, ensureyarn typespasses (TypeScript validation)
Before creating a PR, ensureyarn buildsucceeds (package builds correctly)
Ensure no breaking changes to public API or document them properly
Verify cross-platform compatibility for both React Native and Web environments
This package uses TypeScript with strict type checking
Use ESLint with TypeScript-specific rules
Use platform detectionPlatform.OS === 'web'when adding platform-specific code
Maintain type definitions that are complete and accurate
Files:
packages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx
packages/mobile-sdk-alpha/**/*.{js,ts,tsx,jsx}
📄 CodeRabbit inference engine (packages/mobile-sdk-alpha/AGENTS.md)
Run
yarn lintto check for linting issues oryarn lint:fixto automatically fix them
Files:
packages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx
packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}
⚙️ CodeRabbit configuration file
packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}: Review alpha mobile SDK code for:
- API consistency with core SDK
- Platform-neutral abstractions
- Performance considerations
- Clear experimental notes or TODOs
Files:
packages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx
🧠 Learnings (11)
📚 Learning: 2025-11-25T14:06:55.970Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T14:06:55.970Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Mock SQLite operations with `executeSql` method in database tests using utilities from `tests/__setup__/databaseMocks.ts`.
Applied to files:
app/tests/src/stores/database.test.ts
📚 Learning: 2025-12-13T18:00:46.963Z
Learnt from: seshanthS
Repo: selfxyz/self PR: 1497
File: app/src/screens/verification/ProveScreen.tsx:125-161
Timestamp: 2025-12-13T18:00:46.963Z
Learning: In app/src/screens/verification/ProveScreen.tsx: The document expiration check using checkDocumentExpiration() is UX-only to prevent wasted gas and provide better user experience. The authoritative expiration validation is enforced in the circuits and smart contracts using trusted time sources (block timestamps), not device clock.
Applied to files:
app/src/components/proof-request/BottomVerifyBar.tsxapp/src/screens/verification/DocumentSelectorForProvingScreen.tsxpackages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsx
📚 Learning: 2025-11-25T14:07:28.188Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/compliance-verification.mdc:0-0
Timestamp: 2025-11-25T14:07:28.188Z
Learning: Applies to **/{mobile,client,app,proof,zk}/**/*.{ts,tsx,js,swift,kt} : Include trusted time anchor in proof generation and verify time anchor authenticity before proof generation in mobile implementations
Applied to files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsxapp/src/screens/verification/ProveScreen.tsx
📚 Learning: 2025-10-23T12:08:55.529Z
Learnt from: shazarre
Repo: selfxyz/self PR: 1236
File: packages/mobile-sdk-alpha/src/flows/onboarding/document-nfc-screen.tsx:356-378
Timestamp: 2025-10-23T12:08:55.529Z
Learning: In packages/mobile-sdk-alpha/src/flows/onboarding/document-nfc-screen.tsx, the NFC native events emitted via NativeEventEmitter are generic status strings (e.g., "PACE succeeded", "BAC failed", "Reading DG1 succeeded") and do not contain sensitive MRZ data or passport numbers, so they do not require sanitization before logging.
Applied to files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsx
📚 Learning: 2025-12-25T19:19:35.354Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-12-25T19:19:35.354Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.test.{ts,tsx} : Test `isPassportDataValid()` with realistic, synthetic passport data (never use real user data)
Applied to files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsx
📚 Learning: 2025-12-25T19:19:35.354Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-12-25T19:19:35.354Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.test.{ts,tsx} : Verify `extractMRZInfo()` using published sample MRZ strings (e.g., ICAO examples)
Applied to files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsxapp/src/screens/verification/ProvingScreenRouter.tsx
📚 Learning: 2025-11-18T12:17:14.819Z
Learnt from: seshanthS
Repo: selfxyz/self PR: 1337
File: packages/mobile-sdk-alpha/src/processing/mrz.ts:189-194
Timestamp: 2025-11-18T12:17:14.819Z
Learning: In packages/mobile-sdk-alpha/src/processing/mrz.ts, the checkScannedInfo function and related TD1 extraction/validation logic are only reached on Android. iOS uses native Swift parsing (LiveMRZScannerView.swift) that bypasses this TypeScript layer.
Applied to files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsx
📚 Learning: 2025-08-26T14:49:11.190Z
Learnt from: shazarre
Repo: selfxyz/self PR: 936
File: app/src/screens/passport/PassportNFCScanScreen.tsx:28-31
Timestamp: 2025-08-26T14:49:11.190Z
Learning: SelfClientProvider is wrapped in app/App.tsx, providing context for useSelfClient() hook usage throughout the React Native app navigation stacks.
Applied to files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsx
📚 Learning: 2025-12-25T19:19:35.354Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-12-25T19:19:35.354Z
Learning: Applies to packages/mobile-sdk-alpha/**/index.{ts,tsx} : Run `yarn validate:exports` to verify that exports are properly configured
Applied to files:
app/src/screens/verification/DocumentSelectorForProvingScreen.tsx
📚 Learning: 2025-12-25T19:19:35.354Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-12-25T19:19:35.354Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{ts,tsx} : Ensure no breaking changes to public API or document them properly
Applied to files:
packages/mobile-sdk-alpha/src/components/buttons/HeldPrimaryButtonProveScreen.tsx
📚 Learning: 2025-11-25T14:07:28.188Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/compliance-verification.mdc:0-0
Timestamp: 2025-11-25T14:07:28.188Z
Learning: Applies to **/{mobile,client,app,proof,zk}/**/*.{ts,tsx,js,swift,kt} : Achieve proof generation in <60 seconds on mid-tier mobile devices
Applied to files:
app/src/screens/verification/ProvingScreenRouter.tsx
🧬 Code graph analysis (5)
app/tests/src/stores/database.test.ts (2)
app/src/stores/database.ts (1)
database(24-212)app/src/stores/database.web.ts (1)
database(254-254)
app/src/components/proof-request/ProofRequestCard.tsx (3)
app/tests/__setup__/mocks/ui.js (3)
View(60-60)View(95-95)ScrollView(96-96)app/src/components/proof-request/designTokens.ts (1)
proofRequestSpacing(34-40)app/src/components/proof-request/index.ts (1)
proofRequestSpacing(67-67)
app/src/screens/verification/DocumentSelectorForProvingScreen.tsx (2)
packages/mobile-sdk-alpha/src/constants/colors.ts (1)
black(8-8)app/src/components/proof-request/ConnectedWalletBadge.tsx (2)
ConnectedWalletBadge(25-88)truncateAddress(94-103)
app/src/screens/verification/ProvingScreenRouter.tsx (3)
packages/mobile-sdk-demo/tests/mocks/react-native.ts (1)
ActivityIndicator(5-5)packages/mobile-sdk-alpha/src/constants/colors.ts (1)
black(8-8)packages/mobile-sdk-alpha/src/constants/index.ts (1)
black(24-24)
app/src/screens/verification/ProveScreen.tsx (2)
app/src/components/proof-request/ConnectedWalletBadge.tsx (2)
ConnectedWalletBadge(25-88)truncateAddress(94-103)app/src/components/proof-request/index.ts (2)
ConnectedWalletBadge(45-45)truncateAddress(46-46)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: e2e-ios
🔇 Additional comments (6)
app/src/screens/verification/ProvingScreenRouter.tsx (1)
15-15: LGTM! Clean color update for loading indicator.The ActivityIndicator color change from the previous blue to black is consistent with the PR's UI polish objectives and maintains good contrast on the white background.
Also applies to: 198-198
app/tests/src/stores/proofHistoryStore.test.ts (1)
160-187: Solid coverage for the “ignored insert” path (rowsAffected = 0).
This matches the store behavior (only prepend whenrowsAffected > 0) and protects against accidental regressions where duplicates get added to in-memory state.app/src/components/proof-request/ProofRequestCard.tsx (1)
28-42: Good separation of fixed badge vs scrollable content; please QA scroll/bottom detection with the new padding wrapper.
This layout change can subtly affectonLayout/onContentSizeChangemeasurements feeding scroll-state logic, so it’s worth validating on small screens and dynamic type.Also applies to: 49-63, 119-156
app/src/screens/verification/DocumentSelectorForProvingScreen.tsx (1)
33-34: Looks consistent with the newconnectedWalletBadgelayout and updated loading color.Also applies to: 344-345, 416-450
app/src/screens/verification/ProveScreen.tsx (1)
95-104: Scroll-state propagation looks coherent (single +50 tolerance), but please QA edge cases around “barely scrollable” content.
In particular: small screens + large font sizes wherecontentHeightfluctuates aroundscrollViewHeight + 50, and rotation (layout re-measure).Also applies to: 256-287, 289-316, 318-369
app/src/components/proof-request/BottomVerifyBar.tsx (1)
13-21: AllBottomVerifyBarcall sites properly passisScrollableprop.Verified one usage in
ProveScreen.tsx:360includes the required prop. TypeScript enforcement on the interface ensures no missing implementations.
* change spinner color * fix disclosure scroll feedback * fix type error * fix button scrolling logic * make the connected wallet static * fix hold to verify button feedback timing * formatting * clean up tex
Description
A brief description of the changes, what and how is being changed.
Tested
Explain how the change has been tested (for example by manual testing, unit tests etc) or why it's not necessary (for example version bump).
How to QA
How can the change be tested in a repeatable manner?
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Style
Tests
✏️ Tip: You can customize this high-level summary in your review settings.