Skip to content

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

Draft
aj-rosado wants to merge 4 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 4 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 VaultSyncManager and BitwardenApplication. The PR is small, focused, and follows the existing pattern of injecting eager-init singletons (e.g., restrictionManager, environmentRepository) into the application class. The call to fillAssistManager.syncIfNecessary() is safely placed after vaultDiskSource.replaceVaultData(...) on the full-sync success path; because the manager dispatches its work onto its own ioScope, it does not block the user-state transaction or affect vault sync results.

Code Review Details

No new findings.

The existing unresolved thread from david-livefront on VaultSyncManagerTest.kt:153 (request for verify calls on fillAssistManager.syncIfNecessary()) remains valid — the test mocks syncIfNecessary() but no assertion confirms it is invoked on the success path nor that it is skipped on the security-stamp-mismatch / failure paths. Addressing that comment will close the test coverage gap for this wiring.

@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