Add close_workflow button action#3453
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3453 +/- ##
==========================================
- Coverage 79.48% 79.46% -0.02%
==========================================
Files 363 363
Lines 14562 14569 +7
Branches 1979 1983 +4
==========================================
+ Hits 11574 11577 +3
- Misses 2190 2194 +4
Partials 798 798 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
close_workflow button action
Contributor
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 283ae6d. Configure here.
JZDesign
approved these changes
May 7, 2026
…ctionTests round-trip for CloseWorkflow
facumenzella
added a commit
to RevenueCat/purchases-ios
that referenced
this pull request
May 13, 2026
* feat: add close_workflow button action Ports RevenueCat/purchases-android#3453 to iOS. Adds a new `close_workflow` button action that always dismisses the entire paywall, regardless of workflow step or whether triggered from inside a sheet. The action flows through the existing pipeline: - `PaywallComponent.ButtonComponent.Action.closeWorkflow` (serialization) - `ButtonComponentViewModel.Action.closeWorkflow` (view model) - `closeWorkflowAction` environment key (set at RootView, propagates through sheets where local onDismiss only closes the sheet) - `ButtonComponentView` reads the env key and calls it on tap Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: preserve close_workflow behavior without public API change * fix: make close_workflow dismiss the full workflow * fix: include close workflow marker in button equality * fix: apply closeWorkflowAction after bottomSheet so sheets inherit it The environment modifier must be outer to bottomSheet — views created inside BottomSheetOverlayModifier.body are siblings of content and only inherit from the modifier's outer context, not from inner modifiers on the content itself. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: add close_workflow mapping and equality regression tests - ButtonComponentCodableTests: assert that close_workflow and navigate_back buttons with identical .action values are nonetheless unequal via isCloseWorkflowAction (Equatable and Hashable both verified) - ButtonComponentViewModelMappingTests (new file): assert that a decoded close_workflow button maps to .closeWorkflow in the view model (interaction value "close_workflow"), and navigate_back maps to .navigateBack Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: add ButtonComponentViewModelMappingTests.swift to RevenueCat.xcodeproj Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: add ButtonComponentViewModelMappingTests.swift file reference to xcodeproj Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Review fixes: consistent optional chain, single-decode for close_workflow, drop fragile hash assertion Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Simplify: set closeWorkflowAction env in LoadedPaywallsV2View, drop param from ComponentsView and RootView Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
github-merge-queue Bot
pushed a commit
that referenced
this pull request
May 13, 2026
**This is an automatic release.** ## RevenueCat SDK ### 📦 Dependency Updates * [RENOVATE] Update dependency gradle to v8.14.5 (#3459) via RevenueCat Git Bot (@RCGitBot) ## RevenueCatUI SDK ### ✨ New Features * Pre-warm image cache for workflow step states (#3447) via Cesar de la Vega (@vegaro) ### Paywallv2 #### ✨ New Features * Add `close_workflow` button action (#3453) via Cesar de la Vega (@vegaro) #### 🐞 Bugfixes * Fix preload VideoComponent fallback override images (#3449) via Cesar de la Vega (@vegaro) ### 🔄 Other Changes * Select blob source by priority and weighted random (#3458) via Toni Rico (@tonidero) * [AUTOMATIC] Update golden test files for backend integration tests (#3473) via RevenueCat Git Bot (@RCGitBot) * Clean up unreferenced topic files after successful remote-config refresh (#3439) via Toni Rico (@tonidero) * Cache remote config response in memory with TTL and persist to disk (#3457) via Toni Rico (@tonidero) * build(deps): bump fastlane from 2.233.1 to 2.234.0 (#3463) via dependabot[bot] (@dependabot[bot]) * Update codelabs links (#3460) via Jaewoong Eum (@skydoves) * Add RemoteConfigManager and TopicFetcher (#3437) via Toni Rico (@tonidero) * Add exit offers support to workflows (#3452) via Cesar de la Vega (@vegaro) * Update baseline profiles (#3461) via RevenueCat Git Bot (@RCGitBot) * Add network scaffolding for remote config endpoint (#3435) via Toni Rico (@tonidero) * test: cover singleStepFallbackId == initialStepId edge case (#3445) via Facundo Menzella (@facumenzella) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: this is a release/versioning update (SNAPSHOT -> final) plus docs deployment path changes, with no functional code changes beyond version constants. > > **Overview** > Finalizes the `10.6.0` release by switching all version references from `10.6.0-SNAPSHOT` to `10.6.0` (root `.version`, `gradle.properties`, `Config.frameworkVersion`, and sample/test app `libs.versions.toml` files). > > Updates documentation publishing to point at the `10.6.0` docs path (CircleCI S3 sync target and `docs/index.html` redirect), and prepends the `10.6.0` section to `CHANGELOG.md`/`CHANGELOG.latest.md`. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 4da1697. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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
close_workflowbutton action that always dismisses the paywall regardless of workflow stepButtonComponent.Action.CloseWorkflow→ButtonComponentStyle.Action.CloseWorkflow→PaywallAction.External.CloseWorkflow→viewModel.closePaywall()CloseWorkflowpropagates to the outer paywall-level handler via the existingelse -> onClick(action)pathclose_workflowanalytics event lands later with the Analytics milestoneNote
Medium Risk
Introduces a new serialized button action that directly dismisses the paywall, which could change navigation/dismiss behavior in workflow-based paywalls if misconfigured or triggered unexpectedly.
Overview
Adds a new
close_workflowbutton action end-to-end (component model, style conversion, UI action mapping) so dashboard-configured buttons can always dismiss the paywall viaviewModel.closePaywall().Updates serialization/deserialization to recognize the new action type, wires it through
PaywallAction.External, and adds/extends unit + compose tests (including sheet propagation) plus interaction mapping coverage.Reviewed by Cursor Bugbot for commit c3a0e31. Bugbot is set up for automated code reviews on this repo. Configure here.