[PM-32808] feat: Add Driver's License vault, listing, and search surfaces#6909
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR integrates the Driver's License cipher type into the vault landing, item listing, and search surfaces, mirroring the established Bank Account pattern. The wiring is consistent across Code Review Details
|
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="24dp" | ||
| android:height="24dp" | ||
| android:viewportWidth="24" | ||
| android:viewportHeight="24"> | ||
| <path | ||
| android:pathData="M20,4H4C2.9,4 2,4.9 2,6V18C2,19.1 2.9,20 4,20H20C21.1,20 22,19.1 22,18V6C22,4.9 21.1,4 20,4ZM20,18H4V6H20V18ZM8,12C9.1,12 10,11.1 10,10C10,8.9 9.1,8 8,8C6.9,8 6,8.9 6,10C6,11.1 6.9,12 8,12ZM8,9.5C8.28,9.5 8.5,9.72 8.5,10C8.5,10.28 8.28,10.5 8,10.5C7.72,10.5 7.5,10.28 7.5,10C7.5,9.72 7.72,9.5 8,9.5ZM4,16.5V15C4,13.67 6.67,13 8,13C9.33,13 12,13.67 12,15V16.5H4ZM5.85,15H10.15C9.61,14.57 8.62,14.5 8,14.5C7.38,14.5 6.39,14.57 5.85,15ZM13,9H18V10.5H13V9ZM13,12H17V13.5H13V12Z" | ||
| android:fillColor="#175DDC" | ||
| android:fillType="evenOdd"/> | ||
| </vector> |
There was a problem hiding this comment.
♻️ DEBT: New drawable is unused — driver's license rows are rendered with BitwardenDrawable.ic_id_card.
Details
VaultContent.kt:303-305 uses BitwardenDrawable.ic_id_card for the driver's license group icon (consistent with the PR description: "tappable row using the Identity icon"), and a repo-wide search finds no other references to ic_drivers_license. The new resource ships in the APK without being rendered anywhere.
Additionally, the asset hard-codes android:fillColor="#175DDC" rather than using the themed tint that sibling icons like ic_id_card rely on, so even if it were wired in it would not theme correctly across light/dark modes.
Either remove the drawable, or wire it into the driver's license group (VaultContent.kt) plus any other surfaces that should distinguish licenses from identities, and convert the fill to a theme attribute.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## new-item-types/PM-32808_drivers-license-add-edit #6909 +/- ##
===================================================================================
Coverage ? 85.44%
===================================================================================
Files ? 857
Lines ? 61536
Branches ? 8959
===================================================================================
Hits ? 52582
Misses ? 5880
Partials ? 3074
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:
|
3d25b0c to
1b2216c
Compare
82a1975 to
1eeba27
Compare
| ListingItemOverflowAction.VaultAction | ||
| .CopyLicenseNumberClick( | ||
| cipherId = cipherId, | ||
| requiresPasswordReprompt = hasMasterPassword, | ||
| ) | ||
| .takeIf { | ||
| this.type is CipherListViewType.DriversLicense && | ||
| this.copyableFields.contains( | ||
| CopyableCipherFields.DRIVERS_LICENSE_LICENSE_NUMBER, | ||
| ) | ||
| }, |
There was a problem hiding this comment.
♻️ DEBT: New CopyLicenseNumberClick overflow branch and matching CipherListViewType.DriversLicense listing/search predicates are not exercised by tests, breaking parity with the established Bank Account pattern.
Details
The sibling CipherListViewType.BankAccount path has four dedicated tests in CipherListViewExtensionsTest.kt (lines 363–469): "return all copy actions", "return only available copy actions", "return minimum actions", and "should not return bank-account copy actions for non-bank ciphers". The Driver's License path adds the same shape of business logic — a typed .takeIf predicate that gates a copy action on CopyableCipherFields.DRIVERS_LICENSE_LICENSE_NUMBER — but adds zero corresponding tests.
The same gap exists for:
VaultItemListingDataExtensions.kt:85-87(newVault.DriversLicensepredicate) —VaultItemListingDataExtensionsTest.ktcovers theBankAccountpredicate at line 403 but noDriversLicenseequivalent.SearchTypeDataExtensions.kt:134-136(newVault.DriversLicensesfilter andupdateWithAdditionalDataIfNecessarybranch) —SearchTypeDataExtensionsTest.ktcoversBankAccountsat lines 246 and 392, noDriversLicensesequivalent.VaultScreenTest.kt(newshowDriversLicenseGrouprendering andDriversLicenseGroupClickdispatch) — the equivalent Bank Account tests live at lines 2504–2540 and would be straightforward to mirror.
Without these, regressions to the new predicate gating (e.g., flipping the CipherListViewType.DriversLicense check or removing the copyableFields requirement) would not be caught by CI.
🎟️ Tracking
📔 Objective
Integrates the Driver's License cipher type into the broader vault surfaces so users can discover and act on license entries outside of direct navigation. Adds the License section on the vault landing (count + tappable row using the Identity icon), enables the Licenses listing screen, surfaces licenses in vault search results, and emits the "Copy license number" quick action in the listing-row overflow menu (driven by
CopyableCipherFields.DRIVERS_LICENSE_LICENSE_NUMBER).📸 Screenshots