Skip to content

Cleanup feature flags#3002

Open
StylianosGakis wants to merge 7 commits into
developfrom
chore/overhaul-feature-flags
Open

Cleanup feature flags#3002
StylianosGakis wants to merge 7 commits into
developfrom
chore/overhaul-feature-flags

Conversation

@StylianosGakis

Copy link
Copy Markdown
Member

More discussion here: https://hedviginsurance.slack.com/archives/C03U9C6Q7TP/p1782137564494479

Delete ENABLE_CLAIM_HISTORY, ENABLE_VIDEO_PLAYER_IN_CHAT_MESSAGES,
TRAVEL_ADDON, and TERMINATION_FLOW as we never turn those off

Rework the remaining flags so each Feature enum name mirrors its Unleash
key polarity (DISABLE_PUPPY_GUIDE, ENABLE_NEW_CONVERSATION_FROM_INBOX).
UnleashFeatureFlagProvider now returns the raw isEnabled(key) for every
flag, and kill-switch consumers invert at the read site.

Due to the "default value" unleash problem, this means that each
feature flag makes a more concious decision of what its "default"
behavior is when we have failed to fetch it, depending on if it's a
kill-switch style flag or a turn-on style flag.

The bootstrap parameter in the UnleashClient.start function allows
us to control that default ourselves instead before we ever get a
proper first response from the backend

# Conflicts:
#	app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/di/HelpCenterModule.kt
#	app/featureflags/feature-flags/src/androidMain/kotlin/com/hedvig/android/featureflags/flags/UnleashFeatureFlagProvider.kt
#	app/featureflags/feature-flags/src/commonMain/kotlin/com/hedvig/android/featureflags/flags/Feature.kt
Remove MOVING_FLOW, PAYMENT_SCREEN, EDIT_COINSURED and HELP_CENTER (all at
100% rollout) along with the dead DISABLE_REDEEM_CAMPAIGN, collapsing each
flag check to its enabled behavior. Also wire ALWAYS_AVAILABLE_INBOX_AND_NEW_CHAT
to its Unleash key.
Delete ENABLE_CLAIM_HISTORY, ENABLE_VIDEO_PLAYER_IN_CHAT_MESSAGES,
TRAVEL_ADDON, and TERMINATION_FLOW as we never turn those off

Rework the remaining flags so each Feature enum name mirrors its Unleash
key polarity (DISABLE_PUPPY_GUIDE, ENABLE_NEW_CONVERSATION_FROM_INBOX).
UnleashFeatureFlagProvider now returns the raw isEnabled(key) for every
flag, and kill-switch consumers invert at the read site.

Due to the "default value" unleash problem, this means that each
feature flag makes a more concious decision of what its "default"
behavior is when we have failed to fetch it, depending on if it's a
kill-switch style flag or a turn-on style flag.

The `bootstrap` parameter in the `UnleashClient.start` function allows
us to control that default ourselves instead before we ever get a
proper first response from the backend
@StylianosGakis StylianosGakis requested a review from a team as a code owner June 22, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant