PM-40380: Add New Item button to Vault Toolbar - #22437
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: REQUEST CHANGES Reviewed the move of the Add Item button into the new vault table toolbar and the Code Review Details
|
| [coachmarkPosition]="coachmarkService.getStepPosition('addItem')" | ||
| (cipherAdded)="addCipher($event)" | ||
| (folderAdded)="addFolder()" | ||
| (collectionAdded)="addCollection()" |
There was a problem hiding this comment.
Details and fix
In the header, the menu's collection option went through VaultHeaderComponent.addCollection(), which guards before emitting onAddCollection: for a user with a single free organization already at maxCollections, it opens the upgrade dialog and returns (vault-header.component.ts lines 319-340).
Binding (collectionAdded) directly to VaultComponent.addCollection() drops that guard, so with vfo1-foundation enabled a free-org user at the limit now gets the collection dialog and a server-side failure on save instead of the upgrade prompt.
Moving the limit check into VaultComponent.addCollection() would restore it here and also cover openAddItemDialog(), which calls the same method.
| <vault-items-table | ||
| [ciphers]="ciphers" | ||
| [loading]="performingInitialLoad || refreshing" | ||
| [collections]="allCollections" | ||
| [organizations]="allOrganizations" | ||
| > |
There was a problem hiding this comment.
itemAction unset, no vault item can be opened while the flag is on.
Details and fix
VaultItemsTableComponent.itemAction is documented as: "Runs when a row's name is activated. Omit to render the name as plain text rather than a button." With vfo1-foundation enabled, the list therefore offers no way to view or edit an item, since app-vault-items (which handled that) is no longer rendered.
Compared with the desktop host (apps/desktop/src/vault/app/vault-v3/vault-list-table/vault-list-table.component.html lines 12-22), three other inputs are also unbound here:
folders—folderChips()resolves names from it, so the always-visible My folders column renders "None" for every row and the My folders filter chip stays disabled with the "no folders" tooltip even when the user has folders.rowActions— the overflow menu only renders whenvisibleActions(row).length > 0, so there are no per-row actions (clone, move, delete, restore).(selectedChange)— the oldapp-vault-itemsfedVaultBatchBarService; the table's selection is not forwarded, so withPM37785_VaultBatchBaralso on the batch bar never receives a selection.
If these are intentionally deferred to follow-up work, a short comment or ticket reference here would help.
nick-livefront
left a comment
There was a problem hiding this comment.
Does this overlap with @shane-melton's #22425?
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #22437 +/- ##
==========================================
+ Coverage 53.93% 53.97% +0.04%
==========================================
Files 4297 4304 +7
Lines 136500 136670 +170
Branches 21569 21586 +17
==========================================
+ Hits 73616 73769 +153
- Misses 57518 57522 +4
- Partials 5366 5379 +13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@nick-livefront Thanks for catching that - I synced up with @shane-melton and it seems we ended up with some dupe tickets - closing this one out in favor of his #22425 |
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-40380
📔 Objective
Moves the Add Item button into the new vault table toolbar. This also replaces the old vault list component with the new vault table, gated behind the
vfo1-foundationfeature flag.📸 Screenshots