Skip to content

[PM-32806] feat: View Passport item type#6853

Merged
SaintPatrck merged 7 commits into
mainfrom
new-item-types/PM-32806_passport
May 14, 2026
Merged

[PM-32806] feat: View Passport item type#6853
SaintPatrck merged 7 commits into
mainfrom
new-item-types/PM-32806_passport

Conversation

@SaintPatrck
Copy link
Copy Markdown
Contributor

@SaintPatrck SaintPatrck commented Apr 29, 2026

🎟️ Tracking

📔 Objective

Add the View screen for the Passport item type, gated behind pm-32009-new-item-types.

📸 Screenshots

Figma Actual (Preview)

@SaintPatrck SaintPatrck added the ai-review-vnext Request a Claude code review using the vNext workflow label Apr 29, 2026
@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context t:feature Change Type - Feature Development labels Apr 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR wires up the Passport View screen behind the pm-32009-new-item-types flag, replacing the temporary VaultItemSecureNoteContent fallback with a dedicated VaultItemPassportContent composable, supporting VaultPassportItemTypeHandlers, and four copy actions on the VaultItemViewModel. The recent commits address earlier review feedback by adding screen-level coverage in VaultItemScreenTest, view model tests for every copy action (populated, null, and blank cases), and toViewState parity tests in both CipherViewExtensionsTest variants. The Passport data class now mirrors the SDK/server field order, and the inline copy affordances for given name and surname align with the Driver's License precedent.

Code Review Details

No new findings beyond the existing review threads. The previously flagged DEBT items (regression test for the birthPlace correctness fix in VaultAddItemStateExtensions.kt:147, and screen-level coverage for VaultItemPassportContent) were either resolved by follow-up commits in this PR or acknowledged in the existing thread on ic_passport.xml.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 94.47983% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.23%. Comparing base (e4f030d) to head (e33e9ef).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../ui/vault/feature/item/VaultItemPassportContent.kt 95.50% 14 Missing and 2 partials ⚠️
...vault/feature/addedit/util/CipherViewExtensions.kt 0.00% 0 Missing and 4 partials ⚠️
...warden/ui/vault/feature/item/VaultItemViewModel.kt 95.45% 0 Missing and 3 partials ⚠️
...rm/feature/search/util/SearchTypeDataExtensions.kt 0.00% 1 Missing ⚠️
...itemlisting/util/VaultItemListingDataExtensions.kt 0.00% 1 Missing ⚠️
.../feature/vault/util/VaultAddItemStateExtensions.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6853      +/-   ##
==========================================
+ Coverage   85.99%   86.23%   +0.24%     
==========================================
  Files         985      859     -126     
  Lines       64067    62074    -1993     
  Branches     9047     9017      -30     
==========================================
- Hits        55094    53531    -1563     
+ Misses       5861     5445     -416     
+ Partials     3112     3098      -14     
Flag Coverage Δ
app-data 17.27% <0.00%> (-0.24%) ⬇️
app-ui-auth-tools 19.51% <0.00%> (-0.38%) ⬇️
app-ui-platform 15.44% <0.00%> (-0.68%) ⬇️
app-ui-vault 27.90% <94.47%> (-0.04%) ⬇️
authenticator 6.38% <0.00%> (-0.02%) ⬇️
lib-core-network-bridge 4.11% <0.00%> (-0.02%) ⬇️
lib-data-ui 1.14% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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 force-pushed the new-item-types/PM-32808_drivers-license branch 3 times, most recently from 7e3c779 to 1bc6a61 Compare May 11, 2026 21:30
Base automatically changed from new-item-types/PM-32808_drivers-license to main May 12, 2026 15:56
@SaintPatrck SaintPatrck force-pushed the new-item-types/PM-32806_passport branch from 937920a to f3e841c Compare May 13, 2026 17:56
@SaintPatrck SaintPatrck changed the title [PM-32806] feat: Add Passport item type [PM-32808] feat: Show License items in vault, listing, and search May 13, 2026
@SaintPatrck SaintPatrck force-pushed the new-item-types/PM-32806_passport branch from f3e841c to 937920a Compare May 13, 2026 18:41
@SaintPatrck SaintPatrck changed the title [PM-32808] feat: Show License items in vault, listing, and search [PM-32806] feat: Add Passport item type May 13, 2026
Render saved Passports with their full Figma-spec field set, including
Sex, Birth place, and National identification number — previously these
were dropped on read despite being persisted to the server. The Passport
number and National identification number surface behind reveal toggles
backed by rememberSaveable so the visibility decision survives process
death. Kotlin state and network models rename surname/givenName to
lastName/firstName for symmetry with the License precedent and the
visible UI labels; @SerialName preserves the server wire contract.
@SaintPatrck SaintPatrck force-pushed the new-item-types/PM-32806_passport branch from 937920a to c8293f0 Compare May 13, 2026 21:13
@SaintPatrck SaintPatrck changed the title [PM-32806] feat: Add Passport item type [PM-32806] feat: View Passport item type May 13, 2026
The server (`CipherPassportData`) and SDK (`PassportView`) both use
`surname` / `givenName`. The Figma "First name" / "Last name" labeling
is a UI-layer concern and lives in the string resources, not in the
Kotlin field names.
@SaintPatrck SaintPatrck force-pushed the new-item-types/PM-32806_passport branch from c6f3946 to cafc904 Compare May 14, 2026 17:41
@SaintPatrck SaintPatrck marked this pull request as ready for review May 14, 2026 17:41
@SaintPatrck SaintPatrck requested review from a team and david-livefront as code owners May 14, 2026 17:41
@@ -0,0 +1,24 @@
<!--
~ Copyright (C) 2026 The Android Open Source Project
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Shouldn't we get this from our designers?

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.

😕 Not sure if this was present in the original SVG, or if Android Studio added it when converting to a vector asset. Weird.

- Wire `ic_passport` across the cipher-type icon mappings so the Passport
  surfaces no longer borrow `ic_note`.
- Add `VaultItemScreenTest` coverage for the new Passport view: all-fields
  rendering, per-field visibility, and copy-button → action dispatch.
- Add Passport branches to both `CipherViewExtensions` (item + add/edit)
  toViewState test suites.
- Add a Compose preview for `VaultItemPassportContent`.
@SaintPatrck SaintPatrck force-pushed the new-item-types/PM-32806_passport branch from cafc904 to e33e9ef Compare May 14, 2026 19:13
@SaintPatrck SaintPatrck enabled auto-merge May 14, 2026 19:16
@SaintPatrck SaintPatrck added this pull request to the merge queue May 14, 2026
Merged via the queue into main with commit d390272 May 14, 2026
24 checks passed
@SaintPatrck SaintPatrck deleted the new-item-types/PM-32806_passport branch May 14, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review-vnext Request a Claude code review using the vNext workflow app:authenticator Bitwarden Authenticator app context app:password-manager Bitwarden Password Manager app context t:feature Change Type - Feature Development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants