Skip to content

Conversation

@harr1424
Copy link
Contributor

@harr1424 harr1424 commented Oct 3, 2025

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-25525?atlOrigin=eyJpIjoiNGUwOThmZjM4Y2QyNGExNWI1ODdjYzg5ZDE3ODYzNzAiLCJwIjoiaiJ9

📔 Objective

The system service provider aggregates several services into a single injectable type. This type isn’t compatible with Angular injection, has objects like the extension registry that aren’t properly configurable, and introduces multiple instances of itself.

Revise the system service provider to fix these issues.

Move the LogProvider and SemanticLogger to @bitwarden/logging

Preserve the observable in BitwardenClient

Write a facade over ConfigService and PlatformUtilsService that consolidates environmental awareness.

Consider introducing a “capabilities” abstraction for this.

The extension system provides an example of how the APIs may evolve.

The algorithm metadata provides an example of how capabilities can be surfaced.

Replace the SystemServiceProvider type with something that better composes with DI.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2025

Logo
Checkmarx One – Scan Summary & Detailsf2a95a32-92a7-4f06-af12-29d23d1211d3

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

@codecov
Copy link

codecov bot commented Oct 3, 2025

Codecov Report

❌ Patch coverage is 48.93617% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.78%. Comparing base (9f0a565) to head (e9ff409).
⚠️ Report is 482 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
libs/common/src/tools/providers.ts 9.75% 37 Missing ⚠️
libs/importer/src/components/importer-providers.ts 0.00% 6 Missing ⚠️
apps/browser/src/background/main.background.ts 50.00% 2 Missing ⚠️
...enerator/credential-generator-history.component.ts 0.00% 1 Missing ⚠️
libs/angular/src/services/injection-tokens.ts 0.00% 1 Missing ⚠️
libs/logging/src/factory.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16730      +/-   ##
==========================================
- Coverage   38.79%   38.78%   -0.02%     
==========================================
  Files        3411     3410       -1     
  Lines       96907    96953      +46     
  Branches    14559    14560       +1     
==========================================
+ Hits        37596    37603       +7     
- Misses      57659    57700      +41     
+ Partials     1652     1650       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

• remove unused logging methods in import.service.spec.ts
• restore (unused) feature flag support in generator-services.module.ts
• avoid type casting
• clarify doc comments
• PlatformUtilsService.copyToClipboard()
• PlatformUtilsService.readFromClipboard()
• DEPRECATED PlatformUtilsService.showToast()

these methods weren't being used, but in order to avoid breaking anything, I've added them
@harr1424 harr1424 marked this pull request as ready for review October 6, 2025 13:47
@harr1424 harr1424 requested review from a team as code owners October 6, 2025 13:47
@harr1424 harr1424 requested a review from coroiu October 6, 2025 13:47
@harr1424 harr1424 marked this pull request as draft October 6, 2025 16:27
@coroiu coroiu removed their request for review October 7, 2025 11:34
@coroiu
Copy link
Contributor

coroiu commented Oct 7, 2025

Removing review request as PR is marked as draft, let me know when it's ready!

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 7, 2025

@bw-ghapp
Copy link
Contributor

bw-ghapp bot commented Oct 7, 2025

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
Copy link
Contributor

bw-ghapp bot commented Oct 7, 2025

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! 🎉

@harr1424 harr1424 changed the title Pm 25525 debt fix system service provider dependency injection PM-25525 debt fix system service provider dependency injection Oct 9, 2025
@harr1424
Copy link
Contributor Author

This effort is being abandoned as it was not completed before the existing SystemServiceProvider implementation was heavily used by the direct Chromium importer.

@harr1424 harr1424 closed this Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants