Skip to content

Conversation

@Tranquil-Flow
Copy link
Contributor

@Tranquil-Flow Tranquil-Flow commented Jan 28, 2026

Description

For the passport and ID cards, prompt the user to check if their document has a biometric logo. On yes, continue flow. On no, display error popup.

Tested

Built local mobile app with this, worked as intended.

How to QA

Build the mobile up and try to add a new passport or ID card.

Summary by CodeRabbit

  • New Features
    • Added a logo confirmation screen in the document verification flow, allowing users to confirm the presence of their document symbol before proceeding with onboarding. Users receive haptic feedback and can indicate if their document symbol is not found.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

📝 Walkthrough

Walkthrough

Introduces a new LogoConfirmation screen component in the document onboarding flow. Adds corresponding navigation routes, TypeScript type definitions, SDK-level logo confirmation screen, and new SDK events (LOGO_CONFIRMED, LOGO_NOT_FOUND). Updates navigation logic to route through logo confirmation before document onboarding.

Changes

Cohort / File(s) Summary
Navigation Configuration
app/src/navigation/documents.ts, app/src/navigation/index.tsx
Adds LogoConfirmation route with headerShown: false and initialParams (documentType, countryCode). Extends RootStackParamList TypeScript type with new route definition.
App-Level Implementation
app/src/providers/selfClientProvider.tsx
Removes navigation from case 'p'; updates case 'i' to navigate to LogoConfirmation instead of DocumentOnboarding, passing documentType and countryCode.
App LogoConfirmation Screen
app/src/screens/documents/selection/LogoConfirmationScreen.tsx
New React Native screen component that extracts route params, renders DocumentFlowNavBar with SDK LogoConfirmationScreen, supplies custom EPassportLogo, and wires onConfirm/onNotFound handlers for haptic navigation and modal feedback.
SDK Components
packages/mobile-sdk-alpha/src/flows/onboarding/logo-confirmation-screen.tsx, packages/mobile-sdk-alpha/src/index.ts
New SDK LogoConfirmationScreen component displaying logo confirmation UI with Yes/No actions, emitting LOGO_CONFIRMED/LOGO_NOT_FOUND events. Re-exported from SDK index.
SDK Type Definitions
packages/mobile-sdk-alpha/src/types/events.ts
Extends SdkEvents enum with LOGO_CONFIRMED and LOGO_NOT_FOUND; adds SDKEventMap payloads containing documentType and countryCode.
Minor Styling
packages/mobile-sdk-alpha/src/components/buttons/AbstractButton.tsx
Adds flex: 1 to Text element for horizontal expansion within row-oriented container.

Sequence Diagram

sequenceDiagram
    actor User
    participant AppNav as App Navigation
    participant LogoConfirm as LogoConfirmationScreen<br/>(App)
    participant SDKComponent as LogoConfirmationScreen<br/>(SDK)
    participant EventSystem as SDK Event<br/>System
    participant DocOnboard as Document<br/>Onboarding

    User->>AppNav: Selects document (type 'i')
    AppNav->>LogoConfirm: Navigate with documentType,<br/>countryCode
    LogoConfirm->>SDKComponent: Render with logo & callbacks
    SDKComponent->>User: Display logo & Yes/No prompt
    User->>SDKComponent: Click Yes or No
    SDKComponent->>EventSystem: Emit LOGO_CONFIRMED<br/>or LOGO_NOT_FOUND event
    alt Confirmed
        EventSystem->>LogoConfirm: onConfirm triggered
        LogoConfirm->>DocOnboard: Navigate to onboarding
    else Not Found
        EventSystem->>LogoConfirm: onNotFound triggered
        LogoConfirm->>User: Show "Document not supported"<br/>modal
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PR #1207: Navigation refactoring that shapes the foundation for LogoConfirmation route additions and parameter type definitions in documents.ts and index.tsx.

Suggested labels

codex

Suggested reviewers

  • transphorm
  • aaronmgdr
  • remicolin

Poem

📱✨ A logo blooms upon the screen,
Confirming documents yet unseen,
With yes and no, the user's voice rings true,
Onboarding flows now skip right through! 🎯

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main feature being added: a logo confirmation screen for document flows.
Description check ✅ Passed The description covers all required template sections with appropriate detail: what is being changed, testing approach, and QA instructions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@app/src/screens/documents/selection/LogoConfirmationScreen.tsx`:
- Around line 5-13: Reorder or autofix the imports in LogoConfirmationScreen.tsx
to satisfy simple-import-sort/imports: group and sort external library imports
first (react, react-native-safe-area-context, `@react-navigation/native`), then
third-party package imports from `@selfxyz/`* (components, constants, and
SDKLogoConfirmationScreen), and finally any local imports; you can run the
project's import-sort autofix or manually reorder the import statements
referencing symbols useCallback, useSafeAreaInsets, RouteProp, useRoute, YStack,
slate100, and LogoConfirmationScreen (SDKLogoConfirmationScreen) to resolve the
CI failure.

In `@packages/mobile-sdk-alpha/src/flows/onboarding/logo-confirmation-screen.tsx`:
- Around line 55-61: Prettier is complaining about the multiline JSX for the
title and logo block in the LogoConfirmationScreen component: collapse the
multiline BodyText and the View that renders the logo into single-line JSX to
satisfy formatting rules — specifically update the BodyText element that
currently contains "Does your document have this symbol?" to a single-line JSX
element and similarly render the logo container (the View using
styles.logoContainer that contains the logo variable) on one line; keep the same
props, children (logo), and styles (styles.titleText, styles.logoContainer) but
reformat them to single-line form.

Comment on lines +5 to +13
import React, { useCallback } from 'react';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import type { RouteProp } from '@react-navigation/native';
import { useRoute } from '@react-navigation/native';

import { YStack } from '@selfxyz/mobile-sdk-alpha/components';
import { slate100 } from '@selfxyz/mobile-sdk-alpha/constants/colors';
import { LogoConfirmationScreen as SDKLogoConfirmationScreen } from '@selfxyz/mobile-sdk-alpha';

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

CI is failing due to import order—please run autofix.

simple-import-sort/imports is failing in CI, which blocks merge. Please run the project’s import sort autofix or reorder these imports to satisfy the rule.

🧰 Tools
🪛 GitHub Actions: Mobile CI

[error] 5-5: Run autofix to sort these imports! simple-import-sort/imports

🪛 GitHub Actions: Workspace CI

[error] 5-5: Run autofix to sort these imports! simple-import-sort/imports

🪛 GitHub Check: build-deps

[failure] 5-5:
Run autofix to sort these imports!

🪛 GitHub Check: workspace-lint

[failure] 5-5:
Run autofix to sort these imports!

🤖 Prompt for AI Agents
In `@app/src/screens/documents/selection/LogoConfirmationScreen.tsx` around lines
5 - 13, Reorder or autofix the imports in LogoConfirmationScreen.tsx to satisfy
simple-import-sort/imports: group and sort external library imports first
(react, react-native-safe-area-context, `@react-navigation/native`), then
third-party package imports from `@selfxyz/`* (components, constants, and
SDKLogoConfirmationScreen), and finally any local imports; you can run the
project's import-sort autofix or manually reorder the import statements
referencing symbols useCallback, useSafeAreaInsets, RouteProp, useRoute, YStack,
slate100, and LogoConfirmationScreen (SDKLogoConfirmationScreen) to resolve the
CI failure.

Comment on lines +55 to +61
<BodyText style={styles.titleText}>
Does your document have this symbol?
</BodyText>

<View style={styles.logoContainer}>
{logo}
</View>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix Prettier warnings to unblock CI.
Workspace CI reports Prettier violations for the multiline text node and logo block; please reformat to the single-line form.

✅ Suggested formatting fix
-        <BodyText style={styles.titleText}>
-          Does your document have this symbol?
-        </BodyText>
+        <BodyText style={styles.titleText}>Does your document have this symbol?</BodyText>

-        <View style={styles.logoContainer}>
-          {logo}
-        </View>
+        <View style={styles.logoContainer}>{logo}</View>
📝 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.

Suggested change
<BodyText style={styles.titleText}>
Does your document have this symbol?
</BodyText>
<View style={styles.logoContainer}>
{logo}
</View>
<BodyText style={styles.titleText}>Does your document have this symbol?</BodyText>
<View style={styles.logoContainer}>{logo}</View>
🧰 Tools
🪛 GitHub Actions: Workspace CI

[warning] 55-55: prettier/prettier: Replace ⏎··········Does·your·document·have·this·symbol?⏎········ with Does·your·document·have·this·symbol?


[warning] 59-59: prettier/prettier: Replace ⏎··········{logo}⏎········ with {logo}

🪛 GitHub Check: lint

[warning] 59-59:
Replace ⏎··········{logo}⏎········ with {logo}


[warning] 55-55:
Replace ⏎··········Does·your·document·have·this·symbol?⏎········ with Does·your·document·have·this·symbol?

🪛 GitHub Check: workspace-lint

[warning] 59-59:
Replace ⏎··········{logo}⏎········ with {logo}


[warning] 55-55:
Replace ⏎··········Does·your·document·have·this·symbol?⏎········ with Does·your·document·have·this·symbol?

🤖 Prompt for AI Agents
In `@packages/mobile-sdk-alpha/src/flows/onboarding/logo-confirmation-screen.tsx`
around lines 55 - 61, Prettier is complaining about the multiline JSX for the
title and logo block in the LogoConfirmationScreen component: collapse the
multiline BodyText and the View that renders the logo into single-line JSX to
satisfy formatting rules — specifically update the BodyText element that
currently contains "Does your document have this symbol?" to a single-line JSX
element and similarly render the logo container (the View using
styles.logoContainer that contains the logo variable) on one line; keep the same
props, children (logo), and styles (styles.titleText, styles.logoContainer) but
reformat them to single-line form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants