clients icon indicating copy to clipboard operation
clients copied to clipboard

Desktop/pm 18769/migrate vault filters

Open lxiong-livefront opened this issue 3 weeks ago • 3 comments

🎟️ Tracking

JIRA story

📔 Objective

Migrated vault filters to new v3 vault's navigation

  • Decoupled existing vault filtering from vault component by using routed params with routed-vault-filter-bridge
  • Converted vault filters to standalone components
  • Removed extending filter Base Components from deprecated /libs/angular library and handled logic directly
  • Moved shared 'models' and 'services' directories from web-vault into /libs/vault

🚩 Constraints

The VaultFilterService reloads collections and folders when a new organization is set using setOrganizationFilter(), which aligns with the web experience. With this new design for desktop, we want to preserve all collections for organizations instead of filtered collections. Otherwise, all organizations are re-rendered as 'items' instead of 'groups' except for the selected org. The drawback is Folders aren't reloaded when a new organization is selected.

📸 Screenshots

https://github.com/user-attachments/assets/10af81bd-6322-4e1d-be6f-733a3fd56f13

lxiong-livefront avatar Dec 11 '25 02:12 lxiong-livefront

Logo Checkmarx One – Scan Summary & Details71d17129-5b12-46d0-8310-1b3d353e3863

Great job! No new security vulnerabilities introduced in this pull request

github-actions[bot] avatar Dec 11 '25 02:12 github-actions[bot]

Changes in this PR impact the Autofill experience of the browser client

BIT has tested the core experience with these changes and all feature flags disabled.

✅ Fortunately, these BIT tests have passed! 🎉

bw-ghapp[bot] avatar Dec 11 '25 19:12 bw-ghapp[bot]

Changes in this PR impact the Autofill experience of the browser client

BIT has tested the core experience with these changes and the feature flag configuration used by vault.bitwarden.com.

✅ Fortunately, these BIT tests have passed! 🎉

bw-ghapp[bot] avatar Dec 11 '25 19:12 bw-ghapp[bot]

Please run prettier it should remove most teams from the review list due to the files being wrongly re-formatted ...

Hinton avatar Dec 15 '25 09:12 Hinton

Some behavioral things noted while testing:

  • Navigating to any filter should navigate you to the vault page.
  • It should be possible to select item types and folders while an Organization is selected.

You also have errors in other clients due to the file moves. (I suspect the path are absolute rather than using the @bitwarden/vault library.)

Hinton avatar Dec 16 '25 10:12 Hinton

Some behavioral things noted while testing:

  • Navigating to any filter should navigate you to the vault page.
  • It should be possible to select item types and folders while an Organization is selected.

You also have errors in other clients due to the file moves. (I suspect the path are absolute rather than using the @bitwarden/vault library.)

All vault filters should now correctly navigate to the vault page, and we are able to select types and folders while an org/collection is selected (addressed in 9f5dbb5). I figured creating a 'DesktopRoutedVaultFilterBridge' would be the cleanest way to implement desktop specific navigation, but can handle routing in each filter component if that's preferred.

Also moved 'Collections' outside of 'Organizations', aligning with the web experience. Collections and Folders should now both be properly updated when an organization is selected. (383cb06) and added 'All items' filter (1fbb480)

Fixed broken imports in 383cb06

lxiong-livefront avatar Dec 16 '25 19:12 lxiong-livefront

  • The web builds are failing.
  • Is there a way to reset "My vault" and "org" filters?

Hinton avatar Dec 18 '25 12:12 Hinton

FYI you have some type errors in the test files, you can run npm run test:types from the root of the repository to reproduce these locally.

Hinton avatar Dec 19 '25 10:12 Hinton

FYI you have some type errors in the test files, you can run npm run test:types from the root of the repository to reproduce these locally.

Fixed type errors in test files in 2367ccb

Also added an 'All vaults' and moved type filters under 'All items' in d433fa2. I tested and found some strange behavior with 'My vault' items disappearing on page reload, but fixed that in this commit in vault.component. Let me know if you notice any other issues while testing!

lxiong-livefront avatar Dec 19 '25 17:12 lxiong-livefront