Skip to content

Wire validation warning through paywall state pipeline#3134

Open
JZDesign wants to merge 1 commit intojzdesign/fallback-paywall-3-default-paywall-uifrom
jzdesign/fallback-paywall-4-wire-validation
Open

Wire validation warning through paywall state pipeline#3134
JZDesign wants to merge 1 commit intojzdesign/fallback-paywall-3-default-paywall-uifrom
jzdesign/fallback-paywall-4-wire-validation

Conversation

@JZDesign
Copy link
Contributor

@JZDesign JZDesign commented Feb 23, 2026

Summary

  • Adds validationWarning: PaywallWarning? field to PaywallState.Loaded.Legacy
  • Threads validationWarning through OfferingToStateMapper.toLegacyPaywallState
  • Passes validationResult.warning from PaywallViewModel.calculateState to the state mapper

When a paywall fails validation, the warning is now carried on the loaded state, ready for the UI layer (PR 5) to check and render the DefaultPaywallView instead of the template paywall.

Part 4 of the fallback paywall feature breaking up #2945. Stacked on #3133.

Test plan

  • Verify PaywallState.Loaded.Legacy.validationWarning is null for valid paywalls
  • Verify validationWarning is populated when paywall validation fails
  • Verify existing paywall rendering is unaffected (validationWarning defaults to null)

Generated with Claude Code


Note

Low Risk
Low risk: this only adds an optional warning field to the legacy loaded state and wires it through state mapping; behavior is unchanged unless consumers start acting on the new field.

Overview
Threads paywall validation warnings through the legacy paywall state pipeline so the UI can react when a paywall falls back to a default configuration.

Adds an optional validationWarning: PaywallWarning? to PaywallState.Loaded.Legacy, passes PaywallValidationResult.Legacy.warning from PaywallViewModel.calculateState() into Offering.toLegacyPaywallState(), and stores it on the resulting legacy loaded state (defaulting to null to preserve existing behavior).

Written by Cursor Bugbot for commit b1259f9. This will update automatically on new commits. Configure here.

Adds validationWarning field to PaywallState.Loaded.Legacy and threads
it through OfferingToStateMapper.toLegacyPaywallState and
PaywallViewModel.calculateState. When a paywall fails validation, the
warning is now available on the loaded state for the UI to render the
fallback paywall.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@JZDesign JZDesign requested a review from a team as a code owner February 23, 2026 20:59
@RevenueCat-Danger-Bot
Copy link

1 Error
🚫 Label the PR using one of the change type labels. If you are not sure which label to use, choose pr:other.
Label Description
pr:feat A new feature. Use along with pr:breaking to force a major release.
pr:fix A bug fix. Use along with pr:force_minor to force a minor release.
pr:other Other changes. Catch-all for anything that doesn't fit the above categories. Releases that only contain this label will not be released. Use along with pr:force_patch, or pr:force_minor to force a patch or minor release.
pr:RevenueCatUI Use along any other tag to mark a PR that only contains RevenueCatUI changes
pr:next_release Preparing a new release
pr:dependencies Updating a dependency
pr:phc_dependencies Updating purchases-hybrid-common dependency
pr:changelog_ignore The PR will not be included in the changelog. This label doesn't determine the type of bump of the version and must be combined with pr:feat, pr:fix or pr:other.

Generated by 🚫 Danger

@emerge-tools
Copy link

emerge-tools bot commented Feb 23, 2026

2 builds increased size

Name Version Download Change Install Change Approval
TestPurchasesUIAndroidCompatibility
com.revenuecat.testpurchasesuiandroidcompatibility
1.0 (1) 70.7 MB ⬆️ 112.7 kB (0.16%) 113.7 MB ⬆️ 162.6 kB (0.14%) N/A
SDKSizeTesting
com.revenuecat.testapps.sdksizetesting
1.0 (1) 11.9 MB ⬆️ 86.5 kB (0.73%) 34.3 MB ⬆️ 122.1 kB (0.36%) ⏳ Needs approval

TestPurchasesUIAndroidCompatibility 1.0 (1)
com.revenuecat.testpurchasesuiandroidcompatibility

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 162.6 kB (0.14%)
Total download size change: ⬆️ 112.7 kB (0.16%)

Largest size changes

Item Install Size Change Download Size Change
📝 visual_ob_create_paywall.png ⬆️ 77.6 kB ⬆️ 77.2 kB
📝 com.revenuecat.purchases.ui.revenuecatui.defaultpaywall.DefaultPa... ⬆️ 13.9 kB ⬆️ 4.8 kB
📝 com.revenuecat.purchases.ui.revenuecatui.defaultpaywall.DefaultPa... ⬆️ 3.6 kB ⬆️ 1.2 kB
📝 com.revenuecat.purchases.ui.revenuecatui.defaultpaywall.DefaultPr... ⬆️ 2.9 kB ⬆️ 999 B
📝 com.revenuecat.purchases.ui.revenuecatui.helpers.AppStyleExtracto... ⬆️ 2.7 kB ⬆️ 812 B
View Treemap

Image of diff

SDKSizeTesting 1.0 (1)
com.revenuecat.testapps.sdksizetesting

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 122.1 kB (0.36%)
Total download size change: ⬆️ 86.5 kB (0.73%)

Largest size changes

Item Install Size Change Download Size Change
📝 visual_ob_create_paywall.png ⬆️ 66.3 kB ⬆️ 66.3 kB
📝 com.revenuecat.purchases.ui.revenuecatui.defaultpaywall.DefaultPa... ⬆️ 7.6 kB ⬆️ 2.5 kB
📝 com.revenuecat.purchases.ui.revenuecatui.defaultpaywall.DefaultPa... ⬆️ 2.2 kB ⬆️ 708 B
📝 com.revenuecat.purchases.ui.revenuecatui.defaultpaywall.DefaultPr... ⬆️ 2.0 kB ⬆️ 657 B
📝 com.revenuecat.purchases.ui.revenuecatui.helpers.AppStyleExtracto... ⬆️ 1.7 kB ⬆️ 553 B
View Treemap

Image of diff


🛸 Powered by Emerge Tools

Comment trigger: Size diff threshold of 100.00kB exceeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants