Repository navigation
PM-46636: Revert "PM-46636: chore: Remove VFO-1 feature flag (#7597)" - #7647
Conversation
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>
| 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() |
There was a problem hiding this comment.
The appBarText getter nests a feature-flag conditional inside the onlyShowCollections branch, making label selection a multi-level decision.
Show fix
| 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
| 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() | ||
| }, |
There was a problem hiding this comment.
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
| 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
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This update covers the new commit 147fb04, which restores translations for the 8 strings the revert brings back to Code Review DetailsNo findings. The two open Aikido readability threads on |
Codecov Report❌ Patch coverage is 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…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>
🎟️ 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-foundationfeature flag and made the VFO-1 naming unconditional on Android.In LaunchDarkly Production,
vfo1-foundationis still off for organizations in thecomplex-orgssegment, 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.ktimports:BiometricsManagermoved tocom.bitwarden.ui.platform.manager.biometricsin #7609, so only the restoredFeatureFlagsStateimport is kept. The restoredVfo1FoundationFlagUpdateReceivetest inVaultItemViewModelTest.ktalso neededisInAppUpgradeAvailable = falseon its twotoViewStatecalls, 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-foundationflag.🤖 Generated with Claude Code