feat(paywalls): web_view schema component, not yet registered (4/7)#7230
Merged
Conversation
Add PaywallComponent.WebViewComponent as dead code without registering ComponentType.webView or PaywallComponent.webView, so paywall JSON is unchanged until the activation PR. Co-authored-by: Jacob Rakidzich <Jacob@JacobZivanDesign.com>
This was referenced Jul 16, 2026
JZDesign
marked this pull request as ready for review
July 16, 2026 12:47
…to webview/4-schema Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # RevenueCat.xcodeproj/project.pbxproj
…eak, add coverage Add the missing PBXBuildFile/Sources entries so WebViewComponentTests compiles and runs in the UnitTests target (previously only a dangling file reference). Fix `.fit` -> `.fit(nil)` in the component and test to match the SizeConstraint.fit(UInt?) API, which was a pre-existing build break. Add tests for the PaywallComponent fallback guarantee, encode round-trip wire keys, the type guard, and missing url. Co-authored-by: Cursor <cursoragent@cursor.com>
Rely on synthesized Codable for encoding (identical output for the class) and remove the decoded-type guard to match the other components, which don't validate type. Keep the custom init(from:) only for the protocolVersion/size decode defaults, plus the mandatory hash/== a class needs. Remove the now-obsolete wrong-type test. Co-authored-by: Cursor <cursoragent@cursor.com>
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 792a1e9. Configure here.
Adds capabilities-ignored and templated-URL decode tests to match the Android web_view schema PR coverage. Co-authored-by: Cursor <cursoragent@cursor.com>
Both fields are mandatory in the Khepri schema (id: str, protocol_version: Literal[1]) and always present in server payloads, so decode them strictly instead of defaulting. Updates tests accordingly. Co-authored-by: Cursor <cursoragent@cursor.com>
…to webview/4-schema Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # RevenueCat.xcodeproj/project.pbxproj
Drop the activation-PR reference on `type` (keeping only why it's a String) and remove the redundant protocolVersion doc. Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the hand-rolled init(from:) and redundant CodingKeys so decoding matches VideoComponent. This makes size a required decode field, aligning with the Khepri schema alongside the already-required id and protocol_version. Co-authored-by: Cursor <cursoragent@cursor.com>
ajpallares
reviewed
Jul 21, 2026
| /// The static HTTPS URL of the web bundle entry point. | ||
| public let url: String | ||
|
|
||
| public let size: Size |
Member
There was a problem hiding this comment.
Since size is a required field always sent by the backend (see https://github.com/RevenueCat/khepri/blob/main/khepri/services/paywalls/domain/template_schemas/v2/components/web_view.py#L33), I've removed in 5a57be9 the custom init(from decoder) that was only used to assign a default value to the size property
Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # RevenueCat.xcodeproj/project.pbxproj
Co-authored-by: Cursor <cursoragent@cursor.com>
Member
|
@RCGitBot please test |
AlvaroBrey
approved these changes
Jul 21, 2026
This was referenced Jul 22, 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
Part 4 of 7 splitting #7183; inert until Part 7. Lands the schema type so later PRs can build view models against a real decoded shape without activating
web_viewin the paywall component enum.Description
Adds
PaywallComponent.WebViewComponentwithout touchingPaywallComponentBase(ComponentType.webView/case webViewstay for Part 7). Direct decode ofWebViewComponent.selfworks;PaywallComponent.selfstill treatsweb_viewas an unknown type (fallback path unchanged frommain).Adaptation vs #7183:
typeis stored as the wireString"web_view"until Part 7 registersComponentType.webView(required so recognizing the raw value early would skip the unknown-type fallback and change runtime). Trimmed tests cover defaults / unknown keys only; fullPaywallComponentdecode and view-model tests move to Parts 6–7.PR Plan
PWENG-99