Skip to content

PM-39888: feat: ViewModel controls Environment Selector options#7135

Merged
david-livefront merged 1 commit into
mainfrom
PM-39888-enviroment-selector
Jul 2, 2026
Merged

PM-39888: feat: ViewModel controls Environment Selector options#7135
david-livefront merged 1 commit into
mainfrom
PM-39888-enviroment-selector

Conversation

@david-livefront

@david-livefront david-livefront commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

🎟️ Tracking

PM-39888

📔 Objective

This PR updates the Environment Selector to allow the ViewModel to control which environments are available.

@david-livefront
david-livefront requested a review from a team as a code owner July 2, 2026 15:02
@github-actions github-actions Bot added the app:password-manager Bitwarden Password Manager app context label Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed the refactor allowing the ViewModel to control which environments the EnvironmentSelector offers. The options parameter is now hoisted into LandingState and StartRegistrationState as a computed environmentTypeOptions property, and both screen callers pass it through. The change is behavior-preserving (all Environment.Type.entries are still returned) and both EnvironmentSelector call sites were updated consistently.

Code Review Details

No blocking findings.

Notes:

  • The computed environmentTypeOptions property is correctly excluded from Parcelable serialization since it is a get()-only property, not a constructor field.
  • Both EnvironmentSelector callers (LandingScreen, StartRegistrationScreen) were updated to supply the new required options parameter; no other call sites exist.
  • The StartRegistrationContent signature change from individual parameters to a single state argument is internal (private composable) and its previews were updated accordingly.

@david-livefront david-livefront changed the title PM-39888: ViewModel controls Environment Selector options PM-39888: tool: ViewModel controls Environment Selector options Jul 2, 2026
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.28%. Comparing base (974006a) to head (fed6df1).

Files with missing lines Patch % Lines
...ature/startregistration/StartRegistrationScreen.kt 31.81% 14 Missing and 1 partial ⚠️
...re/startregistration/StartRegistrationViewModel.kt 80.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7135      +/-   ##
==========================================
- Coverage   86.17%   85.28%   -0.89%     
==========================================
  Files         882      928      +46     
  Lines       64344    66194    +1850     
  Branches     9580     9620      +40     
==========================================
+ Hits        55449    56455    +1006     
- Misses       5451     6304     +853     
+ Partials     3444     3435       -9     
Flag Coverage Δ
app-data 17.17% <0.00%> (-0.42%) ⬇️
app-ui-auth-tools 18.96% <50.00%> (+0.19%) ⬆️
app-ui-platform 16.98% <0.00%> (+0.48%) ⬆️
app-ui-vault 28.14% <0.00%> (+0.62%) ⬆️
authenticator 6.15% <0.00%> (+0.01%) ⬆️
lib-core-network-bridge 4.03% <0.00%> (-0.01%) ⬇️
lib-data-ui ?

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

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

@david-livefront david-livefront added the t:feature Change Type - Feature Development label Jul 2, 2026
@david-livefront david-livefront changed the title PM-39888: tool: ViewModel controls Environment Selector options PM-39888: feat: ViewModel controls Environment Selector options Jul 2, 2026
@david-livefront
david-livefront requested a review from aj-rosado July 2, 2026 17:02
@david-livefront

Copy link
Copy Markdown
Collaborator Author

Thanks @aj-rosado

@david-livefront
david-livefront added this pull request to the merge queue Jul 2, 2026
Merged via the queue into main with commit 849217c Jul 2, 2026
27 of 30 checks passed
@david-livefront
david-livefront deleted the PM-39888-enviroment-selector branch July 2, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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