Skip to content

Add IDDataScreen and ManageDocumentsScreen (WV-14)#1878

Merged
transphorm merged 4 commits intodevfrom
self-2422
Mar 29, 2026
Merged

Add IDDataScreen and ManageDocumentsScreen (WV-14)#1878
transphorm merged 4 commits intodevfrom
self-2422

Conversation

@transphorm
Copy link
Copy Markdown
Member

@transphorm transphorm commented Mar 28, 2026

Summary

  • Add IDDataScreen and ManageDocumentsScreen using Euclid shared components, with routes registered in the webview-app router
  • Wire the "Manage Documents" settings entry from the coming-soon placeholder to the new /manage-documents route
  • Both screens use mock data; real document persistence will follow once the disclose spine (WV-11) stabilizes

Changes

WebView App

  • IDDataScreen (/id-data) — renders passport ID card details and document data via EuclidIDDataScreen, with navigation to manage documents
  • ManageDocumentsScreen (/manage-documents) — lists registered documents with a dialogue for view/remove actions, using EuclidManageDocumentsScreen
  • App.tsx — register both routes
  • SettingsScreen — navigate to /manage-documents instead of /coming-soon

Linear Issues

  • SELF-2422 — WV-14: Home, document management, and ID data

Test Plan

  • cd packages/webview-app && yarn build passes
  • yarn lint && yarn types passes
  • Navigate to /manage-documents from Settings and verify screen renders
  • Tap a document entry, verify dialogue appears with "View ID Details" and "Remove" options
  • Tap "View ID Details" and verify /id-data screen renders with mock passport data
  • Verify back navigation works correctly on both screens

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added ID Data screen for viewing and managing identification card details
    • Added Manage Documents screen for managing document collection
    • Enabled "Manage Documents" action in Settings (previously unavailable)
    • Integrated navigation flows between new screens and existing app sections
  • Tests

    • Added comprehensive test coverage for new screen navigation flows

…422)

Screen migration for WV-14. Adds 2 euclid screen wrappers with mock data for the UI mocking pass.

- IDDataScreen at /id-data with ExposedIDCard, identification details, document data
- ManageDocumentsScreen at /manage-documents with document list and manage dialogue
- Wire Settings > Manage Documents to /manage-documents instead of /coming-soon
- Add preview.html for phone-frame screen verification during development
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 28, 2026

📝 Walkthrough

Walkthrough

Adds two new screens (IDDataScreen and ManageDocumentsScreen) to the webview application with corresponding routes, navigation links, and comprehensive test coverage. Updates existing route configuration, menu, and navigation targets to support the new screens.

Changes

Cohort / File(s) Summary
Route Configuration
packages/webview-app/src/App.tsx, packages/webview-app/src/components/DevRouteMenu.tsx
Added /id-data and /manage-documents routes to the React Router configuration. Updated DevRouteMenu to expose both new routes as selectable mock screens.
Navigation Targets
packages/webview-app/src/screens/account/SettingsScreen.tsx
Updated "Manage Documents" CTA to navigate to /manage-documents instead of /coming-soon.
New Screen Components
packages/webview-app/src/screens/home/IDDataScreen.tsx, packages/webview-app/src/screens/home/ManageDocumentsScreen.tsx
Added IDDataScreen component with ID card details display, close action with haptic feedback, and "manage ID" navigation to /manage-documents. Added ManageDocumentsScreen component with document list, dialogue state management, document press handlers, add-document flow to /onboarding/country, and detail navigation to /id-data. Both components integrate analytics event tracking and haptic feedback.
Test Coverage
packages/webview-app/tests/screens/home/homeSupportScreens.test.tsx
Added comprehensive test suite validating navigation flow from Home → Settings → Manage Documents → document details → ID data. Includes test for DevRouteMenu exposure of new route actions. Mocks Euclid UI components and SelfClientProvider with stubbed analytics and haptic functionality.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes—adding two new screens (IDDataScreen and ManageDocumentsScreen) and references the work tracking identifier (WV-14).
Description check ✅ Passed The description covers all required template sections: clear summary of changes, detailed breakdown of modifications, testing approach with a test plan checklist, and guidance for QA verification.
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
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch self-2422

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.

@transphorm transphorm changed the base branch from main to dev March 28, 2026 03:26
@transphorm transphorm changed the title SELF-2422: Add IDDataScreen and ManageDocumentsScreen Add IDDataScreen and ManageDocumentsScreen (WV-14) Mar 28, 2026
@chatgpt-codex-connector
Copy link
Copy Markdown

💡 Codex Review

goTo: (routeName: RouteName, params?: Record<string, unknown>) => {
const query = params ? `?${new URLSearchParams(params as Record<string, string>)}` : '';
navigate(`/${routeName}${query}`);
},

P1 Badge Map SDK route names before calling navigate

The new navigation adapter treats RouteName values as literal URL paths (for example CountryPicker/CountryPicker), but App.tsx only registers mapped routes like /onboarding/country and /onboarding/id-type. Any SDK-driven goTo(...) call will therefore miss the intended screen and fall into the wildcard redirect to /, which breaks SDK-controlled onboarding/proving transitions once this adapter path is exercised.


const onNext = useCallback(() => {
navigate(stepNumber < 4 ? `/onboarding/tour/${stepNumber + 1}` : '/onboarding/provider');

P1 Badge Route tour completion through document selection

Step 4 currently sends users directly to /onboarding/provider without countryCode/documentType, but the success path stores a document only when those fields are present (ScanSuccessScreen). In the default first-run flow from Home (/onboarding/tour/1), this means onboarding can finish without persisting any registered document, and users return to an effectively empty home state.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cb7ee66f-88b5-4087-a679-b944efae5b62

📥 Commits

Reviewing files that changed from the base of the PR and between ba2e598 and 1ed1394.

📒 Files selected for processing (6)
  • packages/webview-app/src/App.tsx
  • packages/webview-app/src/components/DevRouteMenu.tsx
  • packages/webview-app/src/screens/account/SettingsScreen.tsx
  • packages/webview-app/src/screens/home/IDDataScreen.tsx
  • packages/webview-app/src/screens/home/ManageDocumentsScreen.tsx
  • packages/webview-app/tests/screens/home/homeSupportScreens.test.tsx

Comment on lines +30 to +35
const onDocumentPress = useCallback(() => {
haptic.trigger('selection');
setDialogue({
title: 'Manage Document',
description: 'View details or remove this document from your Self ID.',
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Remove action is currently a no-op.

On Line 45-Line 49, onRemoveId only dismisses the dialog; it never removes anything from the list defined on Line 61-Line 68. This makes the destructive action non-functional in UI flow.

Proposed fix
 import type React from 'react';
 import { useCallback, useState } from 'react';
 import { useNavigate } from 'react-router-dom';
@@
 export const ManageDocumentsScreen: React.FC = () => {
   const navigate = useNavigate();
   const { analytics, haptic } = useSelfClient();
   const [dialogue, setDialogue] = useState<{ title: string; description: string } | undefined>();
+  const [selectedDocumentId, setSelectedDocumentId] = useState<string | undefined>();
+  const [documents, setDocuments] = useState([
+    {
+      id: 'mock-passport',
+      label: 'Passport',
+      description: 'Registered',
+    },
+  ]);
@@
-  const onDocumentPress = useCallback(() => {
+  const onDocumentPress = useCallback((id: string) => {
     haptic.trigger('selection');
+    setSelectedDocumentId(id);
     setDialogue({
       title: 'Manage Document',
       description: 'View details or remove this document from your Self ID.',
     });
   }, [haptic]);
@@
   const onRemoveId = useCallback(() => {
     haptic.trigger('warning');
     analytics.trackEvent('manage_docs_remove_pressed');
+    if (selectedDocumentId) {
+      setDocuments(prev => prev.filter(doc => doc.id !== selectedDocumentId));
+    }
+    setSelectedDocumentId(undefined);
     setDialogue(undefined);
-  }, [haptic, analytics]);
+  }, [haptic, analytics, selectedDocumentId]);
@@
       documents={[
-        {
-          id: 'mock-passport',
-          label: 'Passport',
-          description: 'Registered',
-          onPress: onDocumentPress,
-        },
+        ...documents.map(doc => ({
+          ...doc,
+          onPress: () => onDocumentPress(doc.id),
+        })),
       ]}

Also applies to: 45-49, 61-68

@transphorm transphorm merged commit 80488dd into dev Mar 29, 2026
20 checks passed
@transphorm transphorm deleted the self-2422 branch March 29, 2026 00:48
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