Skip to content

Resolve exit offer offering ID from workflow singleStepFallbackId#6755

Merged
facumenzella merged 3 commits into
mainfrom
facu/workflow-exit-offer-resolution
May 8, 2026
Merged

Resolve exit offer offering ID from workflow singleStepFallbackId#6755
facumenzella merged 3 commits into
mainfrom
facu/workflow-exit-offer-resolution

Conversation

@facumenzella

@facumenzella facumenzella commented May 8, 2026

Copy link
Copy Markdown
Member

Stacked on #6754 — review that first.

Summary

Adds WorkflowContext.exitOfferOfferingId: reads exit_offers from the screen belonging to singleStepFallbackId. Returns nil when no fallback step is set or the screen has no exit offer configured.

Graph traversal (finding the terminal step when singleStepFallbackId is absent) is intentionally out of scope for now.

Test plan

  • testExitOfferOfferingIdReturnsNilWhenNoSingleStepFallbackId
  • testExitOfferOfferingIdReturnsOfferingIdFromFallbackStepScreen
  • testExitOfferOfferingIdReturnsNilWhenFallbackStepHasNoExitOffers

All pass via swift test --filter WorkflowContextTests.

🤖 Generated with Claude Code


Note

Low Risk
Low risk: adds a read-only computed property and unit tests, without changing purchase/offer retrieval behavior or any network/auth flows.

Overview
Adds WorkflowContext.exitOfferOfferingId, which derives an exit-offer offeringId by following workflow.singleStepFallbackId to its step’s screen and reading exit_offers.dismiss.offering_id (otherwise nil).

Extends WorkflowContextTests with coverage for the new property, including cases for missing singleStepFallbackId, configured exit offers, and screens without exit offers.

Reviewed by Cursor Bugbot for commit 2e31b94. Bugbot is set up for automated code reviews on this repo. Configure here.

facumenzella and others added 2 commits May 8, 2026 14:27
Parses the exit_offers JSON field on WorkflowScreen and passes it
through WorkflowScreenMapper into PaywallComponentsData, matching
the Android implementation in purchases-android#3452.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds WorkflowContext.exitOfferOfferingId, which reads exit_offers from
the screen belonging to singleStepFallbackId. Returns nil when no
fallback is set or the screen has no exit offer configured.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Base automatically changed from facu/workflow-screen-exit-offers to main May 8, 2026 12:46
@facumenzella facumenzella marked this pull request as ready for review May 8, 2026 12:49
@facumenzella facumenzella requested review from a team as code owners May 8, 2026 12:49
@facumenzella facumenzella requested a review from vegaro May 8, 2026 13:02

@vegaro vegaro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice and small

@facumenzella facumenzella merged commit f73facb into main May 8, 2026
16 of 18 checks passed
@facumenzella facumenzella deleted the facu/workflow-exit-offer-resolution branch May 8, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants