Add WorkflowNavigator for multipage workflow step navigation#6680
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
|
Looks like the xcodeproj is out of sync |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
Author
|
ready @vegaro |
vegaro
approved these changes
Apr 23, 2026
This was referenced Apr 23, 2026
Merged
This was referenced Apr 30, 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.
Summary
WorkflowNavigator— anObservableObjectthat owns navigation state for aPublishedWorkflowWorkflowTriggerandWorkflowTriggerAction@_spi(Internal) publicsoRevenueCatUIcan access themstepTriggers/stepTriggerActionspublic computed properties onWorkflowStep(proxy for the@DefaultDecodable-wrapped stored properties, which can't be made directlypublic)WorkflowNavigatorAPI:currentStepId: String—@Published, starts atworkflow.initialStepIdcurrentStep: WorkflowStep?— resolved fromcurrentStepIdcanNavigateBack: BooltriggerAction(componentId:) -> WorkflowStep?— finds the trigger matchingcomponentId, validatestriggerActions[actionId].type == "step"and target step exists, pushes to back stack, advancescurrentStepIdnavigateBack() -> WorkflowStep?— pops back stackPure logic, no UI. This is the iOS equivalent of purchases-android#3379.
Stacks on: #(PR 1 —
PaywallButtonComponent.id)Next: PR 3 (button trigger action +
isWorkflowActive)Test plan
swift buildpasses (verified locally)swift test --filter WorkflowNavigatorTests— 12/12 pass (verified locally)🤖 Generated with Claude Code
Note
Medium Risk
Introduces new navigation state/logic for Paywalls V2 workflows and changes access levels of workflow response models via
@_spi(Internal), which could affect internal API usage and step-trigger behavior if misused.Overview
Adds
WorkflowNavigator, anObservableObjectthat tracks a workflow’s current step, supports forward navigation via component trigger actions, and maintains a back stack fornavigateBack().Updates workflow response models so
RevenueCatUIcan read trigger and action data:WorkflowTrigger/WorkflowTriggerActionbecome@_spi(Internal) public, andWorkflowStepexposesstepTriggers/stepTriggerActionscomputed accessors. Includes a newWorkflowNavigatorTestssuite covering forward/back navigation and common failure cases.Reviewed by Cursor Bugbot for commit 62b3072. Bugbot is set up for automated code reviews on this repo. Configure here.