feat(RevenueCatUI): evaluate state conditions in the override resolver#6993
Merged
Conversation
This was referenced Jun 14, 2026
Member
Author
4 builds increased size
RevenueCat 1.0 (1)
|
| Item | Install Size Change |
|---|---|
| DYLD.String Table | ⬆️ 4.3 kB |
| RevenueCatUI.VideoComponentViewModel.VideoComponentViewModel | ⬆️ 2.8 kB |
| Other | ⬆️ 4.5 kB |
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.local-source
⚖️ Compare build
📦 Install build
⏱️ Analyze build performance
Total install size change: ⬆️ 3.3 kB (0.03%)
Total download size change: ⬆️ 2.6 kB (0.06%)
Largest size changes
| Item | Install Size Change |
|---|---|
| 📝 RevenueCatUI.TimelineItemViewModel.styles(state,condition,isEligi... | ⬆️ 1.3 kB |
| 📝 RevenueCatUI.UIConfigProvider.conditionContext(selectedPackageId,... | ⬆️ 1.0 kB |
| RevenueCatUI.TabsComponentViewModel.styles(state,condition,isElig... | ⬆️ 976 B |
| 🗑 RevenueCatUI.UIConfigProvider.conditionContext(selectedPackageId,... | ⬇️ -976 B |
| RevenueCatUI.TimelineComponentView.timeline(style) | ⬇️ -540 B |
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.cocoapods
⚖️ Compare build
📦 Install build
⏱️ Analyze build performance
Total install size change: ⬆️ 3.4 kB (0.01%)
Total download size change: ⬆️ 1.5 kB (0.02%)
Largest size changes
| Item | Install Size Change |
|---|---|
| DYLD.String Table | ⬆️ 2.0 kB |
| 📝 RevenueCatUI.TimelineItemViewModel.styles(state,condition,isEligi... | ⬆️ 1.3 kB |
| 📝 RevenueCatUI.UIConfigProvider.conditionContext(selectedPackageId,... | ⬆️ 1.0 kB |
| 🗑 RevenueCatUI.UIConfigProvider.conditionContext(selectedPackageId,... | ⬇️ -972 B |
| RevenueCatUI.TabsComponentViewModel.init(component,controlStackVi... | ⬆️ 888 B |
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.spm
⚖️ Compare build
📦 Install build
⏱️ Analyze build performance
Total install size change: ⬆️ 3.3 kB (0.03%)
Total download size change: ⬆️ 2.6 kB (0.06%)
Largest size changes
| Item | Install Size Change |
|---|---|
| 📝 RevenueCatUI.TimelineItemViewModel.styles(state,condition,isEligi... | ⬆️ 1.2 kB |
| 📝 RevenueCatUI.UIConfigProvider.conditionContext(selectedPackageId,... | ⬆️ 1.0 kB |
| RevenueCatUI.TabsComponentViewModel.styles(state,condition,isElig... | ⬆️ 976 B |
| 🗑 RevenueCatUI.UIConfigProvider.conditionContext(selectedPackageId,... | ⬇️ -976 B |
| RevenueCatUI.TimelineComponentView.timeline(style) | ⬇️ -528 B |
🛸 Powered by Emerge Tools
e8d359b to
60003b4
Compare
8d8b1b6 to
7cfbf22
Compare
60003b4 to
3eca89c
Compare
7cfbf22 to
4452645
Compare
3eca89c to
de50a06
Compare
d8a13a3 to
d280eac
Compare
de50a06 to
abca6ab
Compare
d280eac to
ed2da74
Compare
abca6ab to
9892eda
Compare
ed2da74 to
a6e7599
Compare
40ad940 to
5159bec
Compare
a6e7599 to
f7ed9f0
Compare
f7ed9f0 to
3f9c3cd
Compare
339f89a to
dfac53c
Compare
7d79357 to
81d8a41
Compare
dfac53c to
2584300
Compare
81d8a41 to
d3dc3f7
Compare
2584300 to
f6da228
Compare
d3dc3f7 to
1def974
Compare
f6da228 to
c8a29f2
Compare
1def974 to
a3289b7
Compare
c8a29f2 to
6922dfc
Compare
6922dfc to
99a44a5
Compare
alexrepty
approved these changes
Jun 17, 2026
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.





Checklist
purchases-androidand hybridsMotivation
Final PR in the Phase 0 stack (PWENG-56). Wires
statecondition evaluation into the override resolver so state-driven overrides can be resolved.Spec: https://github.com/RevenueCat/sdk-specs/tree/main/openspec/changes/add-paywall-component-state
Description
Replaces the PR3 stub with real
stateevaluation: type-aware comparison, missing key -> declared default, undeclared key -> false regardless of operator (per spec, deliberately unlikevariable_condition). ExtendsConditionContextwith the store snapshot + defaults.Note: the per-component resolver call sites aren't yet passing the store snapshot into
conditionContext(...), so state conditions don't affect rendering at runtime yet, that threading is the open half of task 3.6. Flagging for review on whether it belongs here or a follow-up.Stack: 5/5 → base
pw-state/4-store.Note
Medium Risk
Changes paywall override/visibility resolution semantics for a new condition type; behavior is well-tested but incorrect wiring later could silently leave state-driven overrides inert until snapshots are passed.
Overview
Implements real
stateextended-condition evaluation for Paywalls V2 component overrides, replacing the previous stub that always failed.ConditionContextnow carries a presentation-session snapshot (stateValues) plus declaredstateDefaults.UIConfigProvider.conditionContextforwards those fields (defaulting to empty) so callers can supply store data when available.Override resolution compares expected
ConditionValues with type-strict rules (string/bool/int/double, numeric cross-type with epsilon). Missing store values use declared defaults; keys absent from both store and defaults never match (includingnotEquals), unlike missing custom variables.Extensive
PresentedPartialsTestscover equality, defaults, undeclared keys, AND with other conditions, and visibility override precedence.Note: Component resolver call sites still invoke
conditionContextwithout the store snapshot, sostateconditions do not affect live rendering until that wiring lands (called out in PR description).Reviewed by Cursor Bugbot for commit 5de26ff. Bugbot is set up for automated code reviews on this repo. Configure here.