Wire validation warning through paywall state pipeline#3134
Open
JZDesign wants to merge 1 commit intojzdesign/fallback-paywall-3-default-paywall-uifrom
Open
Wire validation warning through paywall state pipeline#3134JZDesign wants to merge 1 commit intojzdesign/fallback-paywall-3-default-paywall-uifrom
JZDesign wants to merge 1 commit intojzdesign/fallback-paywall-3-default-paywall-uifrom
Conversation
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>
Generated by 🚫 Danger |
2 builds increased size
TestPurchasesUIAndroidCompatibility 1.0 (1)
|
| 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 |
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 |
🛸 Powered by Emerge Tools
Comment trigger: Size diff threshold of 100.00kB exceeded
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
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
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?toPaywallState.Loaded.Legacy, passesPaywallValidationResult.Legacy.warningfromPaywallViewModel.calculateState()intoOffering.toLegacyPaywallState(), and stores it on the resulting legacy loaded state (defaulting tonullto preserve existing behavior).Written by Cursor Bugbot for commit b1259f9. This will update automatically on new commits. Configure here.