Skip to content

PM-46636: Revert "PM-46636: chore: Remove VFO-1 feature flag (#7597)" - #7647

Merged
mpbw2 merged 2 commits into
mainfrom
PM-46636/revert-vfo1-foundation-removal
Nov 25, 2026
Merged

mpbw2 merged 2 commits into
mainfrom
PM-46636/revert-vfo1-foundation-removal

Conversation

@mpbw2

@mpbw2 mpbw2 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-46636
Found during the mobile feature flag audit: https://bitwarden.atlassian.net/browse/PM-46176

📔 Objective

Reverts #7597, which removed the vfo1-foundation feature flag and made the VFO-1 naming unconditional on Android.

In LaunchDarkly Production, vfo1-foundation is still off for organizations in the complex-orgs segment, which are excluded "for performance reasons". Shipping the removal would have turned VFO-1 on for those organizations. VFO confirmed the exclusion still applies, so the flag needs to stay until the rollout is complete.

This needs to merge before today's release cut (Nov 25).

The revert had one conflict, in VaultItemListingScreenTest.kt imports: BiometricsManager moved to com.bitwarden.ui.platform.manager.biometrics in #7609, so only the restored FeatureFlagsState import is kept. The restored Vfo1FoundationFlagUpdateReceive test in VaultItemViewModelTest.kt also needed isInAppUpgradeAvailable = false on its two toViewState calls, since that parameter was added after the removal.

Translations

Crowdin Pull #7617 merged after #7597 and removed the translations for the 8 restored strings from every non-English locale, so the revert alone would have shown English text to non-English users with the flag off. 147fb04 restores those translations in all 63 locales from the last version before #7617.

📸 Screenshots

No new UI. This restores the behavior that shipped before #7597: VFO-1 naming follows the vfo1-foundation flag.

🤖 Generated with Claude Code

This reverts commit 4b8f597.

The removal made the VFO-1 behavior unconditional. In LaunchDarkly
Production, vfo1-foundation is still off for organizations in the
complex-orgs segment, which are excluded for performance reasons, so the
removal would have turned VFO-1 on for them. Restoring the flag keeps
Android in line with the current targeting until the rollout is complete.

