Skip to content

[PM-39778] Subtitle alignment bank account license passport#1222

Open
jengstrom-bw wants to merge 10 commits into
mainfrom
vault/pm-39778/subtitle-alignment-bank-account-license-passport
Open

[PM-39778] Subtitle alignment bank account license passport#1222
jengstrom-bw wants to merge 10 commits into
mainfrom
vault/pm-39778/subtitle-alignment-bank-account-license-passport

Conversation

@jengstrom-bw

@jengstrom-bw jengstrom-bw commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

🎟️ Tracking

Jira

📔 Objective

Align the subtitle for bank account, license, and passport to the TS implementation.

🚨 Breaking Changes

The CipherListViewType enum variant for bank accounts changed from a unit variant to a tuple variant carrying data:

// Before (main)
BankAccount,

// After (this branch)
BankAccount(BankAccountListView),

crates/bitwarden-vault/src/cipher/cipher.rs:488

What BankAccountListView is

A new minimal view type added in bank_account.rs holding only the fields needed to render list rows:

pub struct BankAccountListView {
pub account_number: Option,
pub account_type: Option,
}

  • TypeScript: the generated union member goes from "BankAccount" (or a tag with no payload) to a tagged object carrying a BankAccountListView. Any client code pattern-matching/switching on CipherListViewType must now destructure the associated data.
  • Swift/Kotlin (UniFFI): the enum case gains an associated value, so exhaustive match/when/switch statements on the mobile side break until updated.

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🔍 SDK Breaking Change Detection

SDK Version: vault/pm-39778/subtitle-alignment-bank-account-license-passport (7196ce8)

⚠️ If breaking changes are detected, a corresponding pull request addressing them must be ready for merge in the affected client repository.

Client Status Details
typescript ❌ Breaking changes detected Compilation failed with new SDK version. A corresponding pull request addressing the breaking changes must be ready for merge in bitwarden/clients. - View Details
android ❌ Breaking changes detected Compilation failed with new SDK version. A corresponding pull request addressing the breaking changes must be ready for merge in bitwarden/android. - View Details

Breaking change detection uses the build of the SDK from this branch, including any incompatibities pre-existing on or merged into this branch. Check the workflow logs to confirm.
Results update as workflows complete.

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.89916% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.23%. Comparing base (c623245) to head (cf28caf).

Files with missing lines Patch % Lines
crates/bitwarden-vault/src/cipher/cipher.rs 83.33% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1222      +/-   ##
==========================================
+ Coverage   85.19%   85.23%   +0.04%     
==========================================
  Files         477      477              
  Lines       66126    66345     +219     
==========================================
+ Hits        56333    56548     +215     
- Misses       9793     9797       +4     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jengstrom-bw jengstrom-bw added the ai-review-vnext Request a Claude code review using the vNext workflow label Jun 30, 2026
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed the vault subtitle alignment changes for bank account, license, and passport ciphers. The new BankAccountListView type and its Decryptable/StrictDecrypt implementations mirror the existing CardListView pattern exactly, and the rewritten build_subtitle_* functions correctly append the issuing state/country with TS-aligned separators. Edge cases (empty strings, missing fields, partial data) are well covered by the added unit tests, and the MissingField handling for BankAccount matches the pre-existing Card/Login behavior in both the lenient and strict decrypt paths.

Code Review Details

No blocking findings.

The one breaking change — CipherListViewType::BankAccount gaining a BankAccountListView payload — is clearly documented in the PR description with client migration impact for TypeScript, Swift, and Kotlin, and the PR carries the breaking-change label. The earlier Clippy concern on the subtitle builders was addressed (resolved thread), and the hand-rolled builders avoid the len_zero / single_char_add_str lints.

Comment thread crates/bitwarden-vault/src/cipher/drivers_license.rs
@sonarqubecloud

Copy link
Copy Markdown

@jengstrom-bw jengstrom-bw marked this pull request as ready for review July 13, 2026 15:59
@jengstrom-bw jengstrom-bw requested a review from a team as a code owner July 13, 2026 15:59
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 breaking-change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant