feat(paywalls): add decode-only stateUpdates on interactive components#6990
Conversation
4 builds increased size
RevenueCat 1.0 (1)
|
| Item | Install Size Change |
|---|---|
| DYLD.String Table | ⬆️ 20.3 kB |
| Code Signature | ⬆️ 1.8 kB |
| DYLD.Exports | ⬆️ 1.1 kB |
| RevenueCat.PaywallComponent.TabsComponent.TabsComponent | ⬆️ 588 B |
| Other | ⬆️ 34.3 kB |
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.local-source
⚖️ Compare build
📦 Install build
⏱️ Analyze build performance
Total install size change: ⬆️ 17.0 kB (0.13%)
Total download size change: ⬆️ 5.7 kB (0.13%)
Largest size changes
| Item | Install Size Change |
|---|---|
| DYLD.String Table | ⬆️ 1.5 kB |
| DYLD.Exports | ⬆️ 1.1 kB |
| 📝 RevenueCat.PaywallComponent.StateUpdate.value witness | ⬆️ 984 B |
| 📝 RevenueCat.PaywallComponent.TabsComponent.init(name,visible,size,... | ⬆️ 840 B |
| 🗑 RevenueCat.PaywallComponent.TabsComponent.init(name,visible,size,... | ⬇️ -804 B |
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.cocoapods
⚖️ Compare build
📦 Install build
⏱️ Analyze build performance
Total install size change: ⬆️ 41.7 kB (0.15%)
Total download size change: ⬆️ 11.0 kB (0.17%)
Largest size changes
| Item | Install Size Change |
|---|---|
| DYLD.String Table | ⬆️ 16.2 kB |
| RevenueCat.PaywallData.Configuration.hash(into) | ⬆️ 2.1 kB |
| DYLD.Exports | ⬆️ 1.2 kB |
| 📝 RevenueCat.PaywallComponent.StateUpdate.value witness | ⬆️ 984 B |
| 📝 RevenueCat.PaywallComponent.TabsComponent.init(name,visible,size,... | ⬆️ 840 B |
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.spm
⚖️ Compare build
📦 Install build
⏱️ Analyze build performance
Total install size change: ⬆️ 12.9 kB (0.11%)
Total download size change: ⬆️ 7.8 kB (0.18%)
Largest size changes
| Item | Install Size Change |
|---|---|
| DYLD.Exports | ⬆️ 1.1 kB |
| 📝 RevenueCat.PaywallComponent.StateUpdate.value witness | ⬆️ 984 B |
| 📝 RevenueCat.PaywallComponent.TabsComponent.init(name,visible,size,... | ⬆️ 840 B |
| 🗑 RevenueCat.PaywallComponent.TabsComponent.init(name,visible,size,... | ⬇️ -804 B |
| 📝 RevenueCat.PaywallComponent.CarouselComponent.init(name,visible,s... | ⬆️ 752 B |
🛸 Powered by Emerge Tools
8f8b112 to
9fbd9f3
Compare
c180d51 to
440b6ed
Compare
0fe842c to
fd6e0ad
Compare
bf4c17e to
1d301b4
Compare
b5a745b to
ca873a9
Compare
1d301b4 to
907d3da
Compare
alexrepty
left a comment
There was a problem hiding this comment.
We don't have any tests in this one, is that by design?
5c8032b to
6977334
Compare
907d3da to
9e1cd95
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9e1cd95. Configure here.
9e1cd95 to
33cab48
Compare
33cab48 to
39543e1
Compare
That's a good call, I've just added couple of tests to cover the decoding cases |






Checklist
purchases-androidand hybridsMotivation
Phase 0 stack (PWENG-56). Adds the
stateUpdateswire format on interactive components so the SDK can carry the mutations a component will apply when its interaction fires. Decode-only this phase, nothing writes to the store yet.Spec: https://github.com/RevenueCat/sdk-specs/tree/main/openspec/changes/add-paywall-component-state
Description
Adds
StateUpdate/StateUpdateValue(thesetop and the$valuepayload token) and an optionalstateUpdatesfield on Button, Carousel, and Tabs.Unknown update shapes decode as
.unsupportedfor forward-compat.@_spi(Internal).Stack: 2/5 → base
pw-state/1-declaration.Note
Low Risk
Internal SPI models and JSON decoding only; no paywall runtime or purchase behavior changes in this phase.
Overview
Introduces
StateUpdate/StateUpdateValueso paywall JSON can describe declarative store mutations ({ "set": "<key>", "to": … }), including the"$value"payload token for interaction-driven values. Unknown operation shapes decode as.unsupportedinstead of failing the paywall.Adds optional
stateUpdateson Button, Carousel, and Tabs (wired through init, equality, and Button’s explicit Codable). Phase 0 is decode-only—nothing applies these updates at runtime yet. Types are@_spi(Internal).Unit tests cover literals,
$value, forward-compat, malformed array entries, and encode round-trips.Reviewed by Cursor Bugbot for commit 39543e1. Bugbot is set up for automated code reviews on this repo. Configure here.