[PM-38154] feat: Add Passport view screen#2770
Conversation
Surface synced Passport ciphers in the vault list and search, gated behind the pm-32009-new-item-types feature flag, mirroring the Driver's License integration: passport group filtering, id-card icon, type-section row, and the Copy passport number overflow action. Add/Edit/View screens remain stubbed pending PM-38153/PM-38154.
Adds the add/edit SwiftUI surface for Passport items: 13 fields in the Figma order, with passport number and national identification number as hidden fields with reveal toggles, and date of birth, issue date, and expiration date rendered read-only (long localized display, raw ISO round-trip) pending the shared DateFieldPicker (PM-38360). Exposes Passport in the add-item picker gated behind the newItemTypes flag, injects ConfigService into VaultRepository for that gating, wires the state to SDK PassportView round-trip, and shows the add-item FAB on the Passports group screen.
Wire passport through both response-model BitwardenSdk.Cipher inits so a synced passport's fields survive sync-to-store and populate the edit form.
Adds the read-only detail view for passport items, rendering the passport details section: given name, surname, dates, sex, birth place, nationality, issuing country/authority, and passport type. The passport number and national identification number are masked with reveal toggles; the name and number fields support copy. Wires the view into the per-type dispatch in ViewItemDetailsView.
…ssport-view # Conflicts: # BitwardenResources/Localizations/en.lproj/Localizable.strings # BitwardenShared/Core/Vault/Models/Enum/CipherType.swift # BitwardenShared/Core/Vault/Models/Enum/CipherTypeTests.swift # BitwardenShared/UI/Vault/PreviewContent/BitwardenSdk+VaultFixtures.swift # BitwardenShared/UI/Vault/Vault/VaultGroup/VaultGroupState.swift # BitwardenShared/UI/Vault/VaultItem/AddEditItem/AddEditPassportItem/AddEditPassportItemState.swift # BitwardenShared/UI/Vault/VaultItem/AddEditItem/AddEditPassportItem/PassportItemState.swift # BitwardenShared/UI/Vault/VaultItem/CipherItemStateTests.swift # BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemAction.swift # BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemActionTests.swift # BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemProcessorTests.swift
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the read-only Passport detail view ( Code Review DetailsNo findings. The change is consistent with existing vault item view conventions, the processor guards mirror |
| @@ -0,0 +1,29 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
There was a problem hiding this comment.
Details and fix
This PR adds the entire export/build.xcresult/ bundle (binary Data/* blobs plus this Info.plist). These are Xcode test/build result artifacts that should not be tracked in git — they bloat the repository and history permanently, and are unrelated to the passport view feature.
Fix:
git rm -r --cached export/and remove the directory from the commit- Add
export/(or*.xcresult) to.gitignoreso it cannot be re-added accidentally
Confirmed these paths do not exist on origin/main and are not currently covered by .gitignore.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2770 +/- ##
==========================================
+ Coverage 80.91% 80.98% +0.06%
==========================================
Files 1023 1024 +1
Lines 65297 65599 +302
==========================================
+ Hits 52836 53124 +288
- Misses 12461 12475 +14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ssport-view # Conflicts: # BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemProcessorTests.swift
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-38154
📔 Objective
Adds the read-only detail view for passport vault items. The passport details section renders given name, surname, date of birth, sex, birth place, nationality, passport number, passport type, national identification number, issuing country, issuing authority/office, issue date, and expiration date. Each field is hidden when empty, and the section is hidden entirely when the passport has no details.
The passport number and national identification number are masked with a reveal toggle; the name and number fields support copy to clipboard.
📸 Screenshots