[PM-41934] fix: Fix Bank Account behavior and UI bugs - #2983
[PM-41934] fix: Fix Bank Account behavior and UI bugs#2983morganzellers-bw wants to merge 11 commits into
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: REQUEST CHANGES Reviewed the Bank Account UI/behavior fixes: hiding the Bank Accounts types row when its count is zero, the new Code Review Details
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2983 +/- ##
==========================================
+ Coverage 79.60% 81.87% +2.26%
==========================================
Files 1169 1046 -123
Lines 75194 67897 -7297
==========================================
- Hits 59857 55589 -4268
+ Misses 15337 12308 -3029 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
7963b10 to
2ebf3a5
Compare
239ccd3 to
d3005e0
Compare
30b3ed8 to
a108efb
Compare
a1f4cf1 to
d9f3900
Compare
…nt items addTypesSection() added the Bank Accounts row whenever the newItemTypes flag was enabled, regardless of count. Guard it with a zero-count check, matching the existing pattern used for Cards, so the filter only appears once the user has at least one bank account item.
…laceholder The Account Type menu rendered options alphabetically with a "--Select--" placeholder on top instead of the design order. Add an explicit displayOrder to BankAccountType and wire the menu to it; the unset state now reads "Checking" instead of showing a placeholder.
CipherType.canCreateCases listed types in the wrong order, causing the Add Item menu to show Secure note between Identity and Bank account instead of after License/Passport. Reorder to match design.
…ccount item Saving (adding or editing) a bank account cipher previously dismissed back to the vault with no confirmation. Adds a dedicated CipherItemOperationDelegate callback so the presenting screen can show a "Bank account saved" toast, matching the expected UX for the new item type.
The state was flipped from .default to .custom(.checking) on tap-up via TapGesture, which lands too late relative to when the native Menu snapshots its content for presentation - the checkmark didn't appear. Switching to a touch-down-triggered DragGesture(minimumDistance: 0) gives SwiftUI a render pass to update the selection before the menu opens.
The touch-down gesture trick to fake a "menu opened" event was more complexity than this needed. Defaulting BankAccountItemState's accountType straight to .custom(.checking) makes the label, checkmark, and persisted value agree from the start for any new bank account item, with no special-casing required.
… folder from an item's folder dropdown" This reverts commit 116b4b9.
…a bank account item" This reverts commit 81cd127.
d9f3900 to
4ff45ae
Compare
| extension AddEditItemProcessor: AddEditFolderDelegate { | ||
| func folderAdded(_ folderView: FolderView) { | ||
| state.folder = .custom(folderView) | ||
| state.toast = Toast(title: Localizations.folderCreated) |
There was a problem hiding this comment.
main, regressing PM-41957 for the item folder dropdown path.
Details and fix
The branch commit 7519d77 ("Revert [PM-41957]...") reverts 116b4b9, but that commit is not part of this branch — it is in the PR's base. The merge base (9de43d8) contains state.toast = Toast(title: Localizations.folderCreated) in folderAdded(_:), so this diff is a net removal of shipped behavior rather than a no-op drop of in-branch work.
PR #2991 ("Show New folder created toast on all folder creation paths", merged 2026-09-01) added exactly these two lines — the processor line and the XCTAssertEqual(subject.state.toast, Toast(title: Localizations.folderCreated)) assertion in AddEditItemProcessorTests.test_folderAdded. VaultListProcessor.swift:839 still sets the toast, so after this merges the vault-list path keeps the toast while adding a folder from an item's folder dropdown silently loses it — the specific path PM-41957 was filed for.
The PR description strikes PM-41957 through, which suggests the intent was to drop that work from this PR, not to remove it from main. Suggest restoring both lines:
func folderAdded(_ folderView: FolderView) {
state.folder = .custom(folderView)
state.toast = Toast(title: Localizations.folderCreated)
}If removing it is intentional (e.g. superseded by a different toast strategy), it would help to say so in the description so the revert is not read as an accidental rebase artifact.
🎟️ Tracking
PM-41935 — Show "Bank account saved" toast after saving a bank account itemPM-41957 — Show "New folder created" toast when adding a folder from an item's folder dropdown📔 Objective
Adds a batch of small Bank Account item behavior/UI bug fixes.
📸 Screenshots
Click to reveal
PM-41934 Hide Bank Account
PM-41936 Account type dropdown order
PM-41937 Add item type menu order