-
Notifications
You must be signed in to change notification settings - Fork 180
SELF-253 feat: add user email feedback #889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds an app-wide feedback system: FeedbackProvider + context, Sentry captureFeedback (native + web) and feedback integration, in-app and fullscreen feedback UIs, hooks to manage/hide Sentry UI and auto-hide on blur, mailto helper with sanitized metadata, tests, App wrapped with FeedbackProvider, and NFC screens wired to feedback flows with a 30s scan timeout. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Screen
participant Provider as FeedbackProvider
participant Hook as useFeedbackModal
participant Sentry
participant Modal as FeedbackModal
User->>Screen: trigger feedback (button/widget/custom)
Screen->>Provider: showFeedbackModal(type)
Provider->>Hook: showFeedbackModal(type)
alt type == button
Hook->>Sentry: showFeedbackButton()
Note right of Hook #e6f7ff: start 10s auto-hide timer
else type == widget
Hook->>Sentry: showFeedbackWidget()
else type == custom
Hook->>Hook: set isVisible = true (render custom modal)
end
User->>Modal: Submit feedback
Modal->>Provider: onSubmit(feedback, category, name?, email?)
Provider->>Hook: submitFeedback(...)
Hook->>Sentry: captureFeedback(feedback, { tags, extras, captureContext })
Hook->>Sentry: hideFeedbackButton()
Hook-->>Provider: resolve -> close modal
sequenceDiagram
participant NFCScreen as PassportNFCScanScreen
participant Provider as FeedbackProvider
participant Mail as MailClient
NFCScreen->>Provider: showModal({title: "NFC Scan Error", buttonText: "Report Issue", ...})
User->>Provider: Tap "Report Issue"
Provider->>NFCScreen: invoke sendFeedbackEmail(message)
NFCScreen->>Mail: open mailto:[email protected] with device/app context
Note right of NFCScreen #fff7e6: On 30s scan timeout -> showModal(...) and track timeout event
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
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: 11
🧹 Nitpick comments (8)
app/src/Sentry.ts (1)
64-81: PII policy consistency: you’re collecting name/email via feedback while removing PII from events.BeforeSend strips
user.idandip_address, butcaptureFeedbackstill includesnameand
- UI clearly communicates optional PII and purpose.
- A consent toggle is stored and enforced before including
name/- Documentation/config comments reflect this exception.
Do you want me to add a consent gate in the modal/provider so we only include name/email when explicitly allowed?
app/src/Sentry.web.ts (2)
64-81: Consider enabling feedbackIntegration on web for parity.If you intend to support the “Sentry Feedback button” on web too, add the integration here as well (guarded).
Apply:
Sentry.init({ dsn: SENTRY_DSN, debug: false, // Performance Monitoring tracesSampleRate: 1.0, // Session Replay replaysSessionSampleRate: 0.1, replaysOnErrorSampleRate: 1.0, // Disable collection of PII data beforeSend(event) { // Remove PII data if (event.user) { event.user.ip_address = undefined; event.user.id = undefined; } return event; }, + integrations: (Sentry as any).feedbackIntegration + ? [ + (Sentry as any).feedbackIntegration({ + buttonOptions: { + // approximate parity with native + position: 'top-right', + }, + enableTakeScreenshot: true, + namePlaceholder: 'Full name', + emailPlaceholder: 'Email', + }), + ] + : undefined, });
59-83: PII note mirrors native concerns.Same as native: you’re stripping some PII but still optionally sending
name/Want me to add a “Include contact info” checkbox that gates sending name/email?
app/src/components/FeedbackModal.tsx (3)
151-164: Minor UX: improve multiline input ergonomics.
- Consider
autoFocuson the feedback field.- Add
maxLengthto prevent pathological payloads.- Provide a
testIDfor E2E.Example:
<TextInput style={styles.textInput} placeholder="Tell us what you think, report a bug, or suggest a feature..." placeholderTextColor={slate400} value={feedback} onChangeText={setFeedback} multiline numberOfLines={6} textAlignVertical="top" editable={!isSubmitting} + autoFocus + maxLength={5000} + testID="feedback-textinput" />
125-149: Optional: basic email validation before submit.You can prevent obvious typos with a lightweight check and inline hinting. Keeps Alert noise down.
I can add a simple regex-based validation and disabled state if you want. Say the word and I’ll patch it in.
182-222: Style reuse: split field styles to avoid overrides.Using
textInputwithminHeight: 120and overriding to 48 for contact fields is brittle. Extract atextInputSmallfor single-line fields.Apply:
const styles = StyleSheet.create({ ... - textInput: { + textInput: { backgroundColor: black, borderWidth: 1, borderColor: zinc800, borderRadius: 8, padding: 12, color: white, fontSize: 16, fontFamily: dinot, minHeight: 120, }, + textInputSmall: { + backgroundColor: black, + borderWidth: 1, + borderColor: zinc800, + borderRadius: 8, + padding: 12, + color: white, + fontSize: 16, + fontFamily: dinot, + minHeight: 48, + }, });And replace the two contact inputs:
-<TextInput style={[styles.textInput, { flex: 1, minHeight: 48 }]} ... /> +<TextInput style={[styles.textInputSmall, { flex: 1 }]} ... /> -<TextInput style={[styles.textInput, { flex: 1, minHeight: 48 }]} ... /> +<TextInput style={[styles.textInputSmall, { flex: 1 }]} ... />app/src/hooks/useFeedbackModal.ts (2)
25-37: Avoid overlapping UI when switching to widget modeIf the button is currently visible and you switch to 'widget', it can overlap. Hide the button before showing the widget.
Apply this diff:
- case 'widget': - showFeedbackWidget(); - break; + case 'widget': + hideFeedbackButton(); // prevent overlap if button was visible + showFeedbackWidget(); + break;
39-41: Clarify misleading commentThe comment says you can’t close the Feedback button, but you do hide it later. Let’s tighten the wording.
Apply this diff:
- // we can close the feedback modals(sentry and custom modals), but can't do so for the Feedback button. - // This hides the button after 10 seconds. + // We can programmatically close Sentry/custom modals; for the Feedback button, we auto-hide after 10 seconds.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
app/App.tsx(2 hunks)app/src/Sentry.ts(2 hunks)app/src/Sentry.web.ts(1 hunks)app/src/components/FeedbackModal.tsx(1 hunks)app/src/hooks/useFeedbackAutoHide.ts(1 hunks)app/src/hooks/useFeedbackModal.ts(1 hunks)app/src/providers/feedbackProvider.tsx(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/hooks/useFeedbackAutoHide.tsapp/src/hooks/useFeedbackModal.tsapp/src/Sentry.web.tsapp/src/Sentry.tsapp/src/components/FeedbackModal.tsxapp/src/providers/feedbackProvider.tsx
🧬 Code Graph Analysis (6)
app/App.tsx (1)
app/src/providers/feedbackProvider.tsx (1)
FeedbackProvider(24-46)
app/src/hooks/useFeedbackModal.ts (2)
app/src/Sentry.web.ts (1)
captureFeedback(18-45)app/src/Sentry.ts (1)
captureFeedback(18-45)
app/src/Sentry.web.ts (1)
app/src/Sentry.ts (2)
captureFeedback(18-45)isSentryDisabled(104-104)
app/src/Sentry.ts (1)
app/src/Sentry.web.ts (2)
captureFeedback(18-45)isSentryDisabled(85-85)
app/src/components/FeedbackModal.tsx (3)
app/src/components/typography/Caption.tsx (1)
Caption(8-21)app/src/utils/colors.ts (5)
white(55-55)black(6-6)slate400(35-35)zinc900(63-63)zinc800(62-62)app/src/utils/fonts.ts (2)
advercase(3-3)dinot(4-4)
app/src/providers/feedbackProvider.tsx (1)
app/src/hooks/useFeedbackModal.ts (2)
FeedbackType(13-13)useFeedbackModal(15-104)
⏰ 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/hooks/useFeedbackAutoHide.ts (1)
13-21: Effect usage is correct and minimal.Good use of
useFocusEffectcleanup to scope the hide behavior to screen blur/unfocus. The empty dependency array is fine since the effect logic is static and doesn’t capture props/state.app/App.tsx (2)
31-33: Provider composition looks good.Wrapping
AppNavigationwithFeedbackProviderinside the existing tree is the right spot for global modal rendering and access throughout navigation.
18-18: Init-time safety: rely on guarded initSentry.
initSentry()is called once at startup; combined withwrapWithSentryexport, this pattern is solid. Just ensure the nativefeedbackIntegrationguard is added per the Sentry.ts comment to avoid init crashes if the SDK lacks it.app/src/providers/feedbackProvider.tsx (1)
24-46: Provider wiring and API look solidNice clean provider abstraction. The error guard in useFeedback is correct, and the modal wiring aligns with the hook’s contract.
app/src/hooks/useFeedbackModal.ts (2)
98-104: Hook API and state management look goodThe visibility control and cleanups are sound, and the 10s auto-hide for the button is implemented safely with proper cleanup.
7-12: Confirmed Sentry Feedback APIs are availableWe’ve verified that the current @sentry/react-native SDK (as of August 2025) indeed exports
showFeedbackWidget,showFeedbackButtonandhideFeedbackButton. No changes to your imports are needed.Please ensure you’ve configured everything according to the docs:
- Wrap your app’s root component with
Sentry.wrap(...)for these APIs to work- Optionally configure the widget via the
feedbackIntegrationinit option- On the new Fabric renderer, React Native 0.71+ is required for the built-in Modal support
- If you’re using a self-hosted Sentry server, upgrade to server v24.4.2+ for full user-feedback functionality
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: 8
🧹 Nitpick comments (5)
app/src/Sentry.ts (1)
82-99: Consider improving feedback integration configuration.The feedback integration setup has some potential issues:
- Hard-coded positioning values: The absolute positioning with
top: 20, right: 20, marginTop: 100may not work well across different screen sizes and orientations.- Missing error handling: The integration setup lacks error handling for cases where the feedback integration might fail to initialize.
Consider making the positioning responsive and adding error handling:
integrations: [ - Sentry.feedbackIntegration({ - buttonOptions: { - styles: { - triggerButton: { - position: 'absolute', - top: 20, - right: 20, - bottom: undefined, - marginTop: 100, - }, - }, - }, - enableTakeScreenshot: true, - namePlaceholder: 'Fullname', - emailPlaceholder: 'Email', - }), + Sentry.feedbackIntegration({ + buttonOptions: { + styles: { + triggerButton: { + position: 'absolute', + top: '5%', + right: '5%', + bottom: undefined, + }, + }, + }, + enableTakeScreenshot: true, + namePlaceholder: 'Full Name', + emailPlaceholder: 'Email Address', + onFormOpen: () => console.log('Feedback form opened'), + onFormClose: () => console.log('Feedback form closed'), + }), ],app/src/providers/feedbackProvider.tsx (1)
48-50: Move interface definition above component for better readability.Following TypeScript conventions, interface definitions should typically appear before their usage in components.
+interface FeedbackProviderProps { + children: ReactNode; +} + export const FeedbackProvider: React.FC<FeedbackProviderProps> = ({ children, }) => { // ... component implementation }; -interface FeedbackProviderProps { - children: ReactNode; -}app/src/components/FeedbackModal.tsx (2)
94-101: Improve accessibility of action buttons.Add accessibility labels so screen reader users know what buttons do.
Apply this diff:
<Button size="$2" variant="outlined" onPress={handleClose} disabled={isSubmitting} + accessibilityLabel="Close feedback dialog" > ✕ </Button> @@ <Button size="$4" backgroundColor={white} color={black} onPress={handleSubmit} disabled={isSubmitting || !feedback.trim()} + accessibilityLabel="Submit feedback" > {isSubmitting ? 'Submitting...' : 'Submit Feedback'} </Button>Also applies to: 166-174
130-147: Polish text inputs for better UX on mobile (keyboard + semantics).
- Name: capitalize words and hint the platform it’s a name field.
- Email: disable autocorrect, hint email content type, set dark keyboard.
- Feedback: set dark keyboard and consider a reasonable max length to avoid excessively large payloads.
Apply this diff:
<TextInput style={[styles.textInput, { flex: 1, minHeight: 48 }]} placeholder="Name" placeholderTextColor={slate400} value={name} onChangeText={setName} editable={!isSubmitting} + autoCapitalize="words" + textContentType="name" + keyboardAppearance="dark" /> <TextInput style={[styles.textInput, { flex: 1, minHeight: 48 }]} placeholder="Email" placeholderTextColor={slate400} value={email} onChangeText={setEmail} keyboardType="email-address" autoCapitalize="none" editable={!isSubmitting} + autoCorrect={false} + textContentType="emailAddress" + keyboardAppearance="dark" /> @@ <TextInput style={styles.textInput} placeholder="Tell us what you think, report a bug, or suggest a feature..." placeholderTextColor={slate400} value={feedback} onChangeText={setFeedback} multiline numberOfLines={6} textAlignVertical="top" editable={!isSubmitting} + keyboardAppearance="dark" + maxLength={2000} />Also applies to: 153-163
app/src/hooks/useFeedbackModal.ts (1)
25-46: Optional: make auto-hide configurable and cancel-safe.10s is reasonable, but exposing it as an optional parameter can make this more flexible for different surfaces (marketing screens vs. settings).
Example:
- Extend
showFeedbackModal(type, opts?: { autoHideMs?: number }).- Use
opts?.autoHideMs ?? 10000insetTimeout.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
app/App.tsx(2 hunks)app/src/Sentry.ts(2 hunks)app/src/Sentry.web.ts(1 hunks)app/src/components/FeedbackModal.tsx(1 hunks)app/src/hooks/useFeedbackAutoHide.ts(1 hunks)app/src/hooks/useFeedbackModal.ts(1 hunks)app/src/providers/feedbackProvider.tsx(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/Sentry.web.tsapp/src/hooks/useFeedbackAutoHide.tsapp/src/hooks/useFeedbackModal.tsapp/src/components/FeedbackModal.tsxapp/src/providers/feedbackProvider.tsxapp/src/Sentry.ts
🧬 Code Graph Analysis (6)
app/App.tsx (1)
app/src/providers/feedbackProvider.tsx (1)
FeedbackProvider(24-46)
app/src/Sentry.web.ts (1)
app/src/Sentry.ts (1)
isSentryDisabled(104-104)
app/src/hooks/useFeedbackModal.ts (2)
app/src/Sentry.ts (1)
captureFeedback(18-45)app/src/Sentry.web.ts (1)
captureFeedback(18-45)
app/src/components/FeedbackModal.tsx (3)
app/src/components/typography/Caption.tsx (1)
Caption(8-21)app/src/utils/colors.ts (5)
white(55-55)black(6-6)slate400(35-35)zinc900(63-63)zinc800(62-62)app/src/utils/fonts.ts (2)
advercase(3-3)dinot(4-4)
app/src/providers/feedbackProvider.tsx (1)
app/src/hooks/useFeedbackModal.ts (2)
FeedbackType(13-13)useFeedbackModal(15-104)
app/src/Sentry.ts (1)
app/src/Sentry.web.ts (1)
isSentryDisabled(85-85)
🔇 Additional comments (8)
app/src/hooks/useFeedbackAutoHide.ts (1)
1-23: LGTM! Clean implementation of auto-hide feedback functionality.The hook correctly uses
useFocusEffectto manage Sentry feedback button visibility on navigation changes. The implementation follows React Navigation patterns and properly cleans up by hiding the feedback button when the screen loses focus.app/src/Sentry.ts (1)
18-45: LGTM! Well-structured feedback capture implementation.The
captureFeedbackfunction follows the established pattern from other Sentry capture functions with proper guard checks and structured metadata. The implementation correctly passes context data to Sentry with appropriate defaults.app/App.tsx (2)
12-12: LGTM! Proper import addition.The import follows the established pattern for other providers in the file.
31-33: LGTM! Correct provider hierarchy placement.The
FeedbackProvideris appropriately positioned in the provider tree, nested withinNotificationTrackingProviderand wrappingAppNavigation. This ensures the feedback functionality is available throughout the app while maintaining proper provider hierarchy.app/src/Sentry.web.ts (1)
18-45: LGTM! Consistent cross-platform implementation.The
captureFeedbackfunction mirrors the React Native implementation perfectly, maintaining API consistency between platforms. The guard check, parameter handling, and Sentry integration follow the established patterns.app/src/providers/feedbackProvider.tsx (3)
10-18: LGTM! Well-defined context interface.The
FeedbackContextTypeinterface properly defines the public API for the feedback system with clear method signatures and appropriate TypeScript types.
24-46: LGTM! Solid provider implementation with proper integration.The provider correctly:
- Uses the
useFeedbackModalhook to manage state- Exposes only the necessary methods through context
- Renders the
FeedbackModalwith proper props binding- Follows React context patterns effectively
The integration with the underlying hook and modal component is well-structured.
52-58: LGTM! Proper context hook implementation.The
useFeedbackhook follows React context best practices with appropriate error handling for usage outside the provider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (6)
app/src/Sentry.web.ts (1)
18-45: Type the feedback context, de-duplicate tag computation, and forward extra/user to captureContextCurrent implementation repeats tag building and loses structured metadata. Introduce a typed FeedbackContext, compute tags once, and forward context.extra and user info to captureContext for parity with native and better observability.
Apply this diff:
+type FeedbackContext = { + name?: string; + email?: string; + category?: string; + source?: string; + extra?: Record<string, unknown>; +}; + export const captureFeedback = ( feedback: string, - context?: Record<string, any>, + context?: FeedbackContext, ) => { if (isSentryDisabled) { return; } - Sentry.captureFeedback( + const tags = { + category: context?.category ?? 'general', + source: context?.source ?? 'feedback_modal', + }; + + Sentry.captureFeedback( { message: feedback, name: context?.name, email: context?.email, - tags: { - category: context?.category || 'general', - source: context?.source || 'feedback_modal', - }, + tags, }, { - captureContext: { - tags: { - category: context?.category || 'general', - source: context?.source || 'feedback_modal', - }, - }, + captureContext: { + tags, + extra: context?.extra, + user: + context?.email || context?.name + ? { email: context?.email, username: context?.name } + : undefined, + }, }, ); };app/src/hooks/useFeedbackModal.ts (5)
8-12: Decouple Sentry UI controls behind our Sentry wrapper for portabilityImport show/hide APIs from our local Sentry modules so platform differences are centralized.
-import { - hideFeedbackButton, - showFeedbackButton, - showFeedbackWidget, -} from '@sentry/react-native'; +import { + hideFeedbackButton, + showFeedbackButton, + showFeedbackWidget, +} from '../Sentry';If not already present, add the wrapper functions to app/src/Sentry.ts and app/src/Sentry.web.ts using typeof-guards and try/catch to no-op where unsupported.
17-17: Use cross‑platform timer typeNodeJS.Timeout is not portable in RN/web. Prefer ReturnType.
- const timeoutRef = useRef<NodeJS.Timeout | null>(null); + const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
86-112: Close on success and propagate failures to callersSubmit path should hide UI on success and rethrow errors so the UI can react (toast, retry, etc.).
const submitFeedback = useCallback( async ( feedback: string, category: string, name?: string, email?: string, ) => { try { - captureFeedback(feedback, { + captureFeedback(feedback, { category, source: 'feedback_modal', name, email, extra: { feedback, category, name, email, timestamp: new Date().toISOString(), }, }); + // Close button/modal if open + hideFeedbackModal(); } catch (error) { console.error('Failed to submit feedback:', error); + throw error; } }, - [], + [hideFeedbackModal], );
86-106: Forward extra context into captureContext in platform wrappersYou attach extra metadata here, but Sentry captureFeedback currently drops it. Update Sentry.ts and Sentry.web.ts to pass captureContext.extra and user info.
See the Sentry.web.ts diff in this review; mirror the same in app/src/Sentry.ts.
55-64: Implement Manual Control for the Sentry Feedback WidgetSince the React Native Sentry SDK does not expose any API to programmatically dismiss its native feedback UI, you’ll need to manage the widget’s mounting yourself. In practice this means:
- Introduce an
isWidgetVisiblestate alongside your existingisVisible.- In your
showFeedbackModal(...), setisWidgetVisible = true; inhideFeedbackModal(), setisWidgetVisible = false(in addition to your existing cleanup).- Return or expose a
<FeedbackWidget />component from the hook that renders only whenisWidgetVisibleis true.- Wire the widget’s
onFormCloseandonFormSubmittedcallbacks to invokehideFeedbackModal(), ensuring the widget unmounts when the user finishes or cancels.Example outline:
--- a/app/src/hooks/useFeedbackModal.ts +++ b/app/src/hooks/useFeedbackModal.ts @@ -10,6 +10,7 @@ export function useFeedbackModal() { const [isVisible, setIsVisible] = useState(false); + const [isWidgetVisible, setIsWidgetVisible] = useState(false); const timeoutRef = useRef<NodeJS.Timeout | null>(null); const showFeedbackModal = useCallback((type: FeedbackType) => { + setIsWidgetVisible(type === 'widget'); setIsVisible(true); // …existing timer setup… }, []); @@ -55,10 +56,13 @@ export function useFeedbackModal() { const hideFeedbackModal = useCallback(() => { if (timeoutRef.current) { clearTimeout(timeoutRef.current); timeoutRef.current = null; } - hideFeedbackButton(); - setIsVisible(false); + hideFeedbackButton(); + setIsWidgetVisible(false); + setIsVisible(false); }, []); + const FeedbackWidget = () => + isWidgetVisible ? ( + <Sentry.FeedbackWidget onFormClose={hideFeedbackModal} onFormSubmitted={hideFeedbackModal} /> + ) : null;• By unmounting the widget yourself, you regain full control over its visibility.
• Confirmed there’s no built-in “dismiss” API in@sentry/react-nativefor the native feedback dialog.
🧹 Nitpick comments (9)
app/src/Sentry.web.ts (2)
81-98: Tighten feedback button positioning styles to avoid layout quirksUsing position: 'absolute' with both top and marginTop can yield inconsistent placement across browsers and overlays. Prefer fixed positioning and drop redundant properties.
Sentry.feedbackIntegration({ buttonOptions: { styles: { triggerButton: { - position: 'absolute', - top: 20, - right: 20, - bottom: undefined, - marginTop: 100, + position: 'fixed', + top: 20, + right: 20, + zIndex: 10000, }, }, },
73-80: PII policy check: feedback name/email fields are not scrubbed by beforeSendbeforeSend removes user.id and user.ip_address, but feedback payload fields name and email are separate and will still be transmitted. Confirm this aligns with your privacy posture (it often does for explicit feedback flows). If you intend to scrub them too, handle it here.
Possible scrub:
beforeSend(event) { - // Remove PII data + // Remove PII data if (event.user) { event.user.ip_address = undefined; event.user.id = undefined; + event.user.email = undefined; + event.user.username = undefined; } return event; },app/src/screens/passport/PassportNFCScanScreen.tsx (3)
146-160: Minor: avoid passing a no-op onModalDismiss; omit when unusedPassing an empty callback adds noise. The param is optional; let it be undefined.
const openErrorModal = useCallback( (message: string) => { showModal({ titleText: 'NFC Scan Error', bodyText: message, buttonText: 'Send Feedback', secondaryButtonText: 'Help', preventDismiss: false, onButtonPress: () => sendFeedbackEmail(message), onSecondaryButtonPress: goToNFCTrouble, - onModalDismiss: () => {}, }); }, [showModal, goToNFCTrouble, sendFeedbackEmail], );
81-81: Fix Biome lint: avoid empty object destructuringThe component doesn’t use props; remove the empty pattern or name it explicitly.
-const PassportNFCScanScreen: React.FC<PassportNFCScanScreenProps> = ({}) => { +const PassportNFCScanScreen: React.FC<PassportNFCScanScreenProps> = () => {
139-144: Optional: check mail handler availability before openingOn some devices, no mail client is configured. Use Linking.canOpenURL to fail gracefully and maybe fall back to in-app feedback.
- await Linking.openURL( + const url = `mailto:${emailFeedback}?subject=${encodeURIComponent( subject, )}&body=${encodeURIComponent(body)}`, - ); + if (await Linking.canOpenURL(url)) { + await Linking.openURL(url); + } else { + // Consider falling back to Sentry.captureFeedback here + console.warn('No email client available'); + }app/src/components/FeedbackModalScreen.tsx (2)
93-99: Android: always provide onRequestClose; no-op when preventDismiss is trueAndroid requires onRequestClose. Passing undefined can cause warnings. Provide a stable no-op when preventDismiss is true.
<Modal visible={visible} animationType="fade" transparent={true} - onRequestClose={modalParams.preventDismiss ? undefined : onClose} + onRequestClose={modalParams.preventDismiss ? () => {} : onClose} >
50-66: Prevent double-submits by disabling primary action while awaitingRapid taps can trigger multiple submissions. Track a local submitting state to disable the button until the callback resolves.
- const onButtonPressed = useCallback(async () => { + const [submitting, setSubmitting] = React.useState(false); + const onButtonPressed = useCallback(async () => { confirmTap(); if (!modalParams || !modalParams.onButtonPress) { console.warn('Modal params not found or onButtonPress not defined'); return; } try { - await modalParams.onButtonPress(); + if (submitting) return; + setSubmitting(true); + await modalParams.onButtonPress(); } catch (callbackError) { console.error('Callback error:', callbackError); } finally { + setSubmitting(false); onHideModal?.(); } - }, [modalParams, onHideModal]); + }, [modalParams, onHideModal, submitting]);And wire it to the button:
- <PrimaryButton onPress={onButtonPressed}> + <PrimaryButton onPress={onButtonPressed} disabled={submitting}>app/src/hooks/useFeedbackModal.ts (2)
23-53: Clarify modal type handling and avoid a no-op branchThe 'modal' case currently does nothing. Either remove 'modal' from the union or wire it to showModal with default params.
Example:
- case 'modal': - break; + case 'modal': + // optionally supply reasonable defaults or require caller to pass params via showModal() + setIsModalVisible(true); + break;
45-52: Avoid magic numbers for auto-hide; use a constantImproves readability and reuse across call sites.
+ const FEEDBACK_BUTTON_HIDE_MS = 10_000; // we can close the feedback modals(sentry and custom modals), but can't do so for the Feedback button. // This hides the button after 10 seconds. if (type === 'button') { - timeoutRef.current = setTimeout(() => { + timeoutRef.current = setTimeout(() => { hideFeedbackButton(); timeoutRef.current = null; - }, 10000); + }, FEEDBACK_BUTTON_HIDE_MS); }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (6)
app/src/Sentry.web.ts(2 hunks)app/src/components/FeedbackModal.tsx(1 hunks)app/src/components/FeedbackModalScreen.tsx(1 hunks)app/src/hooks/useFeedbackModal.ts(1 hunks)app/src/providers/feedbackProvider.tsx(1 hunks)app/src/screens/passport/PassportNFCScanScreen.tsx(4 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- app/src/providers/feedbackProvider.tsx
- app/src/components/FeedbackModal.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/components/FeedbackModalScreen.tsxapp/src/screens/passport/PassportNFCScanScreen.tsxapp/src/Sentry.web.tsapp/src/hooks/useFeedbackModal.ts
🧬 Code graph analysis (4)
app/src/components/FeedbackModalScreen.tsx (5)
app/src/utils/haptic/index.ts (2)
confirmTap(18-18)impactLight(11-11)app/src/utils/colors.ts (1)
white(55-55)app/src/components/typography/Title.tsx (1)
Title(8-27)app/src/components/buttons/PrimaryButton.tsx (1)
PrimaryButton(10-30)app/src/components/buttons/SecondaryButton.tsx (1)
SecondaryButton(10-30)
app/src/screens/passport/PassportNFCScanScreen.tsx (1)
app/src/providers/feedbackProvider.tsx (1)
useFeedback(70-76)
app/src/Sentry.web.ts (1)
app/src/Sentry.ts (2)
captureFeedback(18-45)isSentryDisabled(104-104)
app/src/hooks/useFeedbackModal.ts (2)
app/src/components/FeedbackModalScreen.tsx (1)
FeedbackModalScreenParams(28-37)app/src/Sentry.ts (1)
captureFeedback(18-45)
🪛 Biome (2.1.2)
app/src/screens/passport/PassportNFCScanScreen.tsx
[error] 81-81: Unexpected empty object pattern.
(lint/correctness/noEmptyPattern)
⏰ 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 (1)
app/src/screens/passport/PassportNFCScanScreen.tsx (1)
21-21: resolveJsonModule configuration confirmedAll project-level TypeScript configurations explicitly enable JSON module resolution, so importing
versionfrompackage.jsoninPassportNFCScanScreen.tsxis safe.• app/tsconfig.json –
"resolveJsonModule": true(line 6)
• circuits/tsconfig.json –"resolveJsonModule": true(line 3)
• common/tsconfig.json –"resolveJsonModule": true(line 12)
• contracts/tsconfig.json –"resolveJsonModule": true(line 9)
• sdk/core/tsconfig.json –"resolveJsonModule": true(line 12)
• sdk/qrcode/tsconfig.json –"resolveJsonModule": true(line 12)No changes needed here.
118cd60 to
c2cf52c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (7)
app/src/hooks/useFeedbackAutoHide.ts (1)
6-6: Guard Sentry API or bump SDK to v7+: prevent runtime crashes if hideFeedbackButton is undefinedEchoing the earlier review: if your project still uses @sentry/react-native < 7.0.0, hideFeedbackButton is not available and this cleanup will crash on blur/unmount. Either upgrade to v7+ or guard the call.
Proposed guard:
// When screen goes out of focus, hide the feedback button return () => { - hideFeedbackButton(); + if (typeof hideFeedbackButton === 'function') { + hideFeedbackButton(); + } };To verify the installed version(s), run:
#!/bin/bash # Show all declared versions of @sentry/react-native across the repo for f in $(fd -H -t f package.json); do v=$(jq -r '.dependencies["@sentry/react-native"], .devDependencies["@sentry/react-native"]' "$f" | sed '/null/d') if [ -n "$v" ]; then echo "$f: $v"; fi doneAlso applies to: 18-20
app/src/screens/passport/PassportNFCScanScreen.tsx (1)
115-131: Fix type mismatch for timestamp and guard locale formatting (prevents “en-undefined” and non-deterministic Date).
deviceInfois asserted as [string, string][], buttsis a Date object andlocalescan render-undefined. Convert timestamp to ISO and preferlanguageTagwith a safe fallback.Apply this diff:
const sendFeedbackEmail = useCallback(async (message: string) => { const subject = 'SELF App Feedback'; const deviceInfo = [ ['device', `${Platform.OS}@${Platform.Version}`], ['app', `v${version}`], [ 'locales', - getLocales() - .map(locale => `${locale.languageCode}-${locale.countryCode}`) - .join(','), + getLocales() + .map(locale => + // Prefer languageTag; else join defined parts only + // react-native-localize may omit countryCode + (locale as any).languageTag ?? + [locale.languageCode, locale.countryCode].filter(Boolean).join('-'), + ) + .join(','), ], ['country', getCountry()], ['tz', getTimeZone()], - ['ts', new Date()], + ['ts', new Date().toISOString()], ['origin', 'passport/nfc'], ['error', message], ] as [string, string][]; const body = ` --- ${deviceInfo.map(([k, v]) => `${k}=${v}`).join('\n')} ---`; await Linking.openURL( `mailto:${emailFeedback}?subject=${encodeURIComponent( subject, )}&body=${encodeURIComponent(body)}`, ); }, []);Also applies to: 133-141
app/src/hooks/useFeedbackModal.ts (5)
8-12: Decouple Sentry UI controls behind our Sentry wrapper to avoid web/runtime coupling.Importing from @sentry/react-native directly will break web builds and ties us to SDK surface changes. Use our local Sentry wrapper instead.
Apply this diff:
-import { - hideFeedbackButton, - showFeedbackButton, - showFeedbackWidget, -} from '@sentry/react-native'; +import { + hideFeedbackButton, + showFeedbackButton, + showFeedbackWidget, +} from '../Sentry';And ensure these no-op guarded wrappers exist in app/src/Sentry.ts and app/src/Sentry.web.ts:
// Sentry.ts / Sentry.web.ts additions (outside this file) export const showFeedbackButton = () => { try { // @ts-ignore typeof (Sentry as any).showFeedbackButton === 'function' && (Sentry as any).showFeedbackButton(); } catch {} }; export const hideFeedbackButton = () => { try { // @ts-ignore typeof (Sentry as any).hideFeedbackButton === 'function' && (Sentry as any).hideFeedbackButton(); } catch {} }; export const showFeedbackWidget = () => { try { // @ts-ignore typeof (Sentry as any).showFeedbackWidget === 'function' && (Sentry as any).showFeedbackWidget(); } catch {} };
17-17: Use cross‑platform timer type to prevent RN/Web type errors.NodeJS.Timeout is not portable; use ReturnType.
- const timeoutRef = useRef<NodeJS.Timeout | null>(null); + const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
29-36: Sentry widget cannot be programmatically hidden; hideFeedbackModal currently leaves it open.
showFeedbackWidget()has no documented inverse in RN; yourhideFeedbackModal()won’t close it, causing a stuck overlay after showing the widget.Two viable options:
- Preferred: Control the widget via state and render/unmount the SDK’s FeedbackWidget component yourself; unmount on close/submitted.
- Minimal: Avoid the 'widget' path for now (feature-gate to native only or no-op on platforms without a hide API).
If you choose the preferred path, I can provide a patch to add isWidgetVisible state and expose a render function that mounts .
Also applies to: 55-64
85-112: Close the custom modal after successful submission and propagate failures.Currently the custom modal stays open and errors are swallowed. Close on success and rethrow to let the UI surface failures.
const submitFeedback = useCallback( async ( feedback: string, category: string, name?: string, email?: string, ) => { try { - captureFeedback(feedback, { + captureFeedback(feedback, { category, source: 'feedback_modal', name, email, extra: { feedback, category, name, email, timestamp: new Date().toISOString(), }, }); + // Close any visible custom feedback UI + hideFeedbackModal(); } catch (error) { console.error('Failed to submit feedback:', error); - } + throw error; // Let callers show an error/toast + } }, - [], + [hideFeedbackModal], );
6-6: Forward structured “extra” context (and optional user) to Sentry.Your hook prepares an extra payload, but our Sentry.captureFeedback currently drops it. Update Sentry.ts (and Sentry.web.ts) to include captureContext.extra and user.
Outside this file, change app/src/Sentry.ts (and .web.ts):
Sentry.captureFeedback( { message: feedback, name: context?.name, email: context?.email, tags: { category: context?.category || 'general', source: context?.source || 'feedback_modal', }, }, { captureContext: { tags: { category: context?.category || 'general', source: context?.source || 'feedback_modal', }, + extra: context?.extra, + user: + context?.email || context?.name + ? { email: context?.email, username: context?.name } + : undefined, }, }, );
🧹 Nitpick comments (1)
app/src/hooks/useFeedbackAutoHide.ts (1)
12-23: Confirm UX intent: hiding the global Feedback button on every blur may leave it hidden for subsequent screensThis hook never shows the button on focus, only hides on blur. Because the Sentry Feedback button is global, a blur on Screen A will hide it for Screen B unless B explicitly shows it. If that’s intended, all good; otherwise consider a symmetric show on focus or centralize visibility control (e.g., provider-level state or route whitelist) to avoid accidental “permanently hidden” states.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (9)
app/App.tsx(2 hunks)app/src/Sentry.ts(2 hunks)app/src/Sentry.web.ts(2 hunks)app/src/components/FeedbackModal.tsx(1 hunks)app/src/components/FeedbackModalScreen.tsx(1 hunks)app/src/hooks/useFeedbackAutoHide.ts(1 hunks)app/src/hooks/useFeedbackModal.ts(1 hunks)app/src/providers/feedbackProvider.tsx(1 hunks)app/src/screens/passport/PassportNFCScanScreen.tsx(5 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
- app/src/Sentry.web.ts
- app/src/Sentry.ts
- app/src/components/FeedbackModal.tsx
- app/App.tsx
- app/src/components/FeedbackModalScreen.tsx
- app/src/providers/feedbackProvider.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/passport/PassportNFCScanScreen.tsxapp/src/hooks/useFeedbackAutoHide.tsapp/src/hooks/useFeedbackModal.ts
🧬 Code graph analysis (2)
app/src/screens/passport/PassportNFCScanScreen.tsx (1)
app/src/providers/feedbackProvider.tsx (1)
useFeedback(70-76)
app/src/hooks/useFeedbackModal.ts (2)
app/src/components/FeedbackModalScreen.tsx (1)
FeedbackModalScreenParams(28-37)app/src/Sentry.ts (1)
captureFeedback(18-45)
🪛 GitHub Check: lint
app/src/hooks/useFeedbackAutoHide.ts
[failure] 3-3:
Run autofix to sort these imports!
app/src/hooks/useFeedbackModal.ts
[failure] 3-3:
Run autofix to sort these imports!
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: analyze-android
- GitHub Check: analyze-ios
- GitHub Check: e2e-ios
- GitHub Check: test
- GitHub Check: build
🔇 Additional comments (3)
app/src/hooks/useFeedbackAutoHide.ts (1)
3-6: Fix CI lint failure: sort importsThe lint job flagged unsorted imports. Sorting will unblock CI and keep consistency.
One possible ordering (apply your repo’s import-sort rules or run lint --fix):
-import { useCallback } from 'react'; - -import { useFocusEffect } from '@react-navigation/native'; -import { hideFeedbackButton } from '@sentry/react-native'; +import { useFocusEffect } from '@react-navigation/native'; +import { hideFeedbackButton } from '@sentry/react-native'; +import { useCallback } from 'react';app/src/screens/passport/PassportNFCScanScreen.tsx (1)
146-156: Modal wiring looks correct.The switch to FeedbackProvider.showModal with an async onButtonPress path is clean and keeps navigation concerns out of the screen.
Also applies to: 82-83
app/src/hooks/useFeedbackModal.ts (1)
3-3: ESLint autofix failed due to Yarn version mismatchThe import order in app/src/hooks/useFeedbackModal.ts still needs sorting, but the autofix step didn’t run because the project requires Yarn 4.6.0 via Corepack. Please enable Corepack and re-run ESLint:
• Enable Corepack to use the declared Yarn version
corepack enable• Install dependencies with immutable flag
yarn install --immutable• Apply the autofix to sort imports
yarn eslint --fix app/src/hooks/useFeedbackModal.tsOnce the imports are sorted, commit the changes and verify that the CI lint step passes.
|
@coderabbitai full review can you also please close comments that have been resolved |
|
@transphorm I'll conduct a full review of the Sentry feedback implementation and resolve any comments that have been addressed. ✅ Actions performedComments resolved. Full review triggered. |
|
@coderabbitai full review and full summary |
|
@transphorm I'll conduct a comprehensive full review of the Sentry feedback implementation and regenerate the PR summary to ensure it captures all the changes accurately. ✅ Actions performedSummary regeneration triggered. |
* feat: show feedback widget on NFC scan issues * fix ref
|
@coderabbitai full summary |
|
@transphorm I'll regenerate a comprehensive summary for this PR that captures all the Sentry feedback implementation changes across the codebase. ✅ Actions performedSummary regeneration triggered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
♻️ Duplicate comments (1)
app/src/screens/passport/PassportNFCScanScreen.tsx (1)
128-145: Fix deviceInfo typing and make timestamp deterministic; harden locale formatting
deviceInfois asserted as[string, string][]but adds aDateobject, and locale strings can include-undefined. Convert to ISO and preferlanguageTagwith a safe fallback. This was already flagged earlier; reproducing the concrete fix below.[ 'locales', getLocales() - .map(locale => `${locale.languageCode}-${locale.countryCode}`) + .map(locale => + // Prefer BCP‑47 tag; fallback to language-country when present + (locale as any).languageTag ?? + [locale.languageCode, locale.countryCode].filter(Boolean).join('-'), + ) .join(','), ], ['country', getCountry()], ['tz', getTimeZone()], - ['ts', new Date()], + ['ts', new Date().toISOString()], ['origin', 'passport/nfc'], ['error', message],
🧹 Nitpick comments (3)
app/src/screens/passport/PassportNFCTroubleScreen.tsx (2)
10-10: Auto-hide only mentions the “feedback button”; ensure the web widget overlay is also closed on blur.
useFeedbackAutoHidecleans up the floating button on unfocus, but the Sentry Web “widget” (modal/iframe overlay) can persist across navigation if not explicitly closed. This can leak context across screens and degrade UX.
- Verify that navigating away from this screen closes any open Sentry widget on web.
- If not, extend
useFeedbackAutoHide(or the provider) to also close the widget overlay on blur.Example approach (conceptual; adjust to your actual APIs):
// app/src/hooks/useFeedbackAutoHide.ts useFocusEffect( useCallback(() => { return () => { hideFeedbackButton(); // New: ensure the overlay is closed too (web) closeFeedbackWidget?.(); }; }, []), );If there isn’t a
closeFeedbackWidget, expose a generichideFeedbackSurface()from the provider that no-ops on native and closes the overlay on web.Also applies to: 52-52
91-93: Gate feedback mode by platform to avoid web-only widget usage on native.If
showFeedbackModal('widget')is web-specific, gate it to use the native-friendly mode (e.g.,'button') on Android/iOS. This prevents runtime mismatches and keeps UX consistent.Apply this diff here, plus add the import shown below:
- <Button onPress={() => showFeedbackModal('widget')}> + <Button onPress={() => showFeedbackModal(Platform.OS === 'web' ? 'widget' : 'button')}> Report issue </Button>Add the import at the top of the file:
import { Gesture, GestureDetector } from 'react-native-gesture-handler'; +import { Platform } from 'react-native';If your provider already auto-selects the correct surface by platform, ignore this and consider adding a comment for clarity.
app/src/screens/passport/PassportNFCScanScreen.tsx (1)
223-227: Avoid double overlays: don’t auto-open the Sentry widget when an error modal is already shownTriggering both a custom error modal and the Sentry widget can overlap/conflict and confuse users. Prefer a single surface: keep the modal with a “Send Feedback” action, and show the widget only on explicit user action or when email fallback fails.
Option A (recommended): remove the auto
showFeedbackModal('widget')calls here and rely on the modal button or email-fallback to surface the widget.- showFeedbackModal('widget');- showFeedbackModal('widget');If UX requires auto-showing the widget, ensure it presents as a floating button that doesn’t obscure the modal, and gate repeated calls with an idempotent flag (e.g.,
widgetVisibleRef).Also applies to: 337-338
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
app/Gemfile.lockis excluded by!**/*.lock
📒 Files selected for processing (7)
app/src/components/FeedbackModal.tsx(1 hunks)app/src/components/FeedbackModalScreen.tsx(1 hunks)app/src/hooks/useFeedbackAutoHide.ts(1 hunks)app/src/hooks/useFeedbackModal.ts(1 hunks)app/src/providers/feedbackProvider.tsx(1 hunks)app/src/screens/passport/PassportNFCScanScreen.tsx(11 hunks)app/src/screens/passport/PassportNFCTroubleScreen.tsx(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
- app/src/hooks/useFeedbackAutoHide.ts
- app/src/components/FeedbackModalScreen.tsx
- app/src/hooks/useFeedbackModal.ts
- app/src/components/FeedbackModal.tsx
- app/src/providers/feedbackProvider.tsx
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/technical-specification.mdc)
**/*.{ts,tsx}: Define IdentityCommitment with fields: commitment (Poseidon hash), nullifier (domain-separated), timestamp (UTC number), version (circuit version), documentType ('passport' | 'eu_id_card')
Define DSCKeyCommitment with fields: publicKeyHash (Poseidon hash), certificateChain (hashes), revocationStatus (boolean), issuer (country code)
Define VerificationConfig with fields: circuitVersion (semver), complianceRules array, timeWindow (seconds, 24h), clockDrift (±5 min), trustAnchors, revocationRoots, timeSource (NTP), nullifierScope (domain separation)
Files:
app/src/screens/passport/PassportNFCTroubleScreen.tsxapp/src/screens/passport/PassportNFCScanScreen.tsx
app/src/**/*.{ts,tsx,js,jsx}
⚙️ CodeRabbit configuration file
app/src/**/*.{ts,tsx,js,jsx}: Review React Native TypeScript code for:
- Component architecture and reusability
- State management patterns
- Performance optimizations
- TypeScript type safety
- React hooks usage and dependencies
- Navigation patterns
Files:
app/src/screens/passport/PassportNFCTroubleScreen.tsxapp/src/screens/passport/PassportNFCScanScreen.tsx
🧠 Learnings (3)
📚 Learning: 2025-08-24T18:52:25.766Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.766Z
Learning: Use custom hooks for complex state (useModal, useHapticNavigation)
Applied to files:
app/src/screens/passport/PassportNFCTroubleScreen.tsxapp/src/screens/passport/PassportNFCScanScreen.tsx
📚 Learning: 2025-08-24T18:52:25.766Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.766Z
Learning: Integrate haptic feedback via useHapticNavigation
Applied to files:
app/src/screens/passport/PassportNFCTroubleScreen.tsxapp/src/screens/passport/PassportNFCScanScreen.tsx
📚 Learning: 2025-08-24T18:52:25.765Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.765Z
Learning: Applies to native/ios/**/*.{swift} : iOS NFC: implement custom PassportReader as a Swift module
Applied to files:
app/src/screens/passport/PassportNFCScanScreen.tsx
🧬 Code graph analysis (2)
app/src/screens/passport/PassportNFCTroubleScreen.tsx (2)
app/src/providers/feedbackProvider.tsx (1)
useFeedback(70-76)app/src/hooks/useFeedbackAutoHide.ts (1)
useFeedbackAutoHide(11-22)
app/src/screens/passport/PassportNFCScanScreen.tsx (4)
app/src/providers/feedbackProvider.tsx (1)
useFeedback(70-76)app/src/hooks/useFeedbackAutoHide.ts (1)
useFeedbackAutoHide(11-22)app/src/consts/analytics.ts (1)
PassportEvents(84-103)app/src/utils/nfcScanner.ts (5)
setModalProofStep(14-47)setModalProofStep(49-79)setModalProofStep(81-114)response(116-185)response(187-262)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build-ios
- GitHub Check: e2e-ios
🔇 Additional comments (5)
app/src/screens/passport/PassportNFCTroubleScreen.tsx (2)
5-5: LGTM: UI imports are appropriate for the new feedback affordance.Importing Button and YStack from tamagui is consistent with the codebase’s UI stack.
13-13: Confirm cross-platform widget support & PII safetyPlease verify the following before merging:
• showFeedbackModal already accepts
'widget'alongside'button'and'custom'in useFeedbackModal (app/src/hooks/useFeedbackModal.ts).
• On web builds, callingshowFeedbackWidget()(from@sentry/react-native) may fail—wrap everyshowFeedbackModal('widget')in a platform guard:
– PassportNFCTroubleScreen.tsx @ line 91
– PassportNFCScanScreen.tsx @ lines 158, 225, 337• The feedback flow uses
captureFeedback(feedback, { category, source }), so only user-entered text plus those two fields go to Sentry—no MRZ/raw NFC or passport numbers are attached.
• Double-check thatFeedbackModalScreenParams(the props passed into your custom modal) doesn’t include any PII (passport fields, MRZ, NFC payloads).Suggested diff for each screen:
-import { showFeedbackModal } from '@/providers/feedbackProvider'; +import { Platform } from 'react-native'; +import { showFeedbackModal } from '@/providers/feedbackProvider'; // … -<Button onPress={() => showFeedbackModal('widget')}> +<Button + onPress={() => { + if (Platform.OS !== 'web') { + showFeedbackModal('widget'); + } else { + captureFeedback('Issue report (web)', { + category: 'passport_nfc', + source: 'feedback_web', + }); + } + }} +>app/src/screens/passport/PassportNFCScanScreen.tsx (3)
106-115: Good lifecycle hygiene: timer cleanup on unmount/blurSolid work clearing
scanTimeoutRefon unmount and when the screen blurs. This prevents orphaned timers and stray UI transitions.Also applies to: 424-439
36-36: Nice touch: auto-hide feedback affordance on screen blurIntegrating
useFeedbackAutoHide()keeps the UI tidy when navigating away.Also applies to: 85-85
157-160: Report-issue affordance is discoverable and non-intrusiveThe header “Report issue” action cleanly routes into the feedback flow without blocking task progress.
Also applies to: 497-511
| await Linking.openURL( | ||
| `mailto:${emailFeedback}?subject=${encodeURIComponent( | ||
| subject, | ||
| )}&body=${encodeURIComponent(body)}`, | ||
| ); | ||
| }, []); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Harden email flow: guard with canOpenURL and add fallback to Sentry widget
Linking.openURL(mailto:) can fail (no mail client, device policy, simulator). Guard with canOpenURL and fall back to showFeedbackModal('widget') so users always have a feedback path.
- await Linking.openURL(
- `mailto:${emailFeedback}?subject=${encodeURIComponent(
- subject,
- )}&body=${encodeURIComponent(body)}`,
- );
- }, []);
+ const url = `mailto:${emailFeedback}?subject=${encodeURIComponent(
+ subject,
+ )}&body=${encodeURIComponent(body)}`;
+ try {
+ const canOpen = await Linking.canOpenURL(url);
+ if (canOpen) {
+ await Linking.openURL(url);
+ } else {
+ showFeedbackModal('widget');
+ }
+ } catch {
+ showFeedbackModal('widget');
+ }
+ }, [showFeedbackModal]);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| await Linking.openURL( | |
| `mailto:${emailFeedback}?subject=${encodeURIComponent( | |
| subject, | |
| )}&body=${encodeURIComponent(body)}`, | |
| ); | |
| }, []); | |
| const url = `mailto:${emailFeedback}?subject=${encodeURIComponent( | |
| subject, | |
| )}&body=${encodeURIComponent(body)}`; | |
| try { | |
| const canOpen = await Linking.canOpenURL(url); | |
| if (canOpen) { | |
| await Linking.openURL(url); | |
| } else { | |
| showFeedbackModal('widget'); | |
| } | |
| } catch { | |
| showFeedbackModal('widget'); | |
| } | |
| }, [showFeedbackModal]); |
🤖 Prompt for AI Agents
In app/src/screens/passport/PassportNFCScanScreen.tsx around lines 150-156,
guard the mailto flow: before calling Linking.openURL(...) call
Linking.canOpenURL(mailtoUrl) and if it returns true proceed to openURL; if it
returns false (or if openURL throws) call showFeedbackModal('widget') as a
fallback so users always have a feedback path. Keep the same subject/body
encoding when building the mailtoUrl and wrap the open/can calls in a try/catch
to ensure any runtime failures fall back to showFeedbackModal('widget').
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
♻️ Duplicate comments (3)
app/src/screens/passport/PassportNFCScanScreen.tsx (3)
183-198: Eliminate race between the 30s timeout and the scan promiseIf the timeout fires and then the scan resolves, you can navigate after showing the timeout error (or log incorrect analytics). Add a cancellation guard to ignore late results/errors after timeout.
@@ - const scanTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null); + const scanTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null); + // Guard to ignore late scan results after timeout/blur + const scanCancelledRef = useRef(false); @@ const onVerifyPress = useCallback(async () => { @@ // Add timestamp when scan starts const scanStartTime = Date.now(); + scanCancelledRef.current = false; @@ - scanTimeoutRef.current = setTimeout(() => { - trackEvent(PassportEvents.NFC_SCAN_FAILED, { error: 'timeout' }); - openErrorModal('Scan timed out. Please try again.'); - setIsNfcSheetOpen(false); - }, 30000); + scanTimeoutRef.current = setTimeout(() => { + scanCancelledRef.current = true; + trackEvent(PassportEvents.NFC_SCAN_FAILED, { error: 'timeout' }); + openErrorModal('Scan timed out. Please try again.'); + setIsNfcSheetOpen(false); + }, 30000); @@ - const scanResponse = await scan({ + const scanResponse = await scan({ passportNumber, @@ usePacePolling: isPacePolling, }); + if (scanCancelledRef.current) { + // Timed out: ignore late success + return; + } @@ - } catch (e: unknown) { + } catch (e: unknown) { + if (scanCancelledRef.current) { + // Timed out: ignore late error + return; + } const scanDurationSeconds = ( (Date.now() - scanStartTime) / 1000 ).toFixed(2); @@ } finally { - if (scanTimeoutRef.current) { + if (scanTimeoutRef.current) { clearTimeout(scanTimeoutRef.current); scanTimeoutRef.current = null; }Also applies to: 203-214, 215-227, 295-306, 310-313
55-56: Sanitize error strings before sending to analytics/emailRaw error messages can include identifiers (e.g., MRZ fragments). Sanitize them to reduce PII leakage.
@@ -const { trackEvent } = analytics(); +const { trackEvent } = analytics(); +// Redacts 9+ consecutive digits and MRZ-like blocks to reduce PII exposure +const sanitizeErrorMessage = (msg: string): string => { + try { + return msg + .replace(/\b\d{9,}\b/g, '[REDACTED]') + .replace(/[A-Z0-9<]{30,}/g, '[MRZ_REDACTED]'); + } catch { + return 'redacted'; + } +}; @@ - trackEvent(PassportEvents.NFC_RESPONSE_PARSE_FAILED, { - error: e instanceof Error ? e.message : String(e), - }); + trackEvent(PassportEvents.NFC_RESPONSE_PARSE_FAILED, { + error: sanitizeErrorMessage( + e instanceof Error ? e.message : String(e), + ), + }); @@ - trackEvent(PassportEvents.PASSPORT_PARSE_FAILED, { - error: e instanceof Error ? e.message : String(e), - }); + trackEvent(PassportEvents.PASSPORT_PARSE_FAILED, { + error: sanitizeErrorMessage( + e instanceof Error ? e.message : String(e), + ), + }); @@ - trackEvent(PassportEvents.NFC_SCAN_FAILED, { - error: message, - duration_seconds: parseFloat(scanDurationSeconds), - }); - openErrorModal(message); + trackEvent(PassportEvents.NFC_SCAN_FAILED, { + error: sanitizeErrorMessage(message), + duration_seconds: parseFloat(scanDurationSeconds), + }); + openErrorModal(message); @@ - onButtonPress: () => - sendFeedbackEmail({ message, origin: 'passport/nfc' }), + onButtonPress: async () => { + try { + await sendFeedbackEmail({ + message: sanitizeErrorMessage(message), + origin: 'passport/nfc', + }); + } catch { + showFeedbackModal?.('widget'); + } + },Also applies to: 233-235, 290-292, 302-305, 139-141
79-81: Graceful fallback when email is unavailable (show Sentry widget instead)Catching sendFeedbackEmail errors ensures users can still submit feedback if no mail app exists.
- const { showModal } = useFeedback(); + const { showModal, showFeedbackModal } = useFeedback(); @@ - const onReportIssue = useCallback(() => { - sendFeedbackEmail({ - message: 'User reported an issue from NFC scan screen', - origin: 'passport/nfc', - }); - }, []); + const onReportIssue = useCallback(async () => { + try { + await sendFeedbackEmail({ + message: 'User reported an issue from NFC scan screen', + origin: 'passport/nfc', + }); + } catch { + showFeedbackModal?.('widget'); + } + }, [showFeedbackModal]); @@ - showModal({ + showModal({ titleText: 'NFC Scan Error', bodyText: message, buttonText: 'Send Feedback', secondaryButtonText: 'Help', preventDismiss: false, - onButtonPress: () => - sendFeedbackEmail({ message, origin: 'passport/nfc' }), + onButtonPress: async () => { + try { + await sendFeedbackEmail({ message, origin: 'passport/nfc' }); + } catch { + showFeedbackModal?.('widget'); + } + }, onSecondaryButtonPress: goToNFCTrouble, onModalDismiss: () => {}, }); @@ - <SecondaryButton onPress={onReportIssue}> + <SecondaryButton onPress={onReportIssue}> Report Issue </SecondaryButton>Also applies to: 124-130, 133-146, 520-522
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (4)
app/src/layouts/SimpleScrolledTitleLayout.tsx(1 hunks)app/src/screens/passport/PassportNFCScanScreen.tsx(8 hunks)app/src/screens/passport/PassportNFCTroubleScreen.tsx(3 hunks)app/src/utils/email.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/technical-specification.mdc)
**/*.{ts,tsx}: Define IdentityCommitment with fields: commitment (Poseidon hash), nullifier (domain-separated), timestamp (UTC number), version (circuit version), documentType ('passport' | 'eu_id_card')
Define DSCKeyCommitment with fields: publicKeyHash (Poseidon hash), certificateChain (hashes), revocationStatus (boolean), issuer (country code)
Define VerificationConfig with fields: circuitVersion (semver), complianceRules array, timeWindow (seconds, 24h), clockDrift (±5 min), trustAnchors, revocationRoots, timeSource (NTP), nullifierScope (domain separation)
Files:
app/src/layouts/SimpleScrolledTitleLayout.tsxapp/src/utils/email.tsapp/src/screens/passport/PassportNFCTroubleScreen.tsxapp/src/screens/passport/PassportNFCScanScreen.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/layouts/SimpleScrolledTitleLayout.tsxapp/src/utils/email.tsapp/src/screens/passport/PassportNFCTroubleScreen.tsxapp/src/screens/passport/PassportNFCScanScreen.tsx
🧠 Learnings (3)
📚 Learning: 2025-08-24T18:52:25.766Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.766Z
Learning: Integrate haptic feedback via useHapticNavigation
Applied to files:
app/src/screens/passport/PassportNFCTroubleScreen.tsx
📚 Learning: 2025-08-24T18:53:11.183Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/compliance-verification.mdc:0-0
Timestamp: 2025-08-24T18:53:11.183Z
Learning: Show clear user-facing error messages without exposing PII
Applied to files:
app/src/screens/passport/PassportNFCScanScreen.tsx
📚 Learning: 2025-08-24T18:52:25.766Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.766Z
Learning: Use custom hooks for complex state (useModal, useHapticNavigation)
Applied to files:
app/src/screens/passport/PassportNFCScanScreen.tsx
🧬 Code graph analysis (4)
app/src/layouts/SimpleScrolledTitleLayout.tsx (1)
app/src/components/buttons/SecondaryButton.tsx (1)
SecondaryButton(10-30)
app/src/utils/email.ts (1)
app/src/screens/MainScreen.tsx (5)
Linking(415-415)Linking(402-402)Linking(420-420)Linking(425-425)Linking(410-410)
app/src/screens/passport/PassportNFCTroubleScreen.tsx (3)
app/src/hooks/useFeedbackAutoHide.ts (1)
useFeedbackAutoHide(11-22)app/src/components/buttons/SecondaryButton.tsx (1)
SecondaryButton(10-30)app/src/utils/email.ts (1)
sendFeedbackEmail(19-53)
app/src/screens/passport/PassportNFCScanScreen.tsx (3)
app/src/providers/feedbackProvider.tsx (1)
useFeedback(70-76)app/src/hooks/useFeedbackAutoHide.ts (1)
useFeedbackAutoHide(11-22)app/src/utils/email.ts (1)
sendFeedbackEmail(19-53)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: e2e-ios
- GitHub Check: analyze-android
- GitHub Check: build-ios
| <ScrollView flex={1} showsVerticalScrollIndicator={false}> | ||
| <YStack paddingTop={0} paddingBottom={20} flex={1}> | ||
| <YStack paddingTop={0} paddingBottom={12} flex={1}> | ||
| {children} | ||
| </YStack> | ||
| </ScrollView> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Prevent content from being occluded by the bottom-anchored Dismiss button
With the Dismiss button anchored at the bottom, the ScrollView content can be partially hidden on small screens. Add bottom padding to the ScrollView’s contentContainerStyle (using safe area) instead of the inner YStack so the last item remains reachable.
- <ScrollView flex={1} showsVerticalScrollIndicator={false}>
- <YStack paddingTop={0} paddingBottom={12} flex={1}>
+ <ScrollView
+ flex={1}
+ showsVerticalScrollIndicator={false}
+ contentContainerStyle={{ paddingBottom: insets.bottom + 16 }}
+ >
+ <YStack paddingTop={0} flex={1}>
{children}
</YStack>
</ScrollView>Also applies to: 55-57
🤖 Prompt for AI Agents
In app/src/layouts/SimpleScrolledTitleLayout.tsx around lines 40-44 (and
similarly 55-57), the ScrollView currently wraps a YStack that has bottom
padding, which can still allow content to be occluded by the bottom-anchored
Dismiss button on small screens; move/add the bottom padding into the
ScrollView’s contentContainerStyle using the device safe-area inset (bottom) so
the scrollable content gets proper bottom spacing and the last item remains
reachable, instead of applying paddingBottom on the inner YStack.
| <YStack marginTop={16} marginBottom={0} gap={10}> | ||
| <SecondaryButton | ||
| onPress={() => | ||
| sendFeedbackEmail({ | ||
| message: 'User reported an issue from NFC trouble screen', | ||
| origin: 'passport/nfc-trouble', | ||
| }) | ||
| } | ||
| marginBottom={0} | ||
| > | ||
| Report Issue | ||
| </SecondaryButton> | ||
| </YStack> |
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.
Ensure feedback still works when no mail client is installed (fallback to Sentry widget)
Linking.openURL(mailto:) can fail on simulators, managed devices, or users without a mail app. Wrap the call and fall back to an in-app feedback widget so users aren’t blocked from reporting issues.
+import { useFeedback } from '@/providers/feedbackProvider';
@@
const PassportNFCTrouble: React.FC = () => {
@@
+ const { showFeedbackModal } = useFeedback();
@@
<SecondaryButton
- onPress={() =>
- sendFeedbackEmail({
- message: 'User reported an issue from NFC trouble screen',
- origin: 'passport/nfc-trouble',
- })
- }
+ onPress={async () => {
+ try {
+ await sendFeedbackEmail({
+ message: 'User reported an issue from NFC trouble screen',
+ origin: 'passport/nfc-trouble',
+ });
+ } catch {
+ // Fallback if email cannot be opened
+ showFeedbackModal?.('widget');
+ }
+ }}
marginBottom={0}
>
Report Issue
</SecondaryButton>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <YStack marginTop={16} marginBottom={0} gap={10}> | |
| <SecondaryButton | |
| onPress={() => | |
| sendFeedbackEmail({ | |
| message: 'User reported an issue from NFC trouble screen', | |
| origin: 'passport/nfc-trouble', | |
| }) | |
| } | |
| marginBottom={0} | |
| > | |
| Report Issue | |
| </SecondaryButton> | |
| </YStack> | |
| // at the top of the file | |
| import { useFeedback } from '@/providers/feedbackProvider'; | |
| const PassportNFCTrouble: React.FC = () => { | |
| const { showFeedbackModal } = useFeedback(); | |
| return ( | |
| <YStack marginTop={16} marginBottom={0} gap={10}> | |
| <SecondaryButton | |
| onPress={async () => { | |
| try { | |
| await sendFeedbackEmail({ | |
| message: 'User reported an issue from NFC trouble screen', | |
| origin: 'passport/nfc-trouble', | |
| }); | |
| } catch { | |
| // Fallback if email cannot be opened | |
| showFeedbackModal?.('widget'); | |
| } | |
| }} | |
| marginBottom={0} | |
| > | |
| Report Issue | |
| </SecondaryButton> | |
| </YStack> | |
| ); | |
| }; |
🤖 Prompt for AI Agents
In app/src/screens/passport/PassportNFCTroubleScreen.tsx around lines 74-86, the
Report Issue button calls sendFeedbackEmail which may fail on devices without a
mail client; wrap the mailto invocation in an async try/catch and/or check
Linking.canOpenURL before opening, and on failure call the Sentry in-app
feedback widget (e.g. Sentry.showReportDialog or navigate to an internal
Feedback screen) so the user can still submit feedback; ensure any thrown errors
are caught and a graceful fallback UI action is triggered.
| trackEvent(PassportEvents.NFC_SCAN_FAILED, { error: 'timeout' }); | ||
| openErrorModal('Scan timed out. Please try again.'); | ||
| setIsNfcSheetOpen(false); | ||
| }, 30000); |
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.
nfc scan failed modal pops up after 30 seconds if no successful scan
| onSecondaryButtonPress={goToNFCMethodSelection} | ||
| footer={ | ||
| // Add top padding before buttons and normalize spacing | ||
| <YStack marginTop={16} marginBottom={0} gap={10}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add button to send user feedback email
| titleText: 'NFC Scan Error', | ||
| bodyText: message, | ||
| buttonText: 'Dismiss', | ||
| buttonText: 'Report Issue', |
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.
the modal screenshot is old, change the text from "Send Feedback" to "Report Issue" to be consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
app/src/screens/passport/PassportNFCScanScreen.tsx (1)
520-522: Consider conditionally rendering the Report Issue buttonThe "Report Issue" button is always visible even when no scan has been attempted. Consider showing it only after a scan failure or timeout for better UX.
Track scan attempts and conditionally render:
const [isNfcSheetOpen, setIsNfcSheetOpen] = useState(false); const [dialogMessage, setDialogMessage] = useState(''); const [nfcMessage, setNfcMessage] = useState<string | null>(null); +const [hasScanError, setHasScanError] = useState(false);Update error handling to set the flag:
trackEvent(PassportEvents.NFC_SCAN_FAILED, { error: 'timeout' }); openErrorModal('Scan timed out. Please try again.'); + setHasScanError(true); setIsNfcSheetOpen(false);And conditionally render the button:
<SecondaryButton trackEvent={PassportEvents.CANCEL_PASSPORT_NFC} onPress={onCancelPress} > Cancel </SecondaryButton> - <SecondaryButton onPress={onReportIssue}> - Report Issue - </SecondaryButton> + {hasScanError && ( + <SecondaryButton onPress={onReportIssue}> + Report Issue + </SecondaryButton> + )}
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
app/src/screens/passport/PassportNFCScanScreen.tsx(8 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/technical-specification.mdc)
**/*.{ts,tsx}: Define IdentityCommitment with fields: commitment (Poseidon hash), nullifier (domain-separated), timestamp (UTC number), version (circuit version), documentType ('passport' | 'eu_id_card')
Define DSCKeyCommitment with fields: publicKeyHash (Poseidon hash), certificateChain (hashes), revocationStatus (boolean), issuer (country code)
Define VerificationConfig with fields: circuitVersion (semver), complianceRules array, timeWindow (seconds, 24h), clockDrift (±5 min), trustAnchors, revocationRoots, timeSource (NTP), nullifierScope (domain separation)
Files:
app/src/screens/passport/PassportNFCScanScreen.tsx
app/src/**/*.{ts,tsx,js,jsx}
⚙️ CodeRabbit configuration file
app/src/**/*.{ts,tsx,js,jsx}: Review React Native TypeScript code for:
- Component architecture and reusability
- State management patterns
- Performance optimizations
- TypeScript type safety
- React hooks usage and dependencies
- Navigation patterns
Files:
app/src/screens/passport/PassportNFCScanScreen.tsx
🧠 Learnings (2)
📚 Learning: 2025-08-24T18:53:11.183Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/compliance-verification.mdc:0-0
Timestamp: 2025-08-24T18:53:11.183Z
Learning: Show clear user-facing error messages without exposing PII
Applied to files:
app/src/screens/passport/PassportNFCScanScreen.tsx
📚 Learning: 2025-08-24T18:52:25.766Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.766Z
Learning: Use custom hooks for complex state (useModal, useHapticNavigation)
Applied to files:
app/src/screens/passport/PassportNFCScanScreen.tsx
🧬 Code graph analysis (1)
app/src/screens/passport/PassportNFCScanScreen.tsx (4)
app/src/providers/feedbackProvider.tsx (1)
useFeedback(70-76)app/src/hooks/useFeedbackAutoHide.ts (1)
useFeedbackAutoHide(11-22)app/src/utils/email.ts (1)
sendFeedbackEmail(19-53)app/src/utils/nfcScanner.ts (5)
setModalProofStep(14-47)setModalProofStep(49-79)setModalProofStep(81-114)response(116-185)response(187-262)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: analyze-android
- GitHub Check: e2e-ios
- GitHub Check: build-ios
🔇 Additional comments (2)
app/src/screens/passport/PassportNFCScanScreen.tsx (2)
79-80: LGTM! Clean integration of feedback systemThe feedback provider integration and auto-hide hook are properly implemented, providing a seamless user experience for error reporting.
124-129: sendFeedbackEmail usage validatedThe call to
sendFeedbackEmailon the NFC scan screen passes exactly the two required properties (messageandorigin), while the optionalsubjectandrecipientfields correctly fall back to their defaults defined inSendFeedbackEmailOptions. No changes are needed here.
| } | ||
|
|
||
| // Redacts 9+ consecutive digits and MRZ-like blocks to reduce PII exposure | ||
| export const sanitizeErrorMessage = (msg: string): string => { |
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.
@aaronmgdr added a small helper to sanitize the error message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
app/src/screens/passport/PassportNFCScanScreen.tsx(10 hunks)app/src/utils/email.ts(1 hunks)app/src/utils/utils.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- app/src/utils/email.ts
- app/src/screens/passport/PassportNFCScanScreen.tsx
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/technical-specification.mdc)
**/*.{ts,tsx}: Define IdentityCommitment with fields: commitment (Poseidon hash), nullifier (domain-separated), timestamp (UTC number), version (circuit version), documentType ('passport' | 'eu_id_card')
Define DSCKeyCommitment with fields: publicKeyHash (Poseidon hash), certificateChain (hashes), revocationStatus (boolean), issuer (country code)
Define VerificationConfig with fields: circuitVersion (semver), complianceRules array, timeWindow (seconds, 24h), clockDrift (±5 min), trustAnchors, revocationRoots, timeSource (NTP), nullifierScope (domain separation)
Files:
app/src/utils/utils.ts
app/src/**/*.{ts,tsx,js,jsx}
⚙️ CodeRabbit configuration file
app/src/**/*.{ts,tsx,js,jsx}: Review React Native TypeScript code for:
- Component architecture and reusability
- State management patterns
- Performance optimizations
- TypeScript type safety
- React hooks usage and dependencies
- Navigation patterns
Files:
app/src/utils/utils.ts
🧬 Code graph analysis (1)
app/src/utils/utils.ts (2)
common/src/utils/utils.ts (1)
formatMrz(8-17)app/src/utils/cameraScanner.ts (1)
mrzInfo(35-56)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: analyze-ios
- GitHub Check: analyze-android
- GitHub Check: e2e-ios
- GitHub Check: build-ios
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
app/tests/src/utils/sanitizeErrorMessage.test.ts (1)
32-44: Avoid global prototype monkey-patching; use jest.spyOn for safer, isolated failure simulationOverwriting String.prototype.replace risks cross-test interference if tests are ever run in parallel in the same worker. Use jest.spyOn and restore via mockRestore for safer isolation.
- // Simulate a failure by monkey-patching String.prototype.replace temporarily - const originalReplace = (String.prototype as any).replace; - (String.prototype as any).replace = () => { - throw new Error('boom'); - }; - try { - const result = sanitizeErrorMessage('any'); - expect(result).toBe('redacted'); - } finally { - (String.prototype as any).replace = originalReplace; - } + // Simulate a failure using a spy to avoid global prototype mutation + const spy = jest + .spyOn(String.prototype as any, 'replace') + .mockImplementation(() => { + throw new Error('boom'); + }); + try { + const result = sanitizeErrorMessage('any'); + expect(result).toBe('redacted'); + } finally { + spy.mockRestore(); + }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
app/tests/src/utils/sanitizeErrorMessage.test.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/technical-specification.mdc)
**/*.{ts,tsx}: Define IdentityCommitment with fields: commitment (Poseidon hash), nullifier (domain-separated), timestamp (UTC number), version (circuit version), documentType ('passport' | 'eu_id_card')
Define DSCKeyCommitment with fields: publicKeyHash (Poseidon hash), certificateChain (hashes), revocationStatus (boolean), issuer (country code)
Define VerificationConfig with fields: circuitVersion (semver), complianceRules array, timeWindow (seconds, 24h), clockDrift (±5 min), trustAnchors, revocationRoots, timeSource (NTP), nullifierScope (domain separation)
Files:
app/tests/src/utils/sanitizeErrorMessage.test.ts
**/*.{test,spec}.{ts,js,tsx,jsx}
⚙️ CodeRabbit configuration file
**/*.{test,spec}.{ts,js,tsx,jsx}: Review test files for:
- Test coverage completeness
- Test case quality and edge cases
- Mock usage appropriateness
- Test readability and maintainability
Files:
app/tests/src/utils/sanitizeErrorMessage.test.ts
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: e2e-ios
🔇 Additional comments (1)
app/tests/src/utils/sanitizeErrorMessage.test.ts (1)
3-3: ✅ Alias mapping is correctly configured in both TS and Jestapp/tsconfig.json defines
"paths": { "@/*": ["./src/*"] }and app/jest.config.cjs maps
moduleNameMapper: { '^@/(.*)$': '<rootDir>/src/$1', // … }so importing
@/utils/utilswithin tests resolves toapp/src/utils/utilsas expected. No further changes needed.
|
@aaronmgdr @shazarre added tests and the race condition cancel nfc scan fix that coderabbit suggested |
* SDK Go version (#920) * feat: helper functions and constant for go-sdk * feat: formatRevealedDataPacked in go * chore: refactor * feat: define struct for selfBackendVerifier * feat: verify function for selfBackendVerifier * feat(wip): custom hasher * feat: SelfVerifierBacked in go * test(wip): scope and userContextHash is failing * test: zk proof verified * fix: MockConfigStore getactionId function * chore: refactor * chore: remove abi duplicate files * chore: move configStore to utils * chore: modified VcAndDiscloseProof struct * chore: more review changes * feat: impl DefaultConfig and InMemoryConfigStore * chore: refactor and export functions * fix: module import and README * chore: remove example folder * chore: remove pointers from VerificationConfig * chore: coderabbit review fixes * chore: more coderabbit review fix * chore: add license * fix: convert attestationIdd to int * chore: remove duplicate code --------- Co-authored-by: ayman <[email protected]> * Moving proving Utils to common (#935) * remove react dom * moves proving utils to the common * need to use rn components * fix imports * add proving-utils and dedeuplicate entry configs for esm and cjs. * must wrap in text component * fix metro bundling * fix mock import * fix builds and tests * please save me * solution? * fix test * Move proving inputs to the common package (#937) * create ofactTree type to share * move proving inputs from app to register inputs in common * missed reexport * ok * add some validations as suggested by our ai overlords * Fix mock passport flow (#942) * fix dev screens * add hint * rename * fix path * fix mobile-ci path * fix: extractMRZ (#938) * fix: extractMRZ * yarn nice && yarn types * fix test: remove unused * fix mobile ci * add script --------- Co-authored-by: Justin Hernandez <[email protected]> * Move Proving attest and cose (#950) * moved attest and cose utils to common with cursor converted tests in common to use vitest and converted coseVerify.test to vitest after moving from app to common what does cryptoLoader do? * moved away * get buff Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * SELF-253 feat: add user email feedback (#889) * feat: add sentry feedback * add sentry feedback to web * feat: add custom feedback modal & fix freeze on IOS * yarn nice * update lock * feat: show feedback widget on NFC scan issues (#948) * feat: show feedback widget on NFC scan issues * fix ref * clean up * fix report issue screen * abstract send user feedback email logic * fixes * change text to Report Issue * sanitize email and track event messge * remove unnecessary sanitization * add sanitize error message tests * fix tests * save wip. almost done * fix screen test * fix screen test * remove non working test --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> * chore: centralize license header checks (#952) * chore: centralize license header scripts * chore: run license header checks from root * add header to other files * add header to bundle * add migration script and update check license headers * convert license to mobile sdk * migrate license headers * remove headers from common; convert remaining * fix headers * add license header checks * update unsupported passport screen (#953) * update unsupported passport screen * yarn nice --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: ayman <[email protected]> Co-authored-by: Aaron DeRuvo <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* feat: add sentry feedback * add sentry feedback to web * feat: add custom feedback modal & fix freeze on IOS * yarn nice * update lock * feat: show feedback widget on NFC scan issues (selfxyz#948) * feat: show feedback widget on NFC scan issues * fix ref * clean up * fix report issue screen * abstract send user feedback email logic * fixes * change text to Report Issue * sanitize email and track event messge * remove unnecessary sanitization * add sanitize error message tests * fix tests * save wip. almost done * fix screen test * fix screen test * remove non working test --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]>
* update CI * bump iOS version * update readme * update mobile-deploy ci * bump version iOS * update workflow to use workload identity federation (#933) * update workflow to use workload identity federation * add token permissions * correct provider name * chore: incrementing android build version for version 2.6.4 [github action] --------- Co-authored-by: Self GitHub Actions <[email protected]> * update ci * update ci * update ci * update ci * update ci * fix ci * fix ci * fix ci * remove fastlane use for android * bump iOS build version * update CI python script * iterate on CI * iterate on CI * iterate on CI * Dev (#941) * SDK Go version (#920) * feat: helper functions and constant for go-sdk * feat: formatRevealedDataPacked in go * chore: refactor * feat: define struct for selfBackendVerifier * feat: verify function for selfBackendVerifier * feat(wip): custom hasher * feat: SelfVerifierBacked in go * test(wip): scope and userContextHash is failing * test: zk proof verified * fix: MockConfigStore getactionId function * chore: refactor * chore: remove abi duplicate files * chore: move configStore to utils * chore: modified VcAndDiscloseProof struct * chore: more review changes * feat: impl DefaultConfig and InMemoryConfigStore * chore: refactor and export functions * fix: module import and README * chore: remove example folder * chore: remove pointers from VerificationConfig * chore: coderabbit review fixes * chore: more coderabbit review fix * chore: add license * fix: convert attestationIdd to int * chore: remove duplicate code --------- Co-authored-by: ayman <[email protected]> * Moving proving Utils to common (#935) * remove react dom * moves proving utils to the common * need to use rn components * fix imports * add proving-utils and dedeuplicate entry configs for esm and cjs. * must wrap in text component * fix metro bundling * fix mock import * fix builds and tests * please save me * solution? * fix test * Move proving inputs to the common package (#937) * create ofactTree type to share * move proving inputs from app to register inputs in common * missed reexport * ok * add some validations as suggested by our ai overlords * Fix mock passport flow (#942) * fix dev screens * add hint * rename * fix path * fix mobile-ci path * fix: extractMRZ (#938) * fix: extractMRZ * yarn nice && yarn types * fix test: remove unused * fix mobile ci * add script --------- Co-authored-by: Justin Hernandez <[email protected]> * Move Proving attest and cose (#950) * moved attest and cose utils to common with cursor converted tests in common to use vitest and converted coseVerify.test to vitest after moving from app to common what does cryptoLoader do? * moved away * get buff Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * SELF-253 feat: add user email feedback (#889) * feat: add sentry feedback * add sentry feedback to web * feat: add custom feedback modal & fix freeze on IOS * yarn nice * update lock * feat: show feedback widget on NFC scan issues (#948) * feat: show feedback widget on NFC scan issues * fix ref * clean up * fix report issue screen * abstract send user feedback email logic * fixes * change text to Report Issue * sanitize email and track event messge * remove unnecessary sanitization * add sanitize error message tests * fix tests * save wip. almost done * fix screen test * fix screen test * remove non working test --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> * chore: centralize license header checks (#952) * chore: centralize license header scripts * chore: run license header checks from root * add header to other files * add header to bundle * add migration script and update check license headers * convert license to mobile sdk * migrate license headers * remove headers from common; convert remaining * fix headers * add license header checks * update unsupported passport screen (#953) * update unsupported passport screen * yarn nice --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: ayman <[email protected]> Co-authored-by: Aaron DeRuvo <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * bump version * bump yarn.lock * update ci (#966) * chore: Manually bump and release v2.6.4 (#961) * update lock files * bump and build android * update build artifacts * show generate mock document button * update lock * fix formatting and update failing e2e test * revert podfile * fixes * fix cold start of the app with deeplink * update ci * update ci * Sync MARKETING_VERSION to iOS project files after version bump * chore: incrementing android build version for version 2.6.4 [github action] (#976) Co-authored-by: remicolin <[email protected]> * chore: add build dependencies step for iOS and Android in mobile deploy workflow * chore: enhance mobile deploy workflow by adding CMake installation step * bump android build version * chore: incrementing android build version for version 2.6.4 [github action] (#985) Co-authored-by: remicolin <[email protected]> * chore: configure Metro bundler for production compatibility in mobile deploy workflow * chore: incrementing android build version for version 2.6.4 [github action] (#987) Co-authored-by: remicolin <[email protected]> * Revert "chore: configure Metro bundler for production compatibility in mobile deploy workflow" This reverts commit 60fc1f2. * reduce max old space size in mobile-deploy ci * fix android french id card (#957) * fix android french id card * fix common ci cache * feat: log apdu (#988) --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> * unblock ci * fix merge * merge fixes * fix tests * make ci happy --------- Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: pputman-clabs <[email protected]> Co-authored-by: Self GitHub Actions <[email protected]> Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: ayman <[email protected]> Co-authored-by: Aaron DeRuvo <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* make contract sdk simpler (#514) * make contract sdk simpler * reduce root inputs * delete convert function * summarize our library * update npm package * update package version * update attestation id * add util function to get revealed data * Revert "make contract sdk simpler (#514)" (#518) This reverts commit 847b88d. * merge dev into main (#576) * Feat: Show error code in SDK (#500) * feat: emit `error_code` and `reason` in app * feat: add `onError` in sdk * feat: Display reason in app * lint & fmt * feat: add scrollview in ProofRequestStatusScreen for long reasons * Fix input generation for 521bit curves (#481) * fix EC point padding for 521 bit curves * rename modulus to point in findStartIndexEC as it is a point * simplify matching logic * simplify padding logic * remove comment * remove log removing .only so the CI/CD runs circuit tests fix disclosure test fix scope in test fix scope error in circuit tests remove .only fix test * run ci/cd * Feat/simpler contract sdk (#519) * make contract sdk simpler * reduce root inputs * delete convert function * summarize our library * update npm package * update package version * update attestation id * add util function to get revealed data --------- Co-authored-by: motemotech <[email protected]> * forgot to include package update (#521) * Bump version to 2.5.1 (#522) * bump version * update fastlane * fix bump version * bump build and add todo * disable commit for now * [SEL-154] Step 1: Scan your passport (#511) * simplify navigation logic * use aesop design hook * save wip * add new aesop redesign screens * save wip design * refactor nav bar logic * fix paths * save wip * stub progress navbar and save wip * save wip progress bar animation * save wip progress bar, almost done with design * fix progress bar design * fix bottom padding * disable git commit for now * fix flaky android downloads that causes pipeline to crash * update lock for ci * [SEL-46] FE: Add minimum bottom padding (#510) * fix bottom padding for smaller screens * fix podfile post install hook permissions check * update pod lock and disable git commit action step for now * update lock * fix flaky android downloads that causes pipeline to crash * fix: improve error handling for forbidden countries list mismatch (#494) * Update SelfBackendVerifier.ts * Update constants.ts * Update formatInputs.ts * Update formatCallData.ts * DX: Auto format on save (#526) * save wip * use elint instead of prettier to sort imports * set imports to warn * sync prettier settigns * update prettier settings * save working version * fix export and disable mobile pipeline for now * limit auto formatting to the app folder * remove artefacts * SEL-187: Make bottom layout scrollable on smaller screens (#525) * fix design check * add an option to disable local sending of sentry events * better sentry enable / disable * fix scan passport height * make bottom layout scrollable so it doesn't squish top screen * simpler logic check. don't create new env var * fix internet connection issues * readd comment * use isConnected instead of internet reachable * use a dynamic bottom panel height * add missing recovery screens * move aesop below * remove dupe export * fix rebase * fix android package download issue * Feat/extend id support (#517) * refactor proving impleting xstate, speedup proving * add disclosure proof support * keep refactoring provingMachine, clean old implementation * call init method when switching from dsc to register * rebase with dev to display why the proof verification failed * refactor ws connexion between front-end and mobile to retrieve self-app * update the webclient at proofVerification and use selfAppStore in provingMachine * fix provintStore.init in ProveScreen * yarn nice * fetch data correctly in splash screen * Bump build versions for 2.5.1 (#531) * release new builds * fix app and build versions * fix env check * display error animation on failure on loading screen (#532) * display error animation on failure on loading screen * remove log --------- Co-authored-by: Justin Hernandez <[email protected]> * ci: bump actions/checkout to v4 (#529) * make contract sdk simpler (#514) * make contract sdk simpler * reduce root inputs * delete convert function * summarize our library * update npm package * update package version * update attestation id * add util function to get revealed data * Revert "make contract sdk simpler (#514)" (#518) This reverts commit 847b88d. * ci: bump actions/checkout to v4 --------- Co-authored-by: nicoshark <[email protected]> Co-authored-by: turnoffthiscomputer <[email protected]> * fix italy (#530) * Fix/proving machine endpoint type (#538) * store endpoint type in proving machine * yarn nice * fix splash screen error (#539) * New bug fix build for v2.5.1 (#540) * bump new build for dev fixes * update lock * reinstall before running local deploy * SEL-178: Improve haptic feedback library (#535) * fix dev settings typing * add dev screens file * save haptic feedback progress * change ordedr * fix initial route and add haptic feedback screen to dev settings options * add delete scripts (#542) * update staging registry address (#545) * feat: Add Disclose history (#533) * feat: Add Disclose history * fix: Duplicate history in list * fix: Outdated disclosures * Delete app/ios/Self copy-Info.plist * allow a scale of up to 1.3 (#546) * allow a scale of up to 1.3 * update lock files * clean up unused imports * fix settings * add common sdk (#537) * add common sdk * remove sdk backend api * remove registry * regenerate sha256 rsa dsc each time * download ski-pem dynamically on staging, refactor initpassportDataParsing * add state machine for button on prove screen, improve ux on splash screen * fetch ski-pem in production * fix linter issues * fix prove screen button bugs * update podfile.lock and yarn.lock * run linter in circuits repo * bump build * bump version for sentry debugging * bump ios to version 118 --------- Co-authored-by: Justin Hernandez <[email protected]> * better connection check (#548) * Clean up navigation and setup Jest (#549) * remove dupe account screens and prefer the term home * organize screen loading better * sort keys * rename screen files wip * fix deleted directory issues * rename folders * fix paths and naming * save working jest import test * save base working jest navigation test * finalize navigation refactor and jest test * update test name and podfile lock * remove unused packages * use the correct version of react test renderer * bump build (#552) * Eth dublin (#554) * add mock id card generator * add genMockIdDoc in common/sdk exports * onboard developer id using deeplink, allow custom birthdate on mockpassport * log more dsc info (#558) * Push notification (#536) * add push notification feature * merge new app impl * change dsc key * import * reverse mock dsc * worked in the ios * checked in android * update url and delete console * delete small changes * lint * add yarn.lock * fix warning message * add mock notification service for test code * fix path for the mock implementation * add mock deeplink to the test code * nice notificationServiceMock.js * delete unused firebase related implementation * fix wording and UI related to notification service * hotfix on mockdatascreen --------- Co-authored-by: turnoffthiscomputer <[email protected]> * Fix deeplink 2 (#560) * fix deeplink * fix deeplink * yarn nice * feat: Use vision for MRZ scanning (SEL-47) (#557) * feat: Use vision for MRZ scanning * modify label to position the smartphone during the OCR scan --------- Co-authored-by: turnoffthiscomputer <[email protected]> * SEL-255: improved loading screen with estimated wait times (#550) * create new loading screen and rename static to misc * fix route * save wip loading screen * save wip animation * save static wip design * continue * splash * add a loading screen text helper * add test for loading screen text * save wip. almost there * update haptic logic * better feedback and add dev scren * save current work * update text logic and tests * load passport metadata in loading screen * simplify and fix tests * test for additional exponents * add new animation * rename file * consolidate ui useEffect and fix loading screen layout * fix current state * remove mockPassportFlow param * merge new loading screen and new notification logic * simplify * update lock * use passportMetadata instead of metadata * save simplification * update loading text based on pr feedback and tests * Bump v2.5.1: ios 122; android 60 (#561) * increment build to 120 * bump builds for 2.5.1. ios 121; android 60 * clean up logic * upgrade react native firebase for privacy manifests * update react native keychain to fix could not recover issue (#564) * fix: update ocr corrections (#563) * Chore: Polish proof history to prep for release (#566) * clean up nav and home boundaries, passport data screen insets * migrate proof history screen out of settings * minor clean up * save wip * add new ibm plex mono font and clean up proof detail screen * remove test data * remove extra loading screen text * remove unnecessary ceil * Bump v2.5.1; ios 123; android 62 (#565) * bump to build 61 * bump ios version * update version * Feature/add prettier formatter (#568) * Add Prettier configuration and ignore files for code formatting - Created .prettierignore to exclude specific directories and files from formatting. - Added .prettierrc.yml with custom settings for print width and trailing commas. - Updated package.json to include Prettier and its Solidity plugin as dependencies, along with scripts for formatting and checking code. * Run prettier formatting * fix nationality using mock passports * SEL-181 & SEL-252: Update mobile app events (#570) * improve analytics handling * add error boundary that flushes segment events before error occurs * upgrade segment analytics package * flush analytics when user encounters error screen * track all click events * add tracking to loading screen * better init and click event names * track cloud backup and modal actions * use __DEV__ for debugging * add tracking to account recovery, auth, mock data * return false instead of throwing * add more tracking events * save wip event updating * abstract analytic event names * update click events * clean up * move reasons comment * add unsupported passport event * Feature/enhance self verification root (#569) * Add SelfVerificationConsumer contract for self-verification logic - Introduced an abstract contract, SelfVerificationConsumer, that extends SelfVerificationRoot. - Implemented nullifier tracking, verification success events, and customizable validation and update methods for nullifiers. - Added error handling for nullifier check failures and hooks for derived contracts to implement custom logic after successful verification. * Add SelfHappyBirthday contract example using SelfVerificationConsumer - Introduced SelfHappyBirthday contract that allows users to claim USDC on their birthday. - Integrated SelfVerificationConsumer for handling verification and nullifier tracking. - Added functions to set claimable amount and window, along with event emissions for state changes. - Implemented logic to check if the claim is within the user's birthday window and transfer USDC accordingly. * Refactor imports in HappyBirthday contract for better organization - Updated import statements in HappyBirthday.sol to use relative paths for ISelfVerificationRoot, SelfCircuitLibrary, and SelfVerificationConsumer. - Improved code readability and maintainability by organizing imports more logically. * Refactor Airdrop contract to use SelfVerificationConsumer for registration logic - Updated Airdrop contract to inherit from SelfVerificationConsumer instead of SelfVerificationRoot. - Refactored mappings for user identifiers and nullifiers for improved clarity and functionality. - Enhanced error handling and updated function parameters for consistency. - Implemented new validation and update methods for nullifiers, streamlining the registration process. - Removed deprecated verifySelfProof function and integrated logic into new methods. * Add events and refactor SelfVerificationRoot and related contracts - Introduced new events in SelfVerificationRoot for verification configuration updates, scope changes, and attestation ID management. - Updated Airdrop contract to remove deprecated events and added a new event for Merkle root updates. - Refactored SelfPassportERC721 to inherit from SelfVerificationConsumer, enhancing verification logic and event handling. - Improved function parameters for consistency and clarity across contracts. * Refactor contracts to use SelfVerificationRoot and enhance verification logic - Removed SelfVerificationConsumer contract and updated related contracts to inherit from SelfVerificationRoot. - Refactored mappings and event emissions in Airdrop, HappyBirthday, and SelfPassportERC721 for improved clarity and functionality. - Enhanced verification success hooks to include user identifiers and nullifiers for better tracking. - Updated constructor parameters for consistency across contracts and improved error handling for user registration and claims. * Refactor constructor in SelfPassportERC721 for improved readability * Refactor function parameters in SelfVerificationRoot and related contracts * Refactor constructor parameter names in IdentityVerificationHub, Airdrop, IdentityRegistry, and ProxyRoot contracts for improved clarity and consistency * fix getCircuitName function (#575) * fix getCircuitName function * fix getCircuitName function * feat: Read ID cards (#571) * Update GitHub checkout action from v3 to v4 (#544) * Bump build version 2.5.2 to test react native keychain (#572) * bump build and version * bump version 2.5.2 * don't downgrade react native keychain * update app/README.md toolchain instructions (#140) * bump build (#580) --------- Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: turboblitz <[email protected]> Co-authored-by: motemotech <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: crStiv <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: James Niken <[email protected]> Co-authored-by: Kevin Lin <[email protected]> Co-authored-by: leopardracer <[email protected]> Co-authored-by: Olof Andersson <[email protected]> * feat(wip): register circuit for aadhaar * chore: add anon aadhar circuits * chore: remove sc and disclose selfrica test * feat: extract aadhaar qr data * test: aadhaar qr data extract circuit * test: aadhaar register circuit * feat: extract pincode and ph no last 4 digit * fix: register aadhaar nullifier and commitment * test: Verify commitment circuit of aadhaar * feat: add photoHash inside commitment * feat: build Aadhaar OFAC SMT * feat: ofac check and reveal data (test done) * test: qr extractor for custom data input * feat: add state as reveal data inside VC and disclose * chore: add comments * fix: num2Ceil component * chore: review changes * chore: use passport SignatureVerifier * fix: signatureVerifier inputs * feat: extract ascii values of fields * feat: provide users the flexibility to reveal specific characters of a field * chore: refactor * test: register aadhaar for tampered data * test(wip): should return 0 if in ofac list * test: ofac check * test: register aadhaar circuit for different qr data * merge dev into main (#683) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) * implement self uups upgradeable (#592) * implement self uups upgradeable * small changes in identityVerificationHubImplV2 * delete aderyn.toml * chore: add custom verifier * chnage return output * feat: use self structs and a Generic output struct * feat: add userIdentifier, nullifier, forbiddencountries to returned output * add root view functions from registry * fix: build and compilation errors * add userDefined data into selfVerificationRoot * "resolve conflicts" * fix compilation problem * fix how to register verification config * test: CustomVerifier * fix verification root and hub integration * add scope check in hub impl * replace poseidon hash to ripemd+sha256 * add todo list * feat: refactor and add test cases for generic formatter * add performUserIdentifierCheck in basicVerification * change how to handle additionalData and fix stack too deep * start adding test codes * fix dependency problems in monorepo * fix: forbidden countries (#612) LGTM! * able to run test code * pass happy path * delete unused codes * change error code name, add caller address validation and add scripts to run test and build in monorepo * add all test cases in vcAndDisclose flow * remove comment out * chore: use actual user identifier outputs * success in registration tests * cover all cases * pass contractVersion instead of circuitVersion * fix disclose test * chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter * change val name and remove unused lines * add val name change * remove userIdentifier from return data * feat: use GenericDiscloseOutput struct in verfication hook fix test cases for user identifier * chore: change the function order for Hub Impl V2 (#625) * fix nat specs * add nat spec in SelfStructs --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Nesopie <[email protected]> * prettier (#629) * CAN auth - android (#613) * add missed files * add NFCMethodSelectionScreen * bump android build --------- Co-authored-by: Justin Hernandez <[email protected]> * feat: add MRZ correction method to NFCMethodSelectionScreen (#627) * add npm auth token env (#632) * bump sdk version (#633) * publish npm package when merging on dev * bump common sdk version * replace yarn publish by npm publish * update common package version * Simplify dev mode gesture (#635) * Simplify developer mode gesture * Enable dev mode on MockData screen with five taps * add build smt function to common sdk * update vc_and_disclose_id test (dev branch) (#641) * fix: vc_and_disclose_id test * chore: yarn prettier * Show modal on NFC scan error (#642) * Add help button and error modal actions * fix the screen management * yarn nice * Bump build v2.5.4: ios 132; android 71 (#631) * bump version and build numbers * remove tamagui/toast * fix marketing version * fix: update TD1 and TD3 checks (#643) * bum yarn.lock * Bump build: ios 133; android 72 and build fixes (#654) * update gesture version and bump android build * bump and fix ios build * update lock files * fixes * fix fotoapparat library source * Update example contracts to include EUID usage (#656) * refactor: update HappyBirthday contract to V2 with support for E-Passport and EUID cards, introduce bonus multipliers, and enhance verification logic * refactor: update Airdrop contract to V2 with support for E-Passport and EU ID Card attestations * refactor: remove BASIS_POINTS constant from Airdrop contract * feat: introduce SelfIdentityERC721 contract for issuing NFTs based on verified identity credentials, replacing SelfPassportERC721 * fix: update verification functions in Airdrop, HappyBirthday, and SelfIdentityERC721 contracts to use customVerificationHook * cherry pick commit from add-test-self-verification... * block non-dev pr to main branch * audit fixes (#645) * merge dev branch into main (#624) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> * update contracts (#628) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) * implement self uups upgradeable (#592) * implement self uups upgradeable * small changes in identityVerificationHubImplV2 * delete aderyn.toml * chore: add custom verifier * chnage return output * feat: use self structs and a Generic output struct * feat: add userIdentifier, nullifier, forbiddencountries to returned output * add root view functions from registry * fix: build and compilation errors * add userDefined data into selfVerificationRoot * "resolve conflicts" * fix compilation problem * fix how to register verification config * test: CustomVerifier * fix verification root and hub integration * add scope check in hub impl * replace poseidon hash to ripemd+sha256 * add todo list * feat: refactor and add test cases for generic formatter * add performUserIdentifierCheck in basicVerification * change how to handle additionalData and fix stack too deep * start adding test codes * fix dependency problems in monorepo * fix: forbidden countries (#612) LGTM! * able to run test code * pass happy path * delete unused codes * change error code name, add caller address validation and add scripts to run test and build in monorepo * add all test cases in vcAndDisclose flow * remove comment out * chore: use actual user identifier outputs * success in registration tests * cover all cases * pass contractVersion instead of circuitVersion * fix disclose test * chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter * change val name and remove unused lines * add val name change * remove userIdentifier from return data * feat: use GenericDiscloseOutput struct in verfication hook fix test cases for user identifier * chore: change the function order for Hub Impl V2 (#625) * fix nat specs * add nat spec in SelfStructs --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Nesopie <[email protected]> * prettier (#629) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> Co-authored-by: Nesopie <[email protected]> * fix: vc_and_disclose_id test (#640) * fix: vc_and_disclose_id test * chore: yarn prettier * fix: check if a config id exists * chore: change the function where the config not set verification is happening * fix: add await * feat: add getConfigId function in SelfVerificationRoot (#650) * feat: add getConfigId function in SelfVerificationRoot * update comment --------- Co-authored-by: motemotech <[email protected]> * chore: fix ofac end index in eu id cards * chore: fix tests * fix: example contracts and tests --------- Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> * Update deployment module for Identity Verification Hub V2 with detailed documentation and library linkage for CustomVerifier. Update initialization process to reflect changes in V2 implementation, ensuring proper setup for proxy deployment. (#658) * publish npm-package (#651) * App/eu id updates (#638) * fix build issues * generate disclosure proof with euids * generate disclosure proof with euids * Eu id updates 2 (#648) * update vc_and_disclose_id test (dev branch) (#641) * fix: vc_and_disclose_id test * chore: yarn prettier * Show modal on NFC scan error (#642) * Add help button and error modal actions * fix the screen management * yarn nice * Bump build v2.5.4: ios 132; android 71 (#631) * bump version and build numbers * remove tamagui/toast * fix marketing version * fix: update TD1 and TD3 checks (#643) * bum yarn.lock * add version and user defined data --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> * remove the mock user define data * get the useridentifier as a hash from the user defined data * chore: add version and userDefinedData * feat: use the version in register / dsc proofs as well * update calculateUserIdentifierHash * yarn nice * refactor: consolidate user context data handling and update payload structure * fix typing issues on sha1 * remove console.log(sha1) * fix sha1 import * refactor: streamline userDefinedData handling and adjust payload type for circuit * refactor: update sha1 usage and enhance logging in calculateUserIdentifierHash * yarn nice * yarn lint common * use ts-ignore for sha1 import * fix app ci tests * fix typing issue * remove unused ts-ignore * cast uuid before calling generateinputs * bump qrcode version * add tsup on the qrcode sdk * fix: exports on selfxyz/qrcode * update how we define config.version * fix yarn imports * yarn format --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Ayman <[email protected]> * Hotfix contract compile error (#660) * Fix previous rebase error * Refactor deployment module for Identity Verification Hub V2. * Fix/sdk (#652) * fix: sdk build configs * chore: SelfBackendVerifier (WIP) * feat: add custom verification * feat: consider destination chain in user defined data * chore: export attestation id * chore: export attestation id * chore: export config storage * chore: don't throw an error if the proof is not valid * chore: trim abi and rm typechain types * refactor * chore: rm unnecessary exports * 📝 Add docstrings to `fix/sdk` (#653) Docstrings generation was requested by @remicolin. * #652 (comment) The following files were modified: * `sdk/core/src/utils/hash.ts` * `sdk/core/src/utils/proof.ts` * `sdk/core/src/utils/utils.ts` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * review fixes * chore: fix package.json cjs types * chore: add minor changes to checks * feat: add InMemoryConfigStore, allIds constant and verificationResult type * chore: export Verification config * feat: change the verification config types * fix: throw issues early if verification config is null * fix: update yarn.lock file * chore: lint * fix: rm ts expect error directive * fix: contract tests * use excluded countries instead forbidden countries list * chore: change types in constnats --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update npm-publish workflow and bump core package version to 1.0.0 (#661) * update import * Update get verification config visibility (#664) * Update deployment module for Identity Verification Hub V2 to correct file paths and module name for deployment commands. * Add troubleshooting documentation for verification issues in deployHubV2.ts. Include manual verification steps and common failure reasons to assist users during deployment. * Change visibility of getVerificationConfigV2 function from internal to public in IdentityVerificationHubImplV2 contract to allow external access. * Apply BUSL v1.1 license headers to app (#665) * Add BSL license headers to app sources * prettier * fix license reference - https://spdx.org/licenses/BUSL-1.1.html * bump build: android 73 (#659) * Contracts/deploy staging (#668) * update scripts * deploy vc and disclose id * fix the deployment scripts on staging * update yarn.lock * bump ios build and version (#669) * configure coderabbitai (#670) * tweak coderabbit * bump * more thorough test spec * Apply BSL to app codebase (#639) * Clean up root license wording * Simplify SPDX header * simplify license and rename BSL to BUSL * fix merge issues * fix missing method --------- Co-authored-by: Justin Hernandez <[email protected]> * SEL-423 apply xcode build suggestions (#671) * apply recommended app settings from xcode * stick to portrait orientation and update target settings * remove app clip references * Circuit audit fixes (#644) * feat: add range checks before use of LessEqThan and SelectSubArray * fix: Num2Bits_strict to constrain virtualKey * bump core version * bump core version and fix ci * chore: use npm_auth_token in yarnrc * chroe: rm yarnrc changes * chore: update npm publish * chore: run npm publish manually * chore: change hub contract address (#675) * Update npm-publish.yml * chore: use proper secret when publishing * feat: enable publishing if workflow was triggered manually * Contracts/update verifier (#673) * update hardhat config * update vc and disclose verifier * update vc and disclose verifier script and run it * update test self verification root * update verifier * bump sdk version and use new hub address * chore: update zk-kit binary merkle root dep (#674) * refactor deployment scripts (#678) * feat: add register eu id instances (#682) * feat: add register eu id instances * feat: add new instances * chore: update scripts * chore: fix sig alg * chore: rm circuits --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> Co-authored-by: Nesopie <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Kevin Lin <[email protected]> Co-authored-by: kevinsslin <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Eric Nakagawa <[email protected]> * fix: commitment hash * fix: register aadhaar test * chore: refactor * feat: reveal data in packed bytes * feat: add constrain on delimiterIndices * feat: reveal timestamp * merge main to feat/aadhaar * fix: tests * feat: hash pubKey * feat: add registry contract * feat: Update HubImplV2 (WIP) * add functions to generate aadhaar data (WIP) * modularize aadhaar data generation (WIP) * fix(wip): register test * fix: test qr extractor * fix * chore: refactor functions * feat: add age extractor and tested * feat: add isMiniumAge check * fix: prepareAadhaarTestData func * registry contract tests * feat: registry contract tests * feat: extract fields from qr data bytes * chore: refactor mockData * feat: move minimum age to revealPackedData * feat: create a constant.ts to retrive fields from unpacked bytes * chore: refactor * fix: exports * rebase * rebase * feat: add public signal ,indices mapping * chore: add public output to indices mapping * fix:AADHAAR_PUBLIC_SIGNAL_INDICES * feat: make nullifier public * fix: nullifier cal for disclose circuits * feat: merge isMiniumAgeValid and miniumAge signal * fix: disclsoe test * feat: support for user identifier and secret * chore :refactor * feat: ofac test last name , firstname * feat: add forbidden_countries_list check * feat: add tests for aadhaar (WIP) * failing ofac tests * feat: finish contract tests * fix: merge conflicts * update the common package to be usable in circuits and contracts * lint everything * coderabbit fixes * chore: update name dob,yob aadhaar ofac tree * feat: merge ofac and reverse ofac check into one * test: merged ofac constrain * SELF-253 feat: add user email feedback (#889) * feat: add sentry feedback * add sentry feedback to web * feat: add custom feedback modal & fix freeze on IOS * yarn nice * update lock * feat: show feedback widget on NFC scan issues (#948) * feat: show feedback widget on NFC scan issues * fix ref * clean up * fix report issue screen * abstract send user feedback email logic * fixes * change text to Report Issue * sanitize email and track event messge * remove unnecessary sanitization * add sanitize error message tests * fix tests * save wip. almost done * fix screen test * fix screen test * remove non working test --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> * chore: centralize license header checks (#952) * chore: centralize license header scripts * chore: run license header checks from root * add header to other files * add header to bundle * add migration script and update check license headers * convert license to mobile sdk * migrate license headers * remove headers from common; convert remaining * fix headers * add license header checks * update unsupported passport screen (#953) * update unsupported passport screen * yarn nice * feat: support new ofac trees * fix: qr extractor tests * chore: remove unassigned age signal * chore: modify timestamp func comment * fix: add constrain on photo bytes delimiter * fix: add range check on minimumAge within 2^7 * fix: range check for country not in list * chore: remove dummy constrain * fix: assert lessthan * fix: check is photoEOI valid * fix: replace maxDataLength with qrPaddedLength for valid del indices * feat: update forbidden countries in disclose and disclose id * feat: convert name to uppercase * fix: add constrain between delimiter and photoEOI * feat: support for phno len 4 and 10 * chore: hard-code attestaion_ID to 3 * feat: calculate nullifier using uppercase name * feat: add real id support * fix: rebase error * chore: refactor * add new nullifier and commitment calc * fix: reuse uppercase name from verify commitment * feat: add a function that will iterate though all pubkeys * chore: skip real id test * chore: yarn format * chore: update yarn.lock * chore: rm trailing / from import * chore: add support for issuing state * chore: linting and types * chore: rm types script from circuits * chore: add license header --------- Co-authored-by: nicoshark <[email protected]> Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: turboblitz <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: crStiv <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: James Niken <[email protected]> Co-authored-by: Kevin Lin <[email protected]> Co-authored-by: leopardracer <[email protected]> Co-authored-by: Olof Andersson <[email protected]> Co-authored-by: vishal <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: kevinsslin <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Eric Nakagawa <[email protected]>
* SDK Go version (#920) * feat: helper functions and constant for go-sdk * feat: formatRevealedDataPacked in go * chore: refactor * feat: define struct for selfBackendVerifier * feat: verify function for selfBackendVerifier * feat(wip): custom hasher * feat: SelfVerifierBacked in go * test(wip): scope and userContextHash is failing * test: zk proof verified * fix: MockConfigStore getactionId function * chore: refactor * chore: remove abi duplicate files * chore: move configStore to utils * chore: modified VcAndDiscloseProof struct * chore: more review changes * feat: impl DefaultConfig and InMemoryConfigStore * chore: refactor and export functions * fix: module import and README * chore: remove example folder * chore: remove pointers from VerificationConfig * chore: coderabbit review fixes * chore: more coderabbit review fix * chore: add license * fix: convert attestationIdd to int * chore: remove duplicate code --------- Co-authored-by: ayman <[email protected]> * Moving proving Utils to common (#935) * remove react dom * moves proving utils to the common * need to use rn components * fix imports * add proving-utils and dedeuplicate entry configs for esm and cjs. * must wrap in text component * fix metro bundling * fix mock import * fix builds and tests * please save me * solution? * fix test * Move proving inputs to the common package (#937) * create ofactTree type to share * move proving inputs from app to register inputs in common * missed reexport * ok * add some validations as suggested by our ai overlords * Fix mock passport flow (#942) * fix dev screens * add hint * rename * fix path * fix mobile-ci path * fix: extractMRZ (#938) * fix: extractMRZ * yarn nice && yarn types * fix test: remove unused * fix mobile ci * add script --------- Co-authored-by: Justin Hernandez <[email protected]> * Move Proving attest and cose (#950) * moved attest and cose utils to common with cursor converted tests in common to use vitest and converted coseVerify.test to vitest after moving from app to common what does cryptoLoader do? * moved away * get buff Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * SELF-253 feat: add user email feedback (#889) * feat: add sentry feedback * add sentry feedback to web * feat: add custom feedback modal & fix freeze on IOS * yarn nice * update lock * feat: show feedback widget on NFC scan issues (#948) * feat: show feedback widget on NFC scan issues * fix ref * clean up * fix report issue screen * abstract send user feedback email logic * fixes * change text to Report Issue * sanitize email and track event messge * remove unnecessary sanitization * add sanitize error message tests * fix tests * save wip. almost done * fix screen test * fix screen test * remove non working test --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> * chore: centralize license header checks (#952) * chore: centralize license header scripts * chore: run license header checks from root * add header to other files * add header to bundle * add migration script and update check license headers * convert license to mobile sdk * migrate license headers * remove headers from common; convert remaining * fix headers * add license header checks * update unsupported passport screen (#953) * update unsupported passport screen * yarn nice * Migrate Analytics (#951) * setup analytics adapter for self mobile sdk client and use in app * wrap for context * fix build * yarn types is an alias for build when build just compiles ts * ok unlock * deeper * ok this looks to work * fix license check * make sure it starts with this line * someone didnt commit * fix double analytics bug and builds * lint * Read document catalog from selfClient (#936) * [SELF-676] feat: upgrade React Native from 0.75.4 to 0.76.9 (#943) * chore: upgrade build tooling to Node 22 and AGP 8.6 * chore: upgrade react-native to 0.76.9 * update lock files and formatting * fix path * fix: handle hermes-engine cache mismatch in CI after React Native upgrade - Add fallback logic to run 'pod update hermes-engine' when pod install fails - This resolves CocoaPods cache issues that occur after React Native version upgrades - Fixes CI pipeline failures on codex/update-core-tooling-for-react-native-upgrade branch * fix: improve hermes-engine cache handling in CI - Preemptively clear CocoaPods cache before pod install - This prevents dependency analysis failures that occur when cached podspecs conflict - Addresses the root cause: cache conflicts during 'Analyzing dependencies' phase - Keeps fallback logic for additional safety * fix: handle hermes-engine cache in mobile-bundle-analysis workflow - Add pod-install-with-cache-fix.sh script to handle hermes-engine cache conflicts - Update install-app:setup script to use the new cache fix approach - This fixes the mobile-bundle-analysis.yml workflow failures after React Native upgrade - Proactively clears CocoaPods cache and has fallback for hermes-engine updates * formatting * fix: robust hermes-engine cache handling in CI workflows - Apply comprehensive cache clearing to mobile-ci.yml and mobile-e2e.yml - Pre-emptively run 'pod update hermes-engine' before pod install - Clear multiple cache locations to handle CI environment differences - This prevents 'hermes-engine differs from Pods/Local Podspecs' errors - Fixes all workflows affected by React Native 0.76.9 upgrade cache issues * fixes * clean up * update lock files * fix tests * sort * fixes * fix ci * fix deployment target * android fixes * upgrade fix * fixes * fix: streamline mobile CI build and caching (#946) * fix: streamline mobile CI build and caching * Enable mobile E2E tests on codex/fix-mobile-ci-workflow-errors branch * test * simplify and fix path * workflow fixes * fix loading on 0.76.9 * clean up unnecessary comments * fix readme * finalize upgrade to 0.76.9 * fix android build and upgrade * fix bundler caching * download cli to fix "yarn start" issues * fix cli build erorr * fix script path * better path * abstract build step to prevent race condition * fixes * better cache * fix corepack build error * update lock * update lock * add yarn cache to workflows * fix test building * ci caching improvements * fix common type check * fix common ci * better mobile sdk alpha building logic * chore: speed up mobile e2e workflow (#962) * chore: speed up mobile e2e workflow * chore: disable android e2e job * chore: speed up ios build * fix: bundle js for ios debug build * fix e2e * fix mobile ci (#964) * feat: improve mixpanel flush strategy (#960) * feat: improve mixpanel flush strategy * fixes * fix build * update lock * refactor methods * conslidate calls * update package and lock * refactor: remove namespace imports (#969) * refactor: remove namespace imports * refactor: use named fs imports * refactor(app): replace path and fs namespace imports * format * format * Mixpanel tweaks (#971) * udpates * fox * update license * Add DSC parsing check (#836) * Handle missing dsc parsed * nice * fix test * throw * fix * chore(app): upgrade dependencies (#968) * chore(app): upgrade dependencies * update package * update lock files * fixes * lock * fix * Auth Adapter + (#958) * basic auth adapater * remove SelfMobileSDk, this was another architecture which the adapter patern replaced * rename to avoid confusion with client.test.ts * basic auth adapater * remove SelfMobileSDk, this was another architecture which the adapter patern replaced * rename to avoid confusion with client.test.ts * self * fix * remove prototypes * make sure its mounted * fix tests * fmt * require required adapters * fix types * not a partial * adds missing exports * fix missing data * Fix nfc configuration scanning issue (#978) * fix nfc scanning on ios and android * save test * fix tests * fix lint * Chore fix ios nfc scanning and compiling (#979) * fixes * silence error * fix debugge * fix nfc scanning * lint and pipeline fixes * large runner (#980) * chore: update to macos latest large runner (#981) * bump up to macos-latest-large * fix ci * Move loadSelectedDocument to SDK (#967) Co-authored-by: Aaron DeRuvo <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * docs: update mobile SDK migration progress (#982) * docs: record app integration progress * docs: consolidate mobile SDK migration tracking * docs: humanize migration tracking and merge prompts * docs: add common consolidation tasks * docs: reprioritize migration tasks * docs: soften migration plan tone * docs: detail agent prompts with file paths * docs: catalog Linear tasks for SDK * updates * remove artifact management * moves validateDocument functions into the common package. (#977) * moves validateDocument functions into the common package. * fix build issues and lint * handle bad connections better in nullifiier * add an abort controler to nullifer fetcher, ignore fals positives * import types separately * take it as an arg * chore: update yarn.lock * chore(app): resolve lint warnings (#990) * chore(app): resolve lint warnings * update lock * clean up any types * fix types * feedback from cr * [SELF-703] feat: Migrate mock generator to mobile sdk (#992) * feat: expose mock generator * formatting * fix tests and lint * rename passport to document * fix types * [SELF-698] scaffold mobile sdk demo app (#993) * chore: scaffold mobile sdk demo app * test: cover demo app menu * prettier and types * sort * add android app foundation * fix android loading * get ios app running * update script * cr feedback * disable fabric * fixes * fixes * fix * SELF-702: Refactor navigation structure and dev utilities (#994) * Refactor navigation and dev screens * refactor: rename passport screens to document * fixes * add missing header * fixes * type files * feat: clarify proof verification analytics (#996) * feat: increase sha256 byte size and add new rsa circuits (#986) * feat: increase sha256 byte size and add new rsa circuits * feat: modularise the rsa fp pow mod * chore: comment signature verifier for testing * fix: sha256_sha256_sha224_ecdsa_secp224r1 * lint * chore: implement google play suggestions (#997) * google play suggestions * update gitguardian ignore * remove unused * chore: address yarn lock issues (#1004) * address yarn lock issues * fix postinstall * skip postinstall for ci (#1005) * [SELF-654] feat: add native modules (#919) * feat: add ios native modules * fix: extractMRZ * Add android OCR native module * wire native mrz module with adapter * wire Native modules and fix tests * fixes * fix license header logic * fix tests * fix types * fix: ci test * fix: android build ci * fix: ios build CI * add podfile.lock * add yarn.lock * update lock files * add yarn.lock * add license * order methods * update lock * pipeline fixes * prettier * update lock file * fix native modules on external apps * bundle @selfxyz/common into mobile-sdk-alpha * chore: address yarn lock issues (#1004) * address yarn lock issues * fix postinstall * update lock * fix build issues * fix pipeline issue * fix ci * fix bad merge * fix android ci * fix ci errors * fix mobile sdk ci. stop gap fix for now until we create a package * tweaks * retry aapt2 approach * use ^0.8.4 instead of ^0.8.0 due to the use of custom errors * workflow fixes * fix file * update * fix ci * test ci fix * fix test --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> * chore: update dev with staging 09/06/25 (#1007) * update CI * bump iOS version * update readme * update mobile-deploy ci * bump version iOS * update workflow to use workload identity federation (#933) * update workflow to use workload identity federation * add token permissions * correct provider name * chore: incrementing android build version for version 2.6.4 [github action] --------- Co-authored-by: Self GitHub Actions <[email protected]> * update ci * update ci * update ci * update ci * update ci * fix ci * fix ci * fix ci * remove fastlane use for android * bump iOS build version * update CI python script * iterate on CI * iterate on CI * iterate on CI * Dev (#941) * SDK Go version (#920) * feat: helper functions and constant for go-sdk * feat: formatRevealedDataPacked in go * chore: refactor * feat: define struct for selfBackendVerifier * feat: verify function for selfBackendVerifier * feat(wip): custom hasher * feat: SelfVerifierBacked in go * test(wip): scope and userContextHash is failing * test: zk proof verified * fix: MockConfigStore getactionId function * chore: refactor * chore: remove abi duplicate files * chore: move configStore to utils * chore: modified VcAndDiscloseProof struct * chore: more review changes * feat: impl DefaultConfig and InMemoryConfigStore * chore: refactor and export functions * fix: module import and README * chore: remove example folder * chore: remove pointers from VerificationConfig * chore: coderabbit review fixes * chore: more coderabbit review fix * chore: add license * fix: convert attestationIdd to int * chore: remove duplicate code --------- Co-authored-by: ayman <[email protected]> * Moving proving Utils to common (#935) * remove react dom * moves proving utils to the common * need to use rn components * fix imports * add proving-utils and dedeuplicate entry configs for esm and cjs. * must wrap in text component * fix metro bundling * fix mock import * fix builds and tests * please save me * solution? * fix test * Move proving inputs to the common package (#937) * create ofactTree type to share * move proving inputs from app to register inputs in common * missed reexport * ok * add some validations as suggested by our ai overlords * Fix mock passport flow (#942) * fix dev screens * add hint * rename * fix path * fix mobile-ci path * fix: extractMRZ (#938) * fix: extractMRZ * yarn nice && yarn types * fix test: remove unused * fix mobile ci * add script --------- Co-authored-by: Justin Hernandez <[email protected]> * Move Proving attest and cose (#950) * moved attest and cose utils to common with cursor converted tests in common to use vitest and converted coseVerify.test to vitest after moving from app to common what does cryptoLoader do? * moved away * get buff Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * SELF-253 feat: add user email feedback (#889) * feat: add sentry feedback * add sentry feedback to web * feat: add custom feedback modal & fix freeze on IOS * yarn nice * update lock * feat: show feedback widget on NFC scan issues (#948) * feat: show feedback widget on NFC scan issues * fix ref * clean up * fix report issue screen * abstract send user feedback email logic * fixes * change text to Report Issue * sanitize email and track event messge * remove unnecessary sanitization * add sanitize error message tests * fix tests * save wip. almost done * fix screen test * fix screen test * remove non working test --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> * chore: centralize license header checks (#952) * chore: centralize license header scripts * chore: run license header checks from root * add header to other files * add header to bundle * add migration script and update check license headers * convert license to mobile sdk * migrate license headers * remove headers from common; convert remaining * fix headers * add license header checks * update unsupported passport screen (#953) * update unsupported passport screen * yarn nice --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: ayman <[email protected]> Co-authored-by: Aaron DeRuvo <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * bump version * bump yarn.lock * update ci (#966) * chore: Manually bump and release v2.6.4 (#961) * update lock files * bump and build android * update build artifacts * show generate mock document button * update lock * fix formatting and update failing e2e test * revert podfile * fixes * fix cold start of the app with deeplink * update ci * update ci * Sync MARKETING_VERSION to iOS project files after version bump * chore: incrementing android build version for version 2.6.4 [github action] (#976) Co-authored-by: remicolin <[email protected]> * chore: add build dependencies step for iOS and Android in mobile deploy workflow * chore: enhance mobile deploy workflow by adding CMake installation step * bump android build version * chore: incrementing android build version for version 2.6.4 [github action] (#985) Co-authored-by: remicolin <[email protected]> * chore: configure Metro bundler for production compatibility in mobile deploy workflow * chore: incrementing android build version for version 2.6.4 [github action] (#987) Co-authored-by: remicolin <[email protected]> * Revert "chore: configure Metro bundler for production compatibility in mobile deploy workflow" This reverts commit 60fc1f2580c2f6ad3105d8b904d969412a18bd2e. * reduce max old space size in mobile-deploy ci * fix android french id card (#957) * fix android french id card * fix common ci cache * feat: log apdu (#988) --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> * unblock ci * fix merge * merge fixes * fix tests * make ci happy --------- Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: pputman-clabs <[email protected]> Co-authored-by: Self GitHub Actions <[email protected]> Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: ayman <[email protected]> Co-authored-by: Aaron DeRuvo <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: fix yarn format (#1009) * fix yarn format * yarn format * fix lint * undo temporary disabling * pipeline fixes * revert nvmrc change * add new home screen (#1019) * add new home screen * fix typing issue * yarn nice * chore: update the cpp build script (#1021) * chore: install node (#1022) * chore: use node v22 (#1023) * chore: install yarn (#1024) * chore: yarn cache (#1025) * chore: sanitise node version (#1026) * remove lazy loading (#1018) * remove lazy loading * fix tests * formatting * fix imports and web ci * fix tests * fix building * fix * debug ci * fix web ci issue * fix * fix * fix ci * remove web render test * coderabbit feedback * fix ci * use import * fix lint * fix compiling * update lock * update lock * fix: update yarn.lock hash for @selfxyz/mobile-sdk-alpha Resolves CI error where yarn install --immutable failed due to outdated package hash. The hash changed from b2afc4 to f9ebb9. * fix: update yarn.lock hash after mobile-sdk-alpha changes - Hash changed from c0e6b9 to 0d0f72 due to package modifications - Cleaned caches and regenerated lockfile to ensure consistency - This resolves CI cache mismatch where old artifacts had stale hash * fix: update yarn.lock hash after building mobile-sdk-alpha - Final hash: 89f5a6 (includes built dist artifacts) - Built mobile-sdk-alpha to ensure package is in stable state - This should resolve CI immutable install errors * fix yarn lock and build * chore(ci): improve mobile e2e caching (#1010) * chore(ci): improve mobile e2e caching * chore(ci): restore deriveddata cache * chore(ci): remove ios deriveddata cache * chore(ci): cache ios derived data * chore(ci): optimize mobile deploy caching * chore(ci): enable ccache for ios e2e builds * fix(ci): add ccache path for ios e2e * moves ofac and protocol store (#1012) * move ofact tree fetch to common * move protocol store to the msdk, fix some dependencies on msdk * chore: remove register id from register circuits (#1028) * chore: remove register id from register circuits * chore: only use 128ram instance * Feat/build cpp (#1029) * chore: remove register id from register circuits * chore: only use 128ram instance * chore: build 2 circuits at a time * Remove navigationRef from provingMachine (#1011) * SDK: minimize amount of data sent through PROVING_PASSPORT_NOT_SUPPORTED event (#1030) * Fix mock passport generation (#1031) * fix mock passport generation * fix mobile ci tests * Feat/aadhaar (#949) * make contract sdk simpler (#514) * make contract sdk simpler * reduce root inputs * delete convert function * summarize our library * update npm package * update package version * update attestation id * add util function to get revealed data * Revert "make contract sdk simpler (#514)" (#518) This reverts commit 847b88d5ecc0d449b976a552f68af38eec8e561b. * merge dev into main (#576) * Feat: Show error code in SDK (#500) * feat: emit `error_code` and `reason` in app * feat: add `onError` in sdk * feat: Display reason in app * lint & fmt * feat: add scrollview in ProofRequestStatusScreen for long reasons * Fix input generation for 521bit curves (#481) * fix EC point padding for 521 bit curves * rename modulus to point in findStartIndexEC as it is a point * simplify matching logic * simplify padding logic * remove comment * remove log removing .only so the CI/CD runs circuit tests fix disclosure test fix scope in test fix scope error in circuit tests remove .only fix test * run ci/cd * Feat/simpler contract sdk (#519) * make contract sdk simpler * reduce root inputs * delete convert function * summarize our library * update npm package * update package version * update attestation id * add util function to get revealed data --------- Co-authored-by: motemotech <[email protected]> * forgot to include package update (#521) * Bump version to 2.5.1 (#522) * bump version * update fastlane * fix bump version * bump build and add todo * disable commit for now * [SEL-154] Step 1: Scan your passport (#511) * simplify navigation logic * use aesop design hook * save wip * add new aesop redesign screens * save wip design * refactor nav bar logic * fix paths * save wip * stub progress navbar and save wip * save wip progress bar animation * save wip progress bar, almost done with design * fix progress bar design * fix bottom padding * disable git commit for now * fix flaky android downloads that causes pipeline to crash * update lock for ci * [SEL-46] FE: Add minimum bottom padding (#510) * fix bottom padding for smaller screens * fix podfile post install hook permissions check * update pod lock and disable git commit action step for now * update lock * fix flaky android downloads that causes pipeline to crash * fix: improve error handling for forbidden countries list mismatch (#494) * Update SelfBackendVerifier.ts * Update constants.ts * Update formatInputs.ts * Update formatCallData.ts * DX: Auto format on save (#526) * save wip * use elint instead of prettier to sort imports * set imports to warn * sync prettier settigns * update prettier settings * save working version * fix export and disable mobile pipeline for now * limit auto formatting to the app folder * remove artefacts * SEL-187: Make bottom layout scrollable on smaller screens (#525) * fix design check * add an option to disable local sending of sentry events * better sentry enable / disable * fix scan passport height * make bottom layout scrollable so it doesn't squish top screen * simpler logic check. don't create new env var * fix internet connection issues * readd comment * use isConnected instead of internet reachable * use a dynamic bottom panel height * add missing recovery screens * move aesop below * remove dupe export * fix rebase * fix android package download issue * Feat/extend id support (#517) * refactor proving impleting xstate, speedup proving * add disclosure proof support * keep refactoring provingMachine, clean old implementation * call init method when switching from dsc to register * rebase with dev to display why the proof verification failed * refactor ws connexion between front-end and mobile to retrieve self-app * update the webclient at proofVerification and use selfAppStore in provingMachine * fix provintStore.init in ProveScreen * yarn nice * fetch data correctly in splash screen * Bump build versions for 2.5.1 (#531) * release new builds * fix app and build versions * fix env check * display error animation on failure on loading screen (#532) * display error animation on failure on loading screen * remove log --------- Co-authored-by: Justin Hernandez <[email protected]> * ci: bump actions/checkout to v4 (#529) * make contract sdk simpler (#514) * make contract sdk simpler * reduce root inputs * delete convert function * summarize our library * update npm package * update package version * update attestation id * add util function to get revealed data * Revert "make contract sdk simpler (#514)" (#518) This reverts commit 847b88d5ecc0d449b976a552f68af38eec8e561b. * ci: bump actions/checkout to v4 --------- Co-authored-by: nicoshark <[email protected]> Co-authored-by: turnoffthiscomputer <[email protected]> * fix italy (#530) * Fix/proving machine endpoint type (#538) * store endpoint type in proving machine * yarn nice * fix splash screen error (#539) * New bug fix build for v2.5.1 (#540) * bump new build for dev fixes * update lock * reinstall before running local deploy * SEL-178: Improve haptic feedback library (#535) * fix dev settings typing * add dev screens file * save haptic feedback progress * change ordedr * fix initial route and add haptic feedback screen to dev settings options * add delete scripts (#542) * update staging registry address (#545) * feat: Add Disclose history (#533) * feat: Add Disclose history * fix: Duplicate history in list * fix: Outdated disclosures * Delete app/ios/Self copy-Info.plist * allow a scale of up to 1.3 (#546) * allow a scale of up to 1.3 * update lock files * clean up unused imports * fix settings * add common sdk (#537) * add common sdk * remove sdk backend api * remove registry * regenerate sha256 rsa dsc each time * download ski-pem dynamically on staging, refactor initpassportDataParsing * add state machine for button on prove screen, improve ux on splash screen * fetch ski-pem in production * fix linter issues * fix prove screen button bugs * update podfile.lock and yarn.lock * run linter in circuits repo * bump build * bump version for sentry debugging * bump ios to version 118 --------- Co-authored-by: Justin Hernandez <[email protected]> * better connection check (#548) * Clean up navigation and setup Jest (#549) * remove dupe account screens and prefer the term home * organize screen loading better * sort keys * rename screen files wip * fix deleted directory issues * rename folders * fix paths and naming * save working jest import test * save base working jest navigation test * finalize navigation refactor and jest test * update test name and podfile lock * remove unused packages * use the correct version of react test renderer * bump build (#552) * Eth dublin (#554) * add mock id card generator * add genMockIdDoc in common/sdk exports * onboard developer id using deeplink, allow custom birthdate on mockpassport * log more dsc info (#558) * Push notification (#536) * add push notification feature * merge new app impl * change dsc key * import * reverse mock dsc * worked in the ios * checked in android * update url and delete console * delete small changes * lint * add yarn.lock * fix warning message * add mock notification service for test code * fix path for the mock implementation * add mock deeplink to the test code * nice notificationServiceMock.js * delete unused firebase related implementation * fix wording and UI related to notification service * hotfix on mockdatascreen --------- Co-authored-by: turnoffthiscomputer <[email protected]> * Fix deeplink 2 (#560) * fix deeplink * fix deeplink * yarn nice * feat: Use vision for MRZ scanning (SEL-47) (#557) * feat: Use vision for MRZ scanning * modify label to position the smartphone during the OCR scan --------- Co-authored-by: turnoffthiscomputer <[email protected]> * SEL-255: improved loading screen with estimated wait times (#550) * create new loading screen and rename static to misc * fix route * save wip loading screen * save wip animation * save static wip design * continue * splash * add a loading screen text helper * add test for loading screen text * save wip. almost there * update haptic logic * better feedback and add dev scren * save current work * update text logic and tests * load passport metadata in loading screen * simplify and fix tests * test for additional exponents * add new animation * rename file * consolidate ui useEffect and fix loading screen layout * fix current state * remove mockPassportFlow param * merge new loading screen and new notification logic * simplify * update lock * use passportMetadata instead of metadata * save simplification * update loading text based on pr feedback and tests * Bump v2.5.1: ios 122; android 60 (#561) * increment build to 120 * bump builds for 2.5.1. ios 121; android 60 * clean up logic * upgrade react native firebase for privacy manifests * update react native keychain to fix could not recover issue (#564) * fix: update ocr corrections (#563) * Chore: Polish proof history to prep for release (#566) * clean up nav and home boundaries, passport data screen insets * migrate proof history screen out of settings * minor clean up * save wip * add new ibm plex mono font and clean up proof detail screen * remove test data * remove extra loading screen text * remove unnecessary ceil * Bump v2.5.1; ios 123; android 62 (#565) * bump to build 61 * bump ios version * update version * Feature/add prettier formatter (#568) * Add Prettier configuration and ignore files for code formatting - Created .prettierignore to exclude specific directories and files from formatting. - Added .prettierrc.yml with custom settings for print width and trailing commas. - Updated package.json to include Prettier and its Solidity plugin as dependencies, along with scripts for formatting and checking code. * Run prettier formatting * fix nationality using mock passports * SEL-181 & SEL-252: Update mobile app events (#570) * improve analytics handling * add error boundary that flushes segment events before error occurs * upgrade segment analytics package * flush analytics when user encounters error screen * track all click events * add tracking to loading screen * better init and click event names * track cloud backup and modal actions * use __DEV__ for debugging * add tracking to account recovery, auth, mock data * return false instead of throwing * add more tracking events * save wip event updating * abstract analytic event names * update click events * clean up * move reasons comment * add unsupported passport event * Feature/enhance self verification root (#569) * Add SelfVerificationConsumer contract for self-verification logic - Introduced an abstract contract, SelfVerificationConsumer, that extends SelfVerificationRoot. - Implemented nullifier tracking, verification success events, and customizable validation and update methods for nullifiers. - Added error handling for nullifier check failures and hooks for derived contracts to implement custom logic after successful verification. * Add SelfHappyBirthday contract example using SelfVerificationConsumer - Introduced SelfHappyBirthday contract that allows users to claim USDC on their birthday. - Integrated SelfVerificationConsumer for handling verification and nullifier tracking. - Added functions to set claimable amount and window, along with event emissions for state changes. - Implemented logic to check if the claim is within the user's birthday window and transfer USDC accordingly. * Refactor imports in HappyBirthday contract for better organization - Updated import statements in HappyBirthday.sol to use relative paths for ISelfVerificationRoot, SelfCircuitLibrary, and SelfVerificationConsumer. - Improved code readability and maintainability by organizing imports more logically. * Refactor Airdrop contract to use SelfVerificationConsumer for registration logic - Updated Airdrop contract to inherit from SelfVerificationConsumer instead of SelfVerificationRoot. - Refactored mappings for user identifiers and nullifiers for improved clarity and functionality. - Enhanced error handling and updated function parameters for consistency. - Implemented new validation and update methods for nullifiers, streamlining the registration process. - Removed deprecated verifySelfProof function and integrated logic into new methods. * Add events and refactor SelfVerificationRoot and related contracts - Introduced new events in SelfVerificationRoot for verification configuration updates, scope changes, and attestation ID management. - Updated Airdrop contract to remove deprecated events and added a new event for Merkle root updates. - Refactored SelfPassportERC721 to inherit from SelfVerificationConsumer, enhancing verification logic and event handling. - Improved function parameters for consistency and clarity across contracts. * Refactor contracts to use SelfVerificationRoot and enhance verification logic - Removed SelfVerificationConsumer contract and updated related contracts to inherit from SelfVerificationRoot. - Refactored mappings and event emissions in Airdrop, HappyBirthday, and SelfPassportERC721 for improved clarity and functionality. - Enhanced verification success hooks to include user identifiers and nullifiers for better tracking. - Updated constructor parameters for consistency across contracts and improved error handling for user registration and claims. * Refactor constructor in SelfPassportERC721 for improved readability * Refactor function parameters in SelfVerificationRoot and related contracts * Refactor constructor parameter names in IdentityVerificationHub, Airdrop, IdentityRegistry, and ProxyRoot contracts for improved clarity and consistency * fix getCircuitName function (#575) * fix getCircuitName function * fix getCircuitName function * feat: Read ID cards (#571) * Update GitHub checkout action from v3 to v4 (#544) * Bump build version 2.5.2 to test react native keychain (#572) * bump build and version * bump version 2.5.2 * don't downgrade react native keychain * update app/README.md toolchain instructions (#140) * bump build (#580) --------- Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: turboblitz <[email protected]> Co-authored-by: motemotech <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: crStiv <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: James Niken <[email protected]> Co-authored-by: Kevin Lin <[email protected]> Co-authored-by: leopardracer <[email protected]> Co-authored-by: Olof Andersson <[email protected]> * feat(wip): register circuit for aadhaar * chore: add anon aadhar circuits * chore: remove sc and disclose selfrica test * feat: extract aadhaar qr data * test: aadhaar qr data extract circuit * test: aadhaar register circuit * feat: extract pincode and ph no last 4 digit * fix: register aadhaar nullifier and commitment * test: Verify commitment circuit of aadhaar * feat: add photoHash inside commitment * feat: build Aadhaar OFAC SMT * feat: ofac check and reveal data (test done) * test: qr extractor for custom data input * feat: add state as reveal data inside VC and disclose * chore: add comments * fix: num2Ceil component * chore: review changes * chore: use passport SignatureVerifier * fix: signatureVerifier inputs * feat: extract ascii values of fields * feat: provide users the flexibility to reveal specific characters of a field * chore: refactor * test: register aadhaar for tampered data * test(wip): should return 0 if in ofac list * test: ofac check * test: register aadhaar circuit for different qr data * merge dev into main (#683) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) * implement self uups upgradeable (#592) * implement self uups upgradeable * small changes in identityVerificationHubImplV2 * delete aderyn.toml * chore: add custom verifier * chnage return output * feat: use self structs and a Generic output struct * feat: add userIdentifier, nullifier, forbiddencountries to returned output * add root view functions from registry * fix: build and compilation errors * add userDefined data into selfVerificationRoot * "resolve conflicts" * fix compilation problem * fix how to register verification config * test: CustomVerifier * fix verification root and hub integration * add scope check in hub impl * replace poseidon hash to ripemd+sha256 * add todo list * feat: refactor and add test cases for generic formatter * add performUserIdentifierCheck in basicVerification * change how to handle additionalData and fix stack too deep * start adding test codes * fix dependency problems in monorepo * fix: forbidden countries (#612) LGTM! * able to run test code * pass happy path * delete unused codes * change error code name, add caller address validation and add scripts to run test and build in monorepo * add all test cases in vcAndDisclose flow * remove comment out * chore: use actual user identifier outputs * success in registration tests * cover all cases * pass contractVersion instead of circuitVersion * fix disclose test * chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter * change val name and remove unused lines * add val name change * remove userIdentifier from return data * feat: use GenericDiscloseOutput struct in verfication hook fix test cases for user identifier * chore: change the function order for Hub Impl V2 (#625) * fix nat specs * add nat spec in SelfStructs --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Nesopie <[email protected]> * prettier (#629) * CAN auth - android (#613) * add missed files * add NFCMethodSelectionScreen * bump android build --------- Co-authored-by: Justin Hernandez <[email protected]> * feat: add MRZ correction method to NFCMethodSelectionScreen (#627) * add npm auth token env (#632) * bump sdk version (#633) * publish npm package when merging on dev * bump common sdk version * replace yarn publish by npm publish * update common package version * Simplify dev mode gesture (#635) * Simplify developer mode gesture * Enable dev mode on MockData screen with five taps * add build smt function to common sdk * update vc_and_disclose_id test (dev branch) (#641) * fix: vc_and_disclose_id test * chore: yarn prettier * Show modal on NFC scan error (#642) * Add help button and error modal actions * fix the screen management * yarn nice * Bump build v2.5.4: ios 132; android 71 (#631) * bump version and build numbers * remove tamagui/toast * fix marketing version * fix: update TD1 and TD3 checks (#643) * bum yarn.lock * Bump build: ios 133; android 72 and build fixes (#654) * update gesture version and bump android build * bump and fix ios build * update lock files * fixes * fix fotoapparat library source * Update example contracts to include EUID usage (#656) * refactor: update HappyBirthday contract to V2 with support for E-Passport and EUID cards, introduce bonus multipliers, and enhance verification logic * refactor: update Airdrop contract to V2 with support for E-Passport and EU ID Card attestations * refactor: remove BASIS_POINTS constant from Airdrop contract * feat: introduce SelfIdentityERC721 contract for issuing NFTs based on verified identity credentials, replacing SelfPassportERC721 * fix: update verification functions in Airdrop, HappyBirthday, and SelfIdentityERC721 contracts to use customVerificationHook * cherry pick commit from add-test-self-verification... * block non-dev pr to main branch * audit fixes (#645) * merge dev branch into main (#624) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> * update contracts (#628) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) * implement self uups upgradeable (#592) * implement self uups upgradeable * small changes in identityVerificationHubImplV2 * delete aderyn.toml * chore: add custom verifier * chnage return output * feat: use self structs and a Generic output struct * feat: add userIdentifier, nullifier, forbiddencountries to returned output * add root view functions from registry * fix: build and compilation errors * add userDefined data into selfVerificationRoot * "resolve conflicts" * fix compilation problem * fix how to register verification config * test: CustomVerifier * fix verification root and hub integration * add scope check in hub impl * replace poseidon hash to ripemd+sha256 * add todo list * feat: refactor and add test cases for generic formatter * add performUserIdentifierCheck in basicVerification * change how to handle additionalData and fix stack too deep * start adding test codes * fix dependency problems in monorepo * fix: forbidden countries (#612) LGTM! * able to run test code * pass happy path * delete unused codes * change error code name, add caller address validation and add scripts to run test and build in monorepo * add all test cases in vcAndDisclose flow * remove comment out * chore: use actual user identifier outputs * success in registration tests * cover all cases * pass contractVersion instead of circuitVersion * fix disclose test * chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter * change val name and remove unused lines * add val name change * remove userIdentifier from return data * feat: use GenericDiscloseOutput struct in verfication hook fix test cases for user identifier * chore: change the function order for Hub Impl V2 (#625) * fix nat specs * add nat spec in SelfStructs --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Nesopie <[email protected]> * prettier (#629) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> Co-authored-by: Nesopie <[email protected]> * fix: vc_and_disclose_id test (#640) * fix: vc_and_disclose_id test * chore: yarn prettier * fix: check if a config id exists * chore: change the function where the config not set verification is happening * fix: add await * feat: add getConfigId function in SelfVerificationRoot (#650) * feat: add getConfigId function in SelfVerificationRoot * update comment --------- Co-authored-by: motemotech <[email protected]> * chore: fix ofac end index in eu id cards * chore: fix tests * fix: example contracts and tests --------- Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> * Update deployment module for Identity Verification Hub V2 with detailed documentation and library linkage for CustomVerifier. Update initialization process to reflect changes in V2 implementation, ensuring proper setup for proxy deployment. (#658) * publish npm-package (#651) * App/eu id updates (#638) * fix build issues * generate disclosure proof with euids * generate disclosure proof with euids * Eu id updates 2 (#648) * update vc_and_disclose_id test (dev branch) (#641) * fix: vc_and_disclose_id test * chore: yarn prettier * Show modal on NFC scan error (#642) * Add help button and error modal actions * fix the screen management * yarn nice * Bump build v2.5.4: ios 132; android 71 (#631) * bump version and build numbers * remove tamagui/toast * fix marketing version * fix: update TD1 and TD3 checks (#643) * bum yarn.lock * add version and user defined data --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> * remove the mock user define data * get the useridentifier as a hash from the user defined data * chore: add version and userDefinedData * feat: use the version in register / dsc proofs as well * update calculateUserIdentifierHash * yarn nice * refactor: consolidate user context data handling and update payload structure * fix typing issues on sha1 * remove console.log(sha1) * fix sha1 import * refactor: streamline userDefinedData handling and adjust payload type for circuit * refactor: update sha1 usage and enhance logging in calculateUserIdentifierHash * yarn nice * yarn lint common * use ts-ignore for sha1 import * fix app ci tests * fix typing issue * remove unused ts-ignore * cast uuid before calling generateinputs * bump qrcode version * add tsup on the qrcode sdk * fix: exports on selfxyz/qrcode * update how we define config.version * fix yarn imports * yarn format --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Ayman <[email protected]> * Hotfix contract compile error (#660) * Fix previous rebase error * Refactor deployment module for Identity Verification Hub V2. * Fix/sdk (#652) * fix: sdk build configs * chore: SelfBackendVerifier (WIP) * feat: add custom verification * feat: consider destination chain in user defined data * chore: export attestation id * chore: export attestation id * chore: export config storage * chore: don't throw an error if the proof is not valid * chore: trim abi and rm typechain types * refactor * chore: rm unnecessary exports * 📝 Add docstrings to `fix/sdk` (#653) Docstrings generation was requested by @remicolin. * https://github.com/selfxyz/self/pull/652#issuecomment-2992046545 The following files were modified: * `sdk/core/src/utils/hash.ts` * `sdk/core/src/utils/proof.ts` * `sdk/core/src/utils/utils.ts` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * review fixes * chore: fix package.json cjs types * chore: add minor changes to checks * feat: add InMemoryConfigStore, allIds constant and verificationResult type * chore: export Verification config * feat: change the verification config types * fix: throw issues early if verification config is null * fix: update yarn.lock file * chore: lint * fix: rm ts expect error directive * fix: contract tests * use excluded countries instead forbidden countries list * chore: change types in constnats --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update npm-publish workflow and bump core package version to 1.0.0 (#661) * update import * Update get verification config visibility (#664) * Update deployment module for Identity Verification Hub V2 to correct file paths and module name for deployment commands. * Add troubleshooting documentation for verification issues in deployHubV2.ts. Include manual verification steps and common failure reasons to assist users during deployment. * Change visibility of getVerificationConfigV2 function from internal to public in IdentityVerificationHubImplV2 contract to allow external access. * Apply BUSL v1.1 license headers to app (#665) * Add BSL license headers to app sources * prettier * fix license reference - https://spdx.org/licenses/BUSL-1.1.html * bump build: android 73 (#659) * Contracts/deploy staging (#668) * update scripts * deploy vc and disclose id * fix the deployment scripts on staging * update yarn.lock * bump ios build and version (#669) * configure coderabbitai (#670) * tweak coderabbit * bump * more thorough test spec * Apply BSL to app codebase (#639) * Clean up root license wording * Simplify SPDX header * simplify license and rename BSL to BUSL * fix merge issues * fix missing method --------- Co-authored-by: Justin Hernandez <[email protected]> * SEL-423 apply xcode build suggestions (#671) * apply recommended app settings from xcode * stick to portrait orientation and update target settings * remove app clip references * Circuit audit fixes (#644) * feat: add range checks before use of LessEqThan and SelectSubArray * fix: Num2Bits_strict to constrain virtualKey * bump core version * bump core version and fix ci * chore: use npm_auth_token in yarnrc * chroe: rm yarnrc changes * chore: update npm publish * chore: run npm publish manually * chore: change hub contract address (#675) * Update npm-publish.yml * chore: use proper secret when publishing * feat: enable publishing if workflow was triggered manually * Contracts/update verifier (#673) * update hardhat config * update vc and disclose verifier * update vc and disclose verifier script and run it * update test self verification root * update verifier * bump sdk version and use new hub address * chore: update zk-kit binary merkle root dep (#674) * refactor deployment scripts (#678) * feat: add register eu id instances (#682) * feat: add register eu id instances * feat: add new instances * chore: update scripts * chore: fix sig alg * chore: rm circuits --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> Co-authored-by: Nesopie <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Kevin Lin <[email protected]> Co-authored-by: kevinsslin <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Eric Nakagawa <[email protected]> * fix: commitment hash * fix: register aadhaar test * chore: refactor * feat: reveal data in packed bytes * feat: add constrain on delimiterIndices * feat: reveal timestamp * merge main to feat/aadhaar * fix: tests * feat: hash pubKey * feat: add registry contract * feat: Update HubImplV2 (WIP) * add functions to generate aadhaar data (WIP) * modularize aadhaar data generation (WIP) * fix(wip): register test * fix: test qr extractor * fix * chore: refactor functions * feat: add age extractor and tested * feat: add isMiniumAge check * fix: prepareAadhaarTestData func * registry contract tests * feat: registry contract tests * feat: extract fields from qr data bytes * chore: refactor mockData * feat: move minimum age to revealPackedData * feat: create a constant.ts to retrive fields from unpacked bytes * chore: refactor * fix: exports * rebase * rebase * feat: add public signal ,indices mapping * chore: add public output to indices mapping * fix:AADHAAR_PUBLIC_SIGNAL_INDICES * feat: make nullifier public * fix: nullifier cal for disclose circuits * feat: merge isMiniumAgeValid and miniumAge signal * fix: disclsoe test * feat: support for user identifier and secret * chore :refactor * feat: ofac test last name , firstname * feat: add forbidden_countries_list check * feat: add tests for aadhaar (WIP) * failing ofac tests * feat: finish contract tests * fix: merge conflicts * update the common package to be usable in circuits and contracts * lint everything * coderabbit fixes * chore: update name dob,yob aadhaar ofac tree * feat: merge ofac and reverse ofac check into one * test: merged ofac constrain * SELF-253 feat: add user email feedback (#889) * feat: add sentry feedback * add sentry feedback to web * feat: add custom feedback modal & fix freeze on IOS * yarn nice * update lock * feat: show feedback widget on NFC scan issues (#948) * feat: show feedback widget on NFC scan issues * fix ref * clean up * fix report issue screen * abstract send user feedback email logic * fixes * change text to Report Issue * sanitize email and track event messge * remove unnecessary sanitization * add sanitize error message tests * fix tests * save wip. almost done * fix screen test * fix screen test * remove non working test --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> * chore: centralize license header checks (#952) * chore: centralize license header scripts * chore: run license header checks from root * add header to other files * add header to bundle * add migration script and update check license headers * convert license to mobile sdk * migrate license headers * remove headers from common; convert remaining * fix headers * add license header checks * update unsupported passport screen (#953) * update unsupported passport screen * yarn nice * feat: support new ofac trees * fix: qr extractor tests * chore: remove unassigned age signal * chore: modify timestamp func comment * fix: add constrain on photo bytes delimiter * fix: add range check on minimumAge within 2^7 * fix: range check for country not in list * chore: remove dummy constrain * fix: assert lessthan * fix: check is photoEOI valid * fix: replace maxDataLength with qrPaddedLength for valid del indices * feat: update forbidden countries in disclose and disclose id * feat: convert name to uppercase * fix: add constrain between delimiter and photoEOI * feat: support for phno len 4 and 10 * chore: hard-code attestaion_ID to 3 * feat: calculate nullifier using uppercase name * feat: add real id support * fix: rebase error * chore: refactor * add new nullifier and commitment calc * fix: reuse uppercase name from verify commitment * feat: add a function that will iterate though all pubkeys * chore: skip real id test * chore: yarn format * chore: update yarn.lock * chore: rm trailing / from import * chore: add support for issuing state * chore: linting and types * chore: rm types script from circuits * chore: add license header --------- Co-authored-by: nicoshark <[email protected]> Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: turboblitz <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: crStiv <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: James Niken <[email protected]> Co-authored-by: Kevin Lin <[email protected]> Co-authored-by: leopardracer <[email protected]> Co-authored-by: Olof Andersson <[email protected]> Co-authored-by: vishal <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: kevinsslin <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Eric Nakagawa <[email protected]> * fix: CLA not supported (#1027) * fix: CLA not supported * fix "yarn android" building * remove unnecessary commands --------- Co-authored-by: Justin Hernandez <[email protected]> * chore: bump app version v2.6.5 (#1034) * update gem lock * bump build and version * fix app versions * chore: fix nfc passport reader private repo access (#1042) * add internal repo pat * update nfc passport reader location * update workflows to use PAT to access NFC Passport Reader * fix ci * update logic to access private repo * build(android): support 16KB page size (#1043) * build(android): support 16KB page size * fix 16kb * update lock * chore: bump v2.6.5 for release (#1036) * bump build * update to ssh clone to fix local build * update podfile lock * fix version * Feat/build aadhaar (#1044) * feat: build aadhaar circuits as well in the ci * feat: add register aadhaar case handling * fix aadhaar register output after building the cpp circuit (#1045) * fix: metro js crypto module build issues (#1047) * fix sdk build issues * fix build error * sort and fix dependencies * add constants-browserify * feat: add new verifiers (#1049) * feat: add new verifiers * format: contracts * fix: ofac check to aadhaar (#1050) * fix: hub-v2 (#1051) * Add DisclosureVerified event for comprehensive verification tracking (#945) * Add VerificationPerformed event to track verification calls - Added VerificationPerformed event with comprehensive tracking fields - Captures requestor contract, version, attestation ID, chain ID, config ID, user identifier, output, and user data - Enhanced _executeVerificationFlow to return additional tracking data - Event emission placed after verification completion for accurate tracking * chore: run formatter * chore: rename verify event name to DisclosureVerified * move clearPassportData, markCurrentDocumentAsRegistered, reStorePassportDataWithRightCSCA to SDK (#1041) * Move self app store to mobile sdk (#1040) * chore(mobile-sdk-alpha): remove unused tslib dependency (#1053) * remove tslib -- seems unused * remove deps accidentally added to root * build file * remove unused imports (#1055) * fix: sha256 signed attr tests (#1058) * fix mock screen launch (#1059) * Hotfix: Belgium ID cards (#1061) * feat: parse belgium TD1 mrz android * feat: Parse Belgium TD1 MRZ IOS * fix: OFAC trees not found (#1060) * fix: relax OFAC tree response validation * test: cover OFAC tree edge cases * fix stateless * revert and fix types * fix tests * [SELF-723] feat: add structured NFC and Proof logging (#1048) * feat: add structured NFC logging * fix ci * Fix: add deps * logging fixes. use breadcrumbs * fix android build * update SeverityLevel * [SELF-705] feat: add proof event logging (#1057) * feat: add proof event logging * refactor: unify sentry event logging * fix types * fix mock * simplify * code rabbit feedback * fix tests --------- Co-authored-by: seshanthS <[email protected]> * skip on dev (#1063) * don't get fancy just disable (#1064) * saw it building so gonna try (#1065) * Dev (#1074) * chore: bump v2.6.5 rd2 (#1067) * commit wip version bump * remove from building * chore: update tooling dependencies (#1069) * chore: update tooling dependencies * chore: align react typings and node types * update lock * chore: minor fixes across monorepo (#1068) * small fixes * fixes * fix gesture handler error * ci fixes * fix yarn build; add workflow ci (#1075) * add new workspace ci * disable package version check for now * build before checks * format * fix in future pr * feat: add functions for disclosing aadhaar attributes (#1033) * feat: add functions for disclosing aadhaar attributes * format * chore: update monorepo artifacts (#1079) * remove unneeded artifacts, skip building circuits * update md files * cleans up unused parts of sdk interface, adds inline documentation, (#1078) * cleans up unused parts of sdk interface, adds inline documentation, * fix up build * yolo * Feat/aadhaar sdk (#1082) * feat: add aadhaar support to the ts sdk * feat: aadhaar support to go sdk * chore: refactor * move clearPassportData, markCurrentDocumentAsRegistered, reStorePassportDataWithRightCSCA to SDK (#1041) * Move self app store to mobile sdk (#1040) * chore(mobile-sdk-alpha): remove unused tslib dependency (#1053) * remove tslib -- seems unused * remove deps accidentally added to root * build file * remove unused imports (#1055) * fix: sha256 signed attr tests (#1058) * fix mock screen launch (#1059) * Hotfix: Belgium ID cards (#1061) * feat: parse belgium TD1 mrz android * feat: Parse Belgium TD1 MRZ IOS * fix: OFAC trees not found (#1060) * fix: relax OFAC tree response validation * test: cover OFAC tree edge cases * fix stateless * revert and fix types * fix tests * [SELF-723] feat: add structured NFC and Proof logging (#1048) * feat: add structured NFC logging * fix ci * Fix: add deps * logging fixes. use breadcrumbs * fix android build * update SeverityLevel * [SELF-705] feat: add proof event logging (#1057) * feat: add proof event logging * refactor: unify sentry event logging * fix types * fix mock * simplify * code rabbit feedback * fix tests --------- Co-authored-by: seshanthS <[email protected]> * skip on dev (#1063) * don't get fancy just disable (#1064) * saw it building so gonna try (#1065) * chore: bump v2.6.5 rd2 (#1067) * commit wip version bump * remove from building * chore: update tooling dependencies (#1069) * chore: update tooling dependencies * chore: align react typings and node types * update lock * chore: minor fixes across monorepo (#1068) * small fixes * fixes * fix gesture handler error * ci fixes * fix yarn build; add workflow ci (#1075) * add new workspace ci * disable package version check for now * build before checks * format * fix in future pr * feat: add functions for disclosing aadhaar attributes (#1033) * feat: add functions for disclosing aadhaar attributes * format * chore: update monorepo artifacts (#1079) * remove unneeded artifacts, skip building circuits * update md files * chore: update hub contract address * format * fix: add aadhaar in AllIds * chore: bump to v1.1.0-beta --------- Co-authored-by: vishal <[email protected]> Co-authored-by: Leszek Stachowski <[email protected]> Co-authored-by: Aaron DeRuvo <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: seshanthS <[email protected]> * feat: change to gcp attestation verification (#959) * feat: change to gcp attestation verification * lint * fix e2e test * chore: don't check PCR0 mapping if building the app locally * fmt:fix --------- Co-authored-by: Justin Hernandez <[email protected]> * Mobile SDK: move provingMachine from the app (#1052) * Mobile SDK: move provingMachine from the app * lint, fixes * fix web build? * lint * fix metro build, add deps * update lock files * move the status handlers and proving machine tests * may it be * fix up * yolo --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Aaron DeRuvo <[email protected]> * Revert "Mobile SDK: move provingMachine from the app (#1052)" (#1084) This reverts commit 8983ac22688f731bca8890cbf9be9c85b4ac2bf…
Changes
Added 3 ways to get feedback through sentry.
Flow
Summary by CodeRabbit
New Features
UX
Tests