From afe296c3db9e242a214dc4a3a0d785f07256b3dd Mon Sep 17 00:00:00 2001 From: aj-rosado <109146700+aj-rosado@users.noreply.github.com> Date: Thu, 21 May 2026 17:28:27 +0100 Subject: [PATCH] [PM-37254] feat: Add fill-assist-targeting-rules feature flag (#6952) --- .../com/bitwarden/core/data/manager/model/FlagKey.kt | 9 +++++++++ .../com/bitwarden/core/data/manager/model/FlagKeyTest.kt | 5 +++++ .../ui/platform/components/debug/FeatureFlagListItems.kt | 5 +++++ ui/src/main/res/values/strings_non_localized.xml | 1 + 4 files changed, 20 insertions(+) diff --git a/core/src/main/kotlin/com/bitwarden/core/data/manager/model/FlagKey.kt b/core/src/main/kotlin/com/bitwarden/core/data/manager/model/FlagKey.kt index ed5eb442ad..d438b6a96f 100644 --- a/core/src/main/kotlin/com/bitwarden/core/data/manager/model/FlagKey.kt +++ b/core/src/main/kotlin/com/bitwarden/core/data/manager/model/FlagKey.kt @@ -43,6 +43,7 @@ sealed class FlagKey { V2EncryptionTde, NewItemTypes, DebugDisableSelfHostPremiumCheck, + FillAssistTargetingRules, ) } } @@ -152,6 +153,14 @@ sealed class FlagKey { override val defaultValue: Boolean = false } + /** + * Data object holding the feature flag key for the Fill Assist Targeting Rules feature. + */ + data object FillAssistTargetingRules : FlagKey() { + override val keyName: String = "fill-assist-targeting-rules" + override val defaultValue: Boolean = false + } + /** * Debug-only flag that, when enabled, makes self-hosted environments behave as cloud * environments for premium-upgrade gating. Used by QA to test the premium upgrade flow diff --git a/core/src/test/kotlin/com/bitwarden/core/data/manager/model/FlagKeyTest.kt b/core/src/test/kotlin/com/bitwarden/core/data/manager/model/FlagKeyTest.kt index 395e2b5704..14003043ae 100644 --- a/core/src/test/kotlin/com/bitwarden/core/data/manager/model/FlagKeyTest.kt +++ b/core/src/test/kotlin/com/bitwarden/core/data/manager/model/FlagKeyTest.kt @@ -48,6 +48,10 @@ class FlagKeyTest { FlagKey.NewItemTypes.keyName, "pm-32009-new-item-types", ) + assertEquals( + FlagKey.FillAssistTargetingRules.keyName, + "fill-assist-targeting-rules", + ) assertEquals( FlagKey.ManageDevices.keyName, "pm-4516-devices-add-last-activity-date", @@ -68,6 +72,7 @@ class FlagKeyTest { FlagKey.V2EncryptionPassword, FlagKey.V2EncryptionTde, FlagKey.NewItemTypes, + FlagKey.FillAssistTargetingRules, FlagKey.ManageDevices, ).all { !it.defaultValue diff --git a/ui/src/main/kotlin/com/bitwarden/ui/platform/components/debug/FeatureFlagListItems.kt b/ui/src/main/kotlin/com/bitwarden/ui/platform/components/debug/FeatureFlagListItems.kt index c69302aaf3..1cc2bb7c8b 100644 --- a/ui/src/main/kotlin/com/bitwarden/ui/platform/components/debug/FeatureFlagListItems.kt +++ b/ui/src/main/kotlin/com/bitwarden/ui/platform/components/debug/FeatureFlagListItems.kt @@ -36,6 +36,7 @@ fun FlagKey.ListItemContent( FlagKey.V2EncryptionPassword, FlagKey.V2EncryptionTde, FlagKey.NewItemTypes, + FlagKey.FillAssistTargetingRules, FlagKey.DebugDisableSelfHostPremiumCheck, -> { @Suppress("UNCHECKED_CAST") @@ -94,6 +95,10 @@ private fun FlagKey.getDisplayLabel(): String = when (this) { FlagKey.V2EncryptionPassword -> stringResource(BitwardenString.v2_encryption_password) FlagKey.V2EncryptionTde -> stringResource(BitwardenString.v2_encryption_tde) FlagKey.NewItemTypes -> stringResource(BitwardenString.new_item_types) + FlagKey.FillAssistTargetingRules -> { + stringResource(BitwardenString.fill_assist_targeting_rules) + } + FlagKey.DebugDisableSelfHostPremiumCheck -> { stringResource(BitwardenString.debug_disable_self_host_premium_check) } diff --git a/ui/src/main/res/values/strings_non_localized.xml b/ui/src/main/res/values/strings_non_localized.xml index c9738efba5..d784af3cd7 100644 --- a/ui/src/main/res/values/strings_non_localized.xml +++ b/ui/src/main/res/values/strings_non_localized.xml @@ -52,6 +52,7 @@ V2 Encryption - Password Manage devices New Item Types + Fill Assist Targeting Rules Debug: Disable self-host premium check