Skip to content

[PM-37255] feat: Wire fill-assist manager into vault sync and app startup#6992

Draft
aj-rosado wants to merge 5 commits into
PM-37255/fill-assist-data-layerfrom
PM-37255/fill-assist-integration
Draft

[PM-37255] feat: Wire fill-assist manager into vault sync and app startup#6992
aj-rosado wants to merge 5 commits into
PM-37255/fill-assist-data-layerfrom
PM-37255/fill-assist-integration

Conversation

@aj-rosado

Copy link
Copy Markdown
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-37255

📔 Objective

Connects the fill-assist manager to the rest of the app so rules are fetched and kept fresh automatically.

Changes:

  • VaultSyncManagerImpl — calls fillAssistManager.syncIfNecessary() after vault data is stored; fill-assist failures are silently dropped and never affect vault sync
  • VaultManagerModule — injects FillAssistManager into VaultSyncManager
  • BitwardenApplication — injects FillAssistManager to trigger eager initialization; the init {} block subscribes to serverConfigStateFlow for config-change-triggered syncs

@aj-rosado aj-rosado added the ai-review Request a Claude code review label May 29, 2026
@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context t:feature Change Type - Feature Development labels May 29, 2026
@github-actions

github-actions Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed the integration wiring for FillAssistManager into VaultSyncManagerImpl, its DI provider in VaultManagerModule, eager initialization via BitwardenApplication, and the accompanying test changes. The syncIfNecessary() call is placed after vault data is persisted, fill-assist failures are isolated inside the manager's own runCatching/fire-and-forget sync and cannot affect vault sync results, and the manager also refreshes independently via its serverConfigStateFlow subscription. The reviewer's earlier request for appropriate verify calls has been addressed.

Code Review Details

No blocking findings.

  • The "skip sync" optimization path (no new server revision) intentionally does not call fillAssistManager.syncIfNecessary(), and VaultSyncManagerTest.kt:1276 asserts exactly = 0 for it. Fill-assist still refreshes via the manager's serverConfigStateFlow subscription and eager startup init, so coverage of this case is reasonable by design.
  • The previously requested verify calls for syncIfNecessary() are now present across the success and early-return test cases.

@codecov

codecov Bot commented May 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.19%. Comparing base (61db0cd) to head (b718f56).

Additional details and impacted files
@@                         Coverage Diff                          @@
##           PM-37255/fill-assist-data-layer    #6992       +/-   ##
====================================================================
+ Coverage                            69.18%   86.19%   +17.00%     
====================================================================
  Files                                  878      878               
  Lines                                63557    64003      +446     
  Branches                              9245     9272       +27     
====================================================================
+ Hits                                 43974    55168    +11194     
+ Misses                               16792     5636    -11156     
- Partials                              2791     3199      +408     
Flag Coverage Δ
app-data 17.37% <100.00%> (+<0.01%) ⬆️
app-ui-auth-tools 18.98% <0.00%> (?)
app-ui-platform 16.45% <0.00%> (-0.01%) ⬇️
app-ui-vault 27.75% <0.00%> (-0.01%) ⬇️
authenticator 6.20% <0.00%> (+<0.01%) ⬆️
lib-core-network-bridge 4.10% <0.00%> (+<0.01%) ⬆️
lib-data-ui 1.14% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

}

private val vaultSyncManager: VaultSyncManager = VaultSyncManagerImpl(
fillAssistManager = fillAssistManager,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make sure the appropriate verify calls happen

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:password-manager Bitwarden Password Manager app context t:feature Change Type - Feature Development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants