Use a fresh Firebase Remote Config key for the account-creation flag - #5029
Conversation
remoteKey previously fell through to the derived "encourage_account_creation", which is still a live Remote Config parameter from the 2025 one-shot experiment. Its stale value would override the flag's default, so the recurring modal could ship silently disabled or partially rolled out. Point the flag at "encourage_account_creation_recurring" for a clean slate. The identically-named analytics source and onboarding flow identifiers are intentionally unchanged — renaming those would break analytics continuity and cross-platform parity. Matches the same rename on Android (pocket-casts-android#5763). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Claude finished @yaelirub's task in 1m 59s —— View job ReviewThe mapping does what the description claims: Non-blocking
|
There was a problem hiding this comment.
Pull request overview
Updates the iOS feature-flag plumbing so the Encourage Account Creation recurring-modal gate reads from a new Firebase Remote Config parameter, avoiding unintended inheritance from the stale 2025 one-shot experiment key.
Changes:
- Adds an explicit
remoteKeymapping forFeatureFlag.encourageAccountCreation. - Points that mapping to the new Remote Config parameter name:
encourage_account_creation_recurring. - Leaves analytics/flow identifier strings untouched (as intended) to preserve continuity.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| case .encourageAccountCreation: | ||
| // Not the derived "encourage_account_creation" — that Firebase parameter still exists | ||
| // from the 2025 one-shot experiment, and its stale value would override the default. | ||
| "encourage_account_creation_recurring" |
There was a problem hiding this comment.
(non-blocking) The key rename fixes future reads, but it can't undo an override already persisted on device: AppDelegate.updateRemoteFeatureFlags (podcasts/AppDelegate.swift:306-317) writes ff-override-encourageAccountCreation into UserDefaults whenever the remote value's source is .remote, and that store is keyed by the flag's description (the raw value), not by the remote key. So any tester who ran a build containing #4985 while encourage_account_creation was serving false still has a stored false, and because the new encourage_account_creation_recurring parameter doesn't exist yet its configValue source is .default — the override block is skipped and nothing clears it. Those users keep the modal disabled.
Easiest mitigation: when creating encourage_account_creation_recurring in Firebase, publish it with an explicit true rather than leaving it absent — override(_:withValue:) deletes the stored key when the incoming value matches the flag default, so one remote fetch cleans the stale entry.
|
Claude finished @yaelirub's task in 17s —— View job ReviewSince my last review the only change is Non-blocking
--- · branch |
Follow-up to #4985.
The
encourageAccountCreationflag'sremoteKeyfell through to the derived"encourage_account_creation". That Firebase Remote Config parameter still exists from the 2025 one-shot Encourage Account Creation experiment — removing code never removed the parameter — so the recurring modal inherits whatever value that entry currently holds.Because a remote value overrides the flag's local default, the recurring modal could ship silently disabled (if the old experiment was wound down to
false) or at an unintended partial rollout percentage, while the code still reads as "default on".This points the flag at a fresh parameter,
encourage_account_creation_recurring, so it starts from a clean slate with no inherited value or rollout condition.Caught by @geekygecko on the Android port (pocket-casts-android#5763); the same rename has landed there, so both platforms move off the stale parameter together.
Deliberately not renamed: the identically-named
AnalyticsSource.encourageAccountCreation(Constants.swift) andOnboardingFlow.Flow.encourageAccountCreation(OnboardingFlow.swift) string values. Those are analytics/flow identifiers, not Remote Config keys — renaming them would break analytics continuity and cross-platform parity.To test
This is a Remote Config plumbing change; the observable behaviour is which parameter the flag reads.
encourage_account_creation_recurringparameter needs creating in Firebase Remote Config — the oldencourage_account_creationentry is now unused by this flag.make build_stagingsucceeds locally.Checklist
CHANGELOG.mdif necessary.🤖 Generated with Claude Code