Skip to content

[PM-38144] feat: Add bank account add/edit screens#2757

Draft
SaintPatrck wants to merge 2 commits into
mainfrom
vault/pm-38144-ios-bank-account-add-edit
Draft

[PM-38144] feat: Add bank account add/edit screens#2757
SaintPatrck wants to merge 2 commits into
mainfrom
vault/pm-38144-ios-bank-account-add-edit

Conversation

@SaintPatrck

@SaintPatrck SaintPatrck commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🎟️ Tracking

📔 Objective

Add the add/edit screen for Bank Account items. The form renders all 10 fields — bank name, name on account, account type (picker), account number, routing number, branch number, PIN, SWIFT code, IBAN, and bank contact phone — with reveal toggles on the account number, PIN, and IBAN. Saving round-trips through the SDK, and Bank Account is now selectable from the add-item picker and the Bank accounts group's add button, gated behind the newItemTypes feature flag.

📸 Screenshots

Add

Header Header

Edit

Header Header

@SaintPatrck SaintPatrck added the ai-review Request a Claude code review label Jun 4, 2026
@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context t:feature labels Jun 4, 2026
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR (PM-38144) wires up the Bank Account add/edit screens, mirroring the established Card/Driver's License pattern across 25 files. BankAccountItemState covers all 10 fields with reveal toggles defaulted hidden for the account number, PIN, and IBAN; the visibility booleans are intentionally omitted from BankAccountView so they never reach the SDK. Bank Account is added to CipherType.canCreateCases (kept behind .newItemTypes via newItemTypesGatedCases), wired through AddEditItemState/AddEditItemProcessor/AddEditItemView, restored as a .button in VaultGroupState, and round-trips through BitwardenSdk.BankAccount.init(cipherBankAccountModel:) / CipherView.bankAccountItemState(). Unit and ViewInspector coverage exercises every field, every visibility toggle, and the unknown-account-type mapping.

Code Review Details

No findings.

Notes on patterns intentionally preserved (not findings):

  • Unknown server accountType values map to .default and are dropped on re-save — same pattern as Card brand.
  • Visibility-toggle events (parallel to cipherClientToggledCardCodeVisible) are not emitted for PIN/account number/IBAN — matches the Driver's License precedent; a new EventType case is not in scope here.
  • Reveal-toggle booleans reset to false when streamCipherDetails re-applies the cipher — consistent with Card/Driver's License behavior.
  • accountNumber, routingNumber, branchNumber, and pin use a default text-field configuration rather than .numeric(...) — appropriate, since international values are not strictly numeric.

@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.68895% with 88 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.92%. Comparing base (89c925a) to head (e540865).

Files with missing lines Patch % Lines
...itBankAccountItem/AddEditBankAccountItemView.swift 73.71% 46 Missing ⚠️
...tem/AddEditBankAccountItemView+SnapshotTests.swift 0.00% 42 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2757      +/-   ##
==========================================
- Coverage   87.85%   86.92%   -0.94%     
==========================================
  Files        1712     1901     +189     
  Lines      166702   180569   +13867     
==========================================
+ Hits       146463   156958   +10495     
- Misses      20239    23611    +3372     

☔ 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.

Implement the add/edit SwiftUI surface for Bank Account items (BA-4), mirroring the existing Card pattern: ten fields in the Figma order with an account-type picker and reveal toggles for the account number, PIN, and IBAN. Wire the new state through the shared AddEditItem flow, the state<->SDK round-trip, and the add-item picker (gated behind the newItemTypes feature flag), and restore the Bank accounts group's add-item button.
@SaintPatrck SaintPatrck force-pushed the vault/pm-38144-ios-bank-account-add-edit branch from 734a65b to e540865 Compare June 5, 2026 17:35
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:authenticator Bitwarden Authenticator app context app:password-manager Bitwarden Password Manager app context t:feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant