Fade the multipage paywall header during page transitions#3525
Merged
Conversation
…sitions Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace selectWorkflowHeaderStepId with selectWorkflowHeaderPresentation, which returns a WorkflowHeaderPresentation(headerStepId, role) so callers can drive fade animations for present<->absent header transitions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…enerate test Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3525 +/- ##
=======================================
Coverage 79.96% 79.96%
=======================================
Files 370 370
Lines 15014 15014
Branches 2071 2071
=======================================
Hits 12006 12006
Misses 2167 2167
Partials 841 841 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
396c88f to
67fa041
Compare
Move the null checks into the when guard so the branch body smart-casts fromInfo/toInfo, dropping the non-null asserts workaround and its explanatory comment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
facumenzella
reviewed
Jun 3, 2026
facumenzella
reviewed
Jun 3, 2026
facumenzella
approved these changes
Jun 3, 2026
facumenzella
left a comment
Member
There was a problem hiding this comment.
Haven't manually tested it but looks legit. A video in the PR description would be amazing 👍
…dant null/header checks Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…hero top inset When the outgoing step had a header and the incoming step is a hero (no header), HeaderOverlayLayout was writing the LEAVING header's height into currentState.headerHeightPx. The incoming hero step's ZLayer then used that non-zero value as its top inset instead of the status-bar fallback, pushing its content down by the wrong amount. Fix: when role is LEAVING, pass headerContent=null to PaywallComponentsScaffold so HeaderOverlayLayout leaves headerHeightPx=0, and render the fading header as a Box overlay inside the mainContent lambda instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This reverts commit 0c4be70.
…ode in the common case Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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 b5fb3c4. Configure here.
…entState When headerStepId differs from currentStepId (LEAVING fade, some STABLE cases), header actions such as opening a package sheet were dispatching against the wrong step's selection and sheet state. headerOnClick now uses headerState to match the step whose header is actually rendered. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

Multipage paywall headers used to pop. When one page has a header and the next doesn't, the header vanished the instant the slide finished (or snapped in at the start). Now the header rides the slide.
The header fades with the page transition:
It rides the same
animatable.valueprogress as the slide, read insidegraphicsLayer { alpha }, so it stays in lock-step and adds no recompositions per frame. The old!toHasHeroImagespecial-case is dropped: the header now fades even when the incoming page has a hero image, instead of dropping abruptly.Screen_recording_20260604_075517.mp4
Note
Low Risk
Paywall UI and transition animation only; layout workaround for leaving headers is localized but worth a quick visual pass on header↔no-header and header↔hero flows.
Overview
Multipage workflow paywalls now fade the header in sync with the slide when a step gains or loses a header, instead of popping at the end of the transition.
Header selection returns a
WorkflowHeaderPresentation(step id + ENTERING / LEAVING / STABLE). Present→absent uses the outgoing header with LEAVING; absent→present uses the incoming with ENTERING; when both steps have headers, behavior stays STABLE with the existing outgoing/incoming pick rules. The old case that dropped the header immediately when navigating to a hero page without a header is replaced by a LEAVING fade.Alpha follows the same transition progress as the slide via
graphicsLayer(no per-frame recomposition). LEAVING headers are drawn as a Box overlay in main content—not in the scaffold header slot—soheaderHeightPxon the incoming step is not set from the fading header (hero top inset stays correct).Tests cover presentation selection (including the hero behavior change) and
headerAlphamapping.Reviewed by Cursor Bugbot for commit f632931. Bugbot is set up for automated code reviews on this repo. Configure here.