fix workflow header transitions#6880
Conversation
4 builds increased size
RevenueCat 1.0 (1)
|
| Item | Install Size Change |
|---|---|
| DYLD.String Table | ⬆️ 107.4 kB |
| Code Signature | ⬆️ 7.5 kB |
| 📝 RevenueCatUI.WorkflowHeaderOverlayStateManager.WorkflowHeaderOver... | ⬆️ 3.0 kB |
| DYLD.Exports | ⬆️ 1.3 kB |
| 📝 RevenueCatUI.WorkflowHeaderOverlayPageView.WorkflowHeaderOverlayP... | ⬆️ 556 B |
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.local-source
⚖️ Compare build
📦 Install build
⏱️ Analyze build performance
Total install size change: ⬆️ 67.2 kB (0.54%)
Total download size change: ⬆️ 21.6 kB (0.52%)
Largest size changes
| Item | Install Size Change |
|---|---|
| DYLD.String Table | ⬆️ 15.8 kB |
| 📝 RevenueCatUI.WorkflowHeaderOverlayPageView.value witness | ⬆️ 14.8 kB |
| 📝 RevenueCatUI.WorkflowPaywallView.workflowHeaderOverlay(proxy) | ⬆️ 3.3 kB |
| 📝 RevenueCatUI.WorkflowHeaderOverlayPageView.headerView(paywallStat... | ⬆️ 3.2 kB |
| SwiftUI.View.View | ⬆️ 2.5 kB |
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.cocoapods
⚖️ Compare build
📦 Install build
⏱️ Analyze build performance
Total install size change: ⬆️ 138.0 kB (0.5%)
Total download size change: ⬆️ 26.1 kB (0.41%)
Largest size changes
| Item | Install Size Change |
|---|---|
| DYLD.String Table | ⬆️ 75.6 kB |
| 📝 RevenueCatUI.WorkflowHeaderOverlayPageView.value witness | ⬆️ 14.8 kB |
| Code Signature | ⬆️ 3.4 kB |
| 📝 RevenueCatUI.WorkflowPaywallView.workflowHeaderOverlay(proxy) | ⬆️ 3.3 kB |
| 📝 RevenueCatUI.WorkflowHeaderOverlayPageView.headerView(paywallStat... | ⬆️ 3.2 kB |
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.spm
⚖️ Compare build
📦 Install build
⏱️ Analyze build performance
Total install size change: ⬆️ 46.3 kB (0.42%)
Total download size change: ⬆️ 19.8 kB (0.46%)
Largest size changes
| Item | Install Size Change |
|---|---|
| 📝 RevenueCatUI.WorkflowHeaderOverlayPageView.value witness | ⬆️ 14.8 kB |
| 📝 RevenueCatUI.WorkflowPaywallView.workflowHeaderOverlay(proxy) | ⬆️ 3.3 kB |
| 📝 RevenueCatUI.WorkflowHeaderOverlayPageView.headerView(paywallStat... | ⬆️ 3.2 kB |
| SwiftUI.View.View | ⬆️ 2.5 kB |
| 📝 RevenueCatUI.WorkflowPaywallView.renderedPage(from,stepId,showClo... | ⬆️ 2.4 kB |
🛸 Powered by Emerge Tools
Comment trigger: Size diff threshold of 100.00kB exceeded
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 51e7d7f. Configure here.
MonikaMateska
left a comment
There was a problem hiding this comment.
Nice work!
Two non-blocking nits, take or leave:
- .edgesIgnoringSafeArea(.top) -> .ignoresSafeArea(edges: .top) for consistency with the slide-transition work.
- The overlay rebuilds a full PaywallState just to draw the header, bounded to the transition so probably fine, but maybe adding one-line comment would help future readers
| .frame(width: proxy.size.width, height: proxy.size.height, alignment: .top) | ||
| .transitionClipMask(proxy: proxy) | ||
| .environment(\.safeAreaInsets, proxy.safeAreaInsets) | ||
| .edgesIgnoringSafeArea(.top) |
There was a problem hiding this comment.
Tiny thing, could we switch this to .ignoresSafeArea(edges: .top)? edgesIgnoringSafeArea is the older soft-deprecated spelling, and since the slide-transition work this builds on already moved everything over to ignoresSafeArea(...) (like the ignoresSafeAreaIfNeeded helper in BackgroundStyle.swift), it'd be nice to stay consistent. Totally behavior-neutral though, so no worries if you'd rather not touch it
84aac74 to
336bb6a
Compare
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…wner WorkflowPaywallView only forwards the promo offer cache to its children, so observing it as a @StateObject re-rendered the whole page ForEach and header overlay on every cache update. Hold it through the existing PromoOfferCacheOwner wrapper instead, keeping the shared create-once instance without subscribing to its @published changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>





Stacked on #6877.
Linear: https://linear.app/revenuecat/issue/WEB-4339/page-transition-glitches-on-second-screen
What Changed
Media
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-06-02.at.09.52.19.mov
Note
Medium Risk
Changes are confined to Paywalls V2 workflow UI and SwiftUI transition state, but they touch navigation, header layering, and eligibility/cache lifetime across steps—regressions would show as visual glitches or wrong intro/promo state, not purchase logic.
Overview
Fixes workflow paywall page-transition glitches by moving header rendering out of the sliding page snapshots and into a workflow-level overlay for the duration of each transition.
WorkflowRenderingContextreplaces separate environment keys (workflowPageTransitionContext,isWorkflowHeader) and addspageHeaderSuppressed: in-page headers stay in the layout but are hidden (opacity0) while the overlay is active, so body content does not jump.WorkflowHeaderTransitionclassifies incoming/outgoing headers (none, entering, leaving, stable, replacing) and drives header button opacity so shared headers stay pinned without crossfade, while true header swaps still crossfade.During transitions,
WorkflowHeaderOverlayPageViewrebuilds header UI above the clipped pages (non-interactive overlay);PromoOfferCacheOwneris shared via@StateObjectso promo-cache@Publishedupdates do not re-render the whole page stack. Each workflow step gets a page-scopedIntroOfferEligibilityContextpassed intoPaywallsV2View. Unit tests cover the new header transition modes and rendering context defaults.Reviewed by Cursor Bugbot for commit 153509a. Bugbot is set up for automated code reviews on this repo. Configure here.