Skip to content

[PM-38154] feat: Add Passport view screen#2770

Merged
SaintPatrck merged 13 commits into
mainfrom
vault/pm-38154-ios-passport-view
Jun 23, 2026
Merged

[PM-38154] feat: Add Passport view screen#2770
SaintPatrck merged 13 commits into
mainfrom
vault/pm-38154-ios-passport-view

Conversation

@SaintPatrck

@SaintPatrck SaintPatrck commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

🎟️ 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

Figma Actual

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.
@SaintPatrck SaintPatrck added ai-review Request a Claude code review app:password-manager Bitwarden Password Manager app context t:feature labels Jun 9, 2026
Base automatically changed from vault/pm-38153-ios-passport-add-edit to main June 15, 2026 17:06
…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
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed the read-only Passport detail view (ViewPassportItemView), its action enum, the ViewItemProcessor passport handler, the ViewVaultItemState protocol addition, new CopyableField cases, and the accompanying ViewInspector and snapshot tests. The implementation closely mirrors the established ViewBankAccountItemView / ViewDriversLicenseItemView patterns: sensitive fields (passport number, national identification number) are masked behind reveal toggles, copyable fields route through the standard copyPressed action, and each field hides when empty with the whole section hidden when isPassportDetailsSectionEmpty. Error logging uses static strings only, preserving zero-knowledge expectations.

Code Review Details

No findings. The change is consistent with existing vault item view conventions, the processor guards mirror handleBankAccountAction (loaded-data and type checks), the new ViewVaultItemState.passportItemState requirement is already satisfied by the sole conformer CipherItemState, and tests cover copy buttons, visibility toggles, the empty state, and both error paths.

Comment thread export/build.xcresult/Info.plist Outdated
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>

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.

⚠️ IMPORTANT: Build artifacts committed to the repository

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 .gitignore so it cannot be re-added accidentally

Confirmed these paths do not exist on origin/main and are not currently covered by .gitignore.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Resolved in 6d243a7

@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.69737% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.98%. Comparing base (8ba847e) to head (c24317b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...Vault/VaultItem/ViewItem/ViewItemDetailsView.swift 0.00% 7 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SaintPatrck SaintPatrck marked this pull request as ready for review June 16, 2026 13:11
@SaintPatrck SaintPatrck requested review from a team and matt-livefront as code owners June 16, 2026 13:11
matt-livefront
matt-livefront previously approved these changes Jun 18, 2026
…ssport-view

# Conflicts:
#	BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemProcessorTests.swift
@SaintPatrck SaintPatrck merged commit c10bf6f into main Jun 23, 2026
17 checks passed
@SaintPatrck SaintPatrck deleted the vault/pm-38154-ios-passport-view branch June 23, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review app:password-manager Bitwarden Password Manager app context t:feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants