Skip to content

fix workflow header transitions#6880

Merged
facumenzella merged 6 commits into
mainfrom
codex/workflow-header-overlay
Jun 2, 2026
Merged

fix workflow header transitions#6880
facumenzella merged 6 commits into
mainfrom
codex/workflow-header-overlay

Conversation

@facumenzella

@facumenzella facumenzella commented Jun 2, 2026

Copy link
Copy Markdown
Member

Stacked on #6877.

Linear: https://linear.app/revenuecat/issue/WEB-4339/page-transition-glitches-on-second-screen

What Changed

  • Moves workflow headers into a workflow-level overlay during page transitions.
  • Suppresses page-owned headers while the overlay owns the transition, preserving layout so body content does not jump.
  • Keeps shared headers pinned, fades headers only when entering/leaving, and retains crossfade behavior for true replacement.

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.

WorkflowRenderingContext replaces separate environment keys (workflowPageTransitionContext, isWorkflowHeader) and adds pageHeaderSuppressed: in-page headers stay in the layout but are hidden (opacity 0) while the overlay is active, so body content does not jump. WorkflowHeaderTransition classifies 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, WorkflowHeaderOverlayPageView rebuilds header UI above the clipped pages (non-interactive overlay); PromoOfferCacheOwner is shared via @StateObject so promo-cache @Published updates do not re-render the whole page stack. Each workflow step gets a page-scoped IntroOfferEligibilityContext passed into PaywallsV2View. 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.

@facumenzella facumenzella changed the title [codex] fix workflow header transitions fix workflow header transitions Jun 2, 2026
@emerge-tools

emerge-tools Bot commented Jun 2, 2026

Copy link
Copy Markdown

4 builds increased size

Name Version Download Change Install Change Approval
RevenueCat
com.revenuecat.PaywallsTester
1.0 (1) 18.4 MB ⬆️ 63.1 kB (0.34%) 66.3 MB ⬆️ 286.5 kB (0.44%) N/A
BinarySizeTest
com.revenuecat.binary-size-test.local-source
1.0 (1) 4.2 MB ⬆️ 21.6 kB (0.52%) 12.7 MB ⬆️ 67.2 kB (0.54%) ⏳ Needs approval
BinarySizeTest
com.revenuecat.binary-size-test.cocoapods
1.0 (1) 6.4 MB ⬆️ 26.1 kB (0.41%) 28.0 MB ⬆️ 138.0 kB (0.5%) ⏳ Needs approval
BinarySizeTest
com.revenuecat.binary-size-test.spm
1.0 (1) 4.3 MB ⬆️ 19.8 kB (0.46%) 11.0 MB ⬆️ 46.3 kB (0.42%) ⏳ Needs approval

RevenueCat 1.0 (1)
com.revenuecat.PaywallsTester

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 286.5 kB (0.44%)
Total download size change: ⬆️ 63.1 kB (0.34%)

Largest size changes

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
View Treemap

Image of diff

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
View Treemap

Image of diff

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
View Treemap

Image of diff

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
View Treemap

Image of diff


🛸 Powered by Emerge Tools

Comment trigger: Size diff threshold of 100.00kB exceeded

@facumenzella facumenzella marked this pull request as ready for review June 2, 2026 08:00
@facumenzella facumenzella requested review from a team as code owners June 2, 2026 08:00
@facumenzella facumenzella marked this pull request as draft June 2, 2026 08:06

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread RevenueCatUI/Templates/V2/WorkflowPaywallView.swift Outdated
@facumenzella facumenzella marked this pull request as ready for review June 2, 2026 08:39

@MonikaMateska MonikaMateska 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 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)

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.

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

Base automatically changed from codex/codex-20260601-180245 to main June 2, 2026 12:42
@facumenzella facumenzella force-pushed the codex/workflow-header-overlay branch from 84aac74 to 336bb6a Compare June 2, 2026 12:46
facumenzella and others added 2 commits June 2, 2026 14:47
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>
@facumenzella facumenzella enabled auto-merge (squash) June 2, 2026 13:05
@facumenzella facumenzella merged commit d30edd3 into main Jun 2, 2026
17 of 20 checks passed
@facumenzella facumenzella deleted the codex/workflow-header-overlay branch June 2, 2026 13:14
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