Skip to content

refactor(featureflags): remove launched beta flags - #1179

Open
bmc08gt wants to merge 4 commits into
code/cashfrom
chore/remove-launched-beta-flags
Open

refactor(featureflags): remove launched beta flags#1179
bmc08gt wants to merge 4 commits into
code/cashfrom
chore/remove-launched-beta-flags

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

Audits the Android beta/feature flags and retires every flag marked launched = true. A launched flag already returns true unconditionally at runtime (the controller short-circuits it), so removing it and inlining the always-on path is behavior-preserving cleanup — no user-visible change.

14 flags removed: WelcomeBonusBill, Pools, OnRamp, BillCustomizer, CurrencyCreator, CashReserves, MarketCapChart, CoinbaseOnRamp, TokenDiscovery, DepositUsdc, PhoneNumberSend, OnboardingPhoneVerification, Messenger, AddMoneyUX.

Kept (still genuinely in-flight): CredentialManager, VibrateOnScan, TransactionDetails, CoinbaseOnRampSandbox, BillTextures, BackgroundReset, ContactPickerMode, GiveUsdf, NavBar, ShowNetworkState, Tipping, FrostedTipCard, Blocklist.

Commits

  1. refactor: inline launched beta flags at call sites — every consumer treats the flag as always-on: dead if (flag)/else branches collapsed, constant state fields removed and their observe/event/reducer plumbing deleted, always-on values propagated into the UI, and now-unused FeatureFlagController dependencies dropped. Also removes the dead server-flag OR (flag || enablePhoneNumberSend, always true) and RealChatCoordinator's redundant flag observer. (Flags still defined here → compiles.)
  2. chore: remove launched beta flag definitions — deletes the 14 data objects and their title/message entries from FeatureFlag.kt. (No references remain → compiles.)

Notable structural cleanups

  • Removed SessionState.addMoneyUx and SessionState.isPhoneNumberSendEnabled (+ updated SessionStateHolderTest).
  • Deleted RealChatCoordinator.observeFeatureFlag() / isChatEnabled() — redundant with the unconditional login sync.
  • Unwrapped always-true if (chartEnabled) in MarketCapSection and the add-money branches across Swap/Token/Menu/Balance/Chat flows.
  • Removed the orphaned description_noBalanceYetDiscover string.

Testing

  • ./gradlew :apps:flipcash:app:assembleDebugBUILD SUCCESSFUL
  • :apps:flipcash:shared:session + :apps:flipcash:shared:featureflags unit tests → pass

bmc08gt added 2 commits July 31, 2026 11:51
The following flags shipped (launched = true) and already returned true
unconditionally at runtime, so inline them as always-on and delete the
now-dead disabled branches: WelcomeBonusBill, Pools, OnRamp, BillCustomizer,
CurrencyCreator, CashReserves, MarketCapChart, CoinbaseOnRamp, TokenDiscovery,
DepositUsdc, PhoneNumberSend, OnboardingPhoneVerification, Messenger, AddMoneyUX.

- Collapse constant flag state into defaults and remove the observe/event/reducer
  plumbing (e.g. depositFirstUx, marketCapChartEnabled, createEnabled,
  isPhoneNumberSendEnabled, addMoneyUx) and propagate the always-on value into UI.
- Drop the dead server-flag OR (flag || enablePhoneNumberSend) that was always
  true, and remove RealChatCoordinator's now-redundant flag observer / isChatEnabled.
- Remove FeatureFlagController dependencies left unused after inlining, plus the
  orphaned description_noBalanceYetDiscover string.

Behavior-preserving: each flag already evaluated to true for all users.
Delete the 14 shipped (launched = true) flag data objects and their title/message
entries now that all call sites treat them as always-on. Remaining flags are the
genuinely in-flight ones (CredentialManager, VibrateOnScan, TransactionDetails,
CoinbaseOnRampSandbox, BillTextures, BackgroundReset, ContactPickerMode, GiveUsdf,
NavBar, ShowNetworkState, Tipping, FrostedTipCard, Blocklist).
@github-actions github-actions Bot added type: refactor Code restructuring, no behavior change area: auth Login, session, access keys, identity area: scanner QR/Kikcode scanning, camera area: tokens Token accounts, balances, token info area: session area: onboarding and removed type: refactor Code restructuring, no behavior change labels Jul 31, 2026
bmc08gt added 2 commits July 31, 2026 12:43
LoginViewModel, SwapViewModel and RealChatCoordinator no longer take a
FeatureFlagController after the launched-flag inlining, so their existing
tests no longer compile. Remove the stale constructor argument.
Lock in the always-on behaviour left behind by the removed flags:
- BalanceViewModelTest: PresentDepositOptions always routes through the
  add-money deposit sheet (AddMoneyUX).
- BalanceScreenContentTest: empty wallet shows the "Add Money" CTA and never
  the old "Discover Currencies" fallback; tapping it opens deposit options.
- LoginViewModelPhoneVerificationTest: phone verification is gated only by
  whether a verified phone is linked (OnboardingPhoneVerification/PhoneNumberSend).

Expose BalanceScreenContent as internal for the Robolectric UI test, matching
the existing *ScreenContentTest pattern.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: auth Login, session, access keys, identity area: onboarding area: scanner QR/Kikcode scanning, camera area: session area: tokens Token accounts, balances, token info type: refactor Code restructuring, no behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant