[PM-34126] feat: Add card scan screen#6721
[PM-34126] feat: Add card scan screen#6721SaintPatrck wants to merge 2 commits intocard-scanner/2-text-analysis-pipelinefrom
Conversation
Add the complete text analysis pipeline for credit card scanning: - CardNumberUtils: sanitize, Luhn validation, brand detection - CardDataParser: interface and implementation for OCR text parsing - CardTextAnalyzer: ML Kit-based camera frame analysis - CardScanOverlay: camera overlay composable - CardScanData: data class for parsed card fields - FakeCardTextAnalyzer: test fixture - LocalProviders: composition local for CardTextAnalyzer
Add the card scanner screen with camera integration: - CardScanManager: shared result channel between scanner and consumer - CardScanViewModel: state management for scan screen - CardScanScreen: composable with camera preview and overlay - CardScanNavigation: route and navigation helper - CardScanner feature flag gated behind card-scanner-mobile
|
Overall Assessment: APPROVE This PR adds the card scan screen with camera integration for credit card scanning across 14 files. The implementation closely mirrors the established QR code scanner pattern, introducing a Code Review DetailsNo findings requiring action were identified. The code follows established codebase patterns, handles sensitive data appropriately in memory, and includes comprehensive test coverage for the ViewModel, Screen, and Manager layers. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## card-scanner/2-text-analysis-pipeline #6721 +/- ##
======================================================================
Coverage 85.65% 85.65%
======================================================================
Files 950 955 +5
Lines 60493 60592 +99
Branches 8592 8597 +5
======================================================================
+ Hits 51813 51898 +85
- Misses 5673 5685 +12
- Partials 3007 3009 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Great job! No new security vulnerabilities introduced in this pull request |

🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-34126
📔 Objective
Add the card scan screen with camera integration for credit card scanning:
uimodule (cardscanner/manager/)CardScanDatafor success/error statesDeferredBackgroundEventcard-scanner-mobileFlagKeycardTextAnalyzerparameter tosetContentIncludes ViewModel, Screen, and Manager tests.