[PM-37215] Add USER_EMAIL setting and persist via save_to_state#1163
Conversation
|
🔍 SDK Breaking Change DetectionSDK Version:
Breaking change detection uses the build of the SDK from this branch, including any incompatibities pre-existing on or merged into this branch. Check the workflow logs to confirm. |
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR adds a Code Review DetailsNo findings. The change is minimal, follows the existing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1163 +/- ##
=======================================
Coverage 84.12% 84.12%
=======================================
Files 446 446
Lines 58817 58835 +18
=======================================
+ Hits 49478 49496 +18
Misses 9339 9339 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ER_EMAIL setting and persist via save_to_state (bitwarden/sdk-internal#1163)
## 🎟️ Tracking <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> ## 📔 Objective Fix failures on main due to the merge of #1104 and #1163 ## 🚨 Breaking Changes <!-- Does this PR introduce any breaking changes? If so, please describe the impact and migration path for clients. If you're unsure, the automated TypeScript compatibility check will run when you open/update this PR and provide feedback. For breaking changes: 1. Describe what changed in the client interface 2. Explain why the change was necessary 3. Provide migration steps for client developers 4. Link to any paired client PRs if needed Otherwise, you can remove this section. -->



🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-37215
📔 Objective
Adds a
USER_EMAILpersisted setting key inpersisted_state.rsand wires the value throughSaveStateDatasoClient::save_to_statewrites it alongsideUSER_ID,BASE_URLS, andACCOUNT_CRYPTO_STATE. Once available,bw statuscan read the active user's email from the state registry instead of returningnull.The ticket also calls for populating this value inside the Auth team's
from_authenticated_data, which does not exist yet and is part of Auth's work. This PR adds the Platform-side subset (the setting key + the temporarysave_to_statepersistence) so callers can populate the email today without rework once Auth lands its handler.