Skip to content

Conversation

@shane-melton
Copy link
Member

@shane-melton shane-melton commented Jul 30, 2025

🎟️ Tracking

PM-24243

📔 Objective

When creating an SDK client, use a new load_flags method on the platform client to initialize the SDK client flags. Necessary so that the SDK will only use cipher key encryption when the LD feature flag is enabled.

Requires bitwarden/sdk-internal#369 - Merged!

Previous SDK PR was reverted in favor of bitwarden/sdk-internal#378 which updates the load_flags method to accept a map instead of strongly typed enum/record.

⏰ 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

@shane-melton shane-melton marked this pull request as ready for review July 30, 2025 23:40
@shane-melton shane-melton requested a review from a team as a code owner July 30, 2025 23:40
@shane-melton shane-melton requested a review from addisonbeck July 30, 2025 23:40
@github-actions
Copy link
Contributor

github-actions bot commented Jul 30, 2025

Logo
Checkmarx One – Scan Summary & Details4b0143b3-cdf0-4340-bdc0-4571e17def9b

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

addisonbeck
addisonbeck previously approved these changes Jul 31, 2025
shane-melton added a commit to bitwarden/sdk-internal that referenced this pull request Aug 5, 2025
## 🎟️ Tracking

[PM-24243](https://bitwarden.atlassian.net/browse/PM-24243)

## 📔 Objective

Add `load_flags` method to the wasm `PlatformClient` to match parity
with the uniffi `PlatformClient` so that the TS clients can set the SDK
flags dynamically.

Related Clients PR: bitwarden/clients#15855

~Added a `FlagsInput` struct that mimics the internal `Flags` struct but
with tsify bindings.~

~Another potential option is to make the internal `Flags` struct public
with wasm bindings to avoid duplicating the struct.~

## ⏰ 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

<!-- Suggested interactions but feel free to use (or not) as you desire!
-->

- 👍 (`:+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


[PM-24243]:
https://bitwarden.atlassian.net/browse/PM-24243?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@codecov
Copy link

codecov bot commented Aug 5, 2025

Codecov Report

❌ Patch coverage is 45.45455% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.31%. Comparing base (2de321d) to head (893cec8).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...n/src/platform/services/sdk/default-sdk.service.ts 45.45% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15855      +/-   ##
==========================================
- Coverage   37.31%   37.31%   -0.01%     
==========================================
  Files        3348     3348              
  Lines       95120    95130      +10     
  Branches    14384    14385       +1     
==========================================
- Hits        35495    35493       -2     
- Misses      58055    58066      +11     
- Partials     1570     1571       +1     

☔ 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.

@shane-melton shane-melton requested a review from Hinton August 11, 2025 21:34
@bw-ghapp

This comment was marked as outdated.

@bw-ghapp

This comment was marked as outdated.

addisonbeck
addisonbeck previously approved these changes Aug 21, 2025
@shane-melton
Copy link
Member Author

@addisonbeck Sorry to ping again, had to resolve a merge conflict

addisonbeck
addisonbeck previously approved these changes Sep 3, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 3, 2025

@bw-ghapp
Copy link
Contributor

bw-ghapp bot commented Sep 3, 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 Sep 3, 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! 🎉

@shane-melton shane-melton merged commit b6ef771 into main Sep 3, 2025
99 checks passed
@shane-melton shane-melton deleted the vault/pm-24243/load-feature-flags-into-sdk branch September 3, 2025 17:56
vlad-trofimov pushed a commit to vlad-trofimov/clients that referenced this pull request Sep 30, 2025
…n#15855)

* [PM-24243] Load config service feature flag into SDK client during initialization

* [PM-24243] Bump sdk version

* [PM-24243] Update load_flags to use generic Map instead of strongly typed object

* [PM-24243] Pass entire feature states object into SDK

* [PM-24243] Bump SDK version

* [PM-24243] Fix failing test
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