[PM-32806] feat: Add Passport item type#6853
[PM-32806] feat: Add Passport item type#6853SaintPatrck wants to merge 1 commit intonew-item-types/PM-32808_drivers-licensefrom
Conversation
Vertically slice the Passport cipher type onto the new-item-types infrastructure so users can author and view their own passport ciphers behind the pm-32009-new-item-types flag. The phase-01-04 state classes already define the canonical Passport data shape with split surname / given name, three separate month/day/year date fields (date of birth, issue date, expiration date), nationality, passport type, issuing country / authority, and passport number; this slice adds the UI, ViewModel actions, dispatcher branches, and tests that consume them. Bank Account and Driver's License remain untouched, completing the three-Story per-type rollout under PM-32009. The passport number row is hidden by default with a reveal toggle and copy action (mirroring the Card item type's number/CVV UX from the Bitwarden web client) so the most sensitive field on the cipher is not disclosed on screen by default. Visibility is tracked via rememberSaveable in both the AddEdit and View composables since the canonical state model exposes a plain String / String?. The SDK at 2.0.0-6484-a19b6544 does not yet expose a CipherListViewType or CopyableCipherFields entry for Passport. The vault list filter, count, overflow emission, and copy lookup paths are wired in Android with TODO(PM-32009) markers that document the missing SDK pieces, so when the Rust SDK ships them only the tagged spots need to flip on. The overflow action data class, ViewModel dispatch, and AddEdit/View screens work end-to-end today against synthetic state, exercising the plumbing before the SDK lands.
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the third vertical slice of the New Item Types epic, which adds the Passport cipher type's Add/Edit form, View screen, vault listing entry, and search support. The implementation faithfully follows the patterns established by the prior Driver's License and Bank Account slices: sealed-class Code Review DetailsNo findings. The implementation is consistent with the prior slices in this epic, the placeholder integration points ( |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## new-item-types/PM-32808_drivers-license #6853 +/- ##
===========================================================================
- Coverage 84.45% 83.91% -0.54%
===========================================================================
Files 848 849 +1
Lines 60829 61396 +567
Branches 8856 8921 +65
===========================================================================
+ Hits 51374 51522 +148
- Misses 6424 6830 +406
- Partials 3031 3044 +13
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:
|
🎟️ Tracking
PM-32806 — third Android Story under epic PM-32009 (New Item Types).
📔 Objective
Third vertical slice of the New Item Types epic for Android. Adds the Passport cipher type's Add/Edit form, View screen, vault listing entry, search support, and a single quick-copy overflow action ("Copy passport number") on top of the Driver's License slice.
The View screen treats the passport number (national identification number) as a hidden-by-default field with reveal toggle and copy action, mirroring the Card item type's number/CVV UX. AddEdit follows the same Card pattern. Visibility is tracked via
rememberSaveablesince the canonical Passport state model uses plainString?.The vault list trailing action is a single quick-copy button gated on the SDK's
CopyableCipherFields.PASSPORT_*flag (TODO(PM-32009)until the SDK exposes it). The vault list row subtitle is intentionally not formatted client-side —CipherListView.subtitlestays SDK-owned.This Android slice consumes the canonical phase-01-04 Passport data model with split fields (
surname/givenName, separatedobMonth/Day/Year,issueMonth/Day/Year,expirationMonth/Day/Year).SDK dependency
The Bitwarden SDK does not yet expose
CipherType.PASSPORT,CipherListViewType.Passport,PassportViewonCipherView, orCopyableCipherFields.PASSPORT_*. Affected sites carryTODO(PM-32009)markers documenting the additions required:SearchViewModel.kt:599— passport number copy lookupSearchTypeDataExtensions.kt:143— search filter predicateVaultItemListingViewModel.kt:1327— listing copy lookupVaultItemListingDataExtensions.kt:93— listing filter predicateCipherListViewExtensions.kt:104— overflow emissionVaultViewModel.kt:867— vault overview copy lookupVaultDataExtensions.kt:158— Passport countThe AddEdit form, View screen, ViewModel actions, search/listing wiring, and the overflow action data class are live today and exercised by tests against synthetic state.
📸 Screenshots
UI screenshots will be added before this PR is moved out of draft.