Conflict: VaultItemListingScreenTest.kt imports. BiometricsManager moved
to com.bitwarden.ui.platform.manager.biometrics in PM-46848 (#7609), so
only the restored FeatureFlagsState import is kept.

Also passes isInAppUpgradeAvailable = false to the two toViewState calls
in the restored Vfo1FoundationFlagUpdateReceive test in
VaultItemViewModelTest.kt. The parameter was added after the flag was
removed, and the other 67 calls in the file already pass false.

Found during the mobile feature flag audit (PM-46176).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context t:tech-debt Change Type - Tech debt labels Nov 25, 2026
Comment on lines 389 to +398
get() = if (onlyShowCollections) {
BitwardenString.shared_folders.asText()
} else {
if (isVfo1FoundationEnabled) {
BitwardenString.shared_folders.asText()
} else {
BitwardenString.collections.asText()
}
} else if (isVfo1FoundationEnabled) {
BitwardenString.move.asText()
} else {
BitwardenString.move_to_organization.asText()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The appBarText getter nests a feature-flag conditional inside the onlyShowCollections branch, making label selection a multi-level decision.

Show fix
Suggested change
get() = if (onlyShowCollections) {
BitwardenString.shared_folders.asText()
} else {
if (isVfo1FoundationEnabled) {
BitwardenString.shared_folders.asText()
} else {
BitwardenString.collections.asText()
}
} else if (isVfo1FoundationEnabled) {
BitwardenString.move.asText()
} else {
BitwardenString.move_to_organization.asText()
get() {
if (onlyShowCollections) {
return if (isVfo1FoundationEnabled) {
BitwardenString.shared_folders.asText()
} else {
BitwardenString.collections.asText()
}
}
return if (isVfo1FoundationEnabled) {
BitwardenString.move.asText()
} else {
BitwardenString.move_to_organization.asText()
}
Details

✨ AI Reasoning
​The app-bar text selection first checks whether only collections are shown, then checks the feature flag within that branch; the alternate branch checks the flag again. This nested decision structure makes the selected label harder to follow.

Reply on this comment to give feedback or ignore the issue.
More info

Comment on lines 159 to +167
mutableStateFlow.update {
it.copy(
dialogState = VaultMoveToOrganizationState.DialogState.Error(
message = BitwardenString
.you_must_select_at_least_one_shared_folder
.asText(),
message = if (state.isVfo1FoundationEnabled) {
BitwardenString.you_must_select_at_least_one_shared_folder
.asText()
} else {
BitwardenString.select_one_collection.asText()
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new message conditional is nested inside the move callback, item lookup, selection branch, and state update, making this error path difficult to scan. Extract the message selection to reduce nesting.

Show fix
Suggested change
mutableStateFlow.update {
it.copy(
dialogState = VaultMoveToOrganizationState.DialogState.Error(
message = BitwardenString
.you_must_select_at_least_one_shared_folder
.asText(),
message = if (state.isVfo1FoundationEnabled) {
BitwardenString.you_must_select_at_least_one_shared_folder
.asText()
} else {
BitwardenString.select_one_collection.asText()
},
val errorMessage = if (state.isVfo1FoundationEnabled) {
BitwardenString.you_must_select_at_least_one_shared_folder.asText()
} else {
BitwardenString.select_one_collection.asText()
}
mutableStateFlow.update {
it.copy(
dialogState = VaultMoveToOrganizationState.DialogState.Error(
message = errorMessage,
Details

✨ AI Reasoning
​The new conditional selects the error message inside an existing chain of callbacks and a conditional branch. This makes the move action's already nested error-handling path harder to scan; extracting the message selection would reduce the nesting.

Reply on this comment to give feedback or ignore the issue.
More info

@mpbw2 mpbw2 added the ai-review Request a Claude code review label Nov 25, 2026
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

This update covers the new commit 147fb04, which restores translations for the 8 strings the revert brings back to ui/src/main/res/values/strings.xml: folders, collections, no_items_collection, owner, no_collections_to_list, move_to_organization, no_orgs_to_list and move_to_org_desc. All 63 locale files get exactly 8 added lines and nothing removed. The added lines, grouped by file and kept in order, are byte-identical to the lines Crowdin Pull #7617 (f14a6e3) removed for those keys. Every locale file and the English source now define each of the 8 keys exactly once, so there are no duplicate or missing resources and no new XML content. The earlier assessment of commit 973c284 still holds.

Code Review Details

No findings. The two open Aikido readability threads on VaultMoveToOrganizationViewModel.kt are about code restored exactly as it was before #7597, so they are not raised again here.

@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.89%. Comparing base (0911878) to head (147fb04).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...itemlisting/util/VaultItemListingDataExtensions.kt 53.33% 7 Missing ⚠️
.../ui/vault/feature/addedit/VaultAddEditViewModel.kt 83.33% 3 Missing and 1 partial ⚠️
...movetoorganization/VaultMoveToOrganizationEmpty.kt 0.00% 4 Missing ⚠️
...toorganization/VaultMoveToOrganizationViewModel.kt 80.00% 4 Missing ⚠️
...ui/vault/feature/vault/util/VaultDataExtensions.kt 71.42% 4 Missing ⚠️
.../ui/vault/feature/util/CipherListViewExtensions.kt 50.00% 0 Missing and 3 partials ⚠️
...rm/feature/search/util/SearchTypeDataExtensions.kt 66.66% 2 Missing ⚠️
...c/main/kotlin/com/x8bit/bitwarden/MainViewModel.kt 92.85% 1 Missing ⚠️
...tform/composition/util/Vfo1FoundationExtensions.kt 0.00% 0 Missing and 1 partial ⚠️
...warden/ui/vault/feature/item/VaultItemViewModel.kt 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #7647    +/-   ##
========================================
  Coverage   86.88%   86.89%            
========================================
  Files         897      898     +1     
  Lines       65296    65470   +174     
  Branches     9400     9417    +17     
========================================
+ Hits        56734    56887   +153     
- Misses       5092     5108    +16     
- Partials     3470     3475     +5     
Flag Coverage Δ
app-data 18.95% <0.00%> (-0.08%) ⬇️
app-ui-auth-tools 18.77% <6.22%> (-0.06%) ⬇️
app-ui-platform 15.98% <10.04%> (-0.04%) ⬇️
app-ui-vault 27.13% <70.04%> (+0.11%) ⬆️
authenticator 6.04% <0.00%> (-0.03%) ⬇️
lib-core-network-bridge 4.14% <0.00%> (-0.02%) ⬇️
lib-data-ui 1.33% <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 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.

@mpbw2
mpbw2 marked this pull request as ready for review November 25, 2026 18:37
@mpbw2
mpbw2 requested review from a team and david-livefront as code owners November 25, 2026 18:38
…evert

The revert of #7597 restored 8 flag-off strings in ui/src/main/res/values
(folders, collections, move_to_organization and others), but Crowdin Pull
#7617, which merged after #7597, had already removed their translations
from every other locale. Without them, non-English users with
vfo1-foundation off would see English text.

Restores those 8 strings in all 63 locales from the last version before
#7617 (f14a6e3^). The next Crowdin pull will keep them, since the
English source has the keys again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mpbw2
mpbw2 added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 4aa3c96 Nov 25, 2026
28 checks passed
@mpbw2
mpbw2 deleted the PM-46636/revert-vfo1-foundation-removal branch November 25, 2026 21:34
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:authenticator Bitwarden Authenticator app context app:password-manager Bitwarden Password Manager app context t:tech-debt Change Type - Tech debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants