refactor(workflows): render workflows with ui_config from the config endpoint#3721
Open
vegaro wants to merge 1 commit into
Open
refactor(workflows): render workflows with ui_config from the config endpoint#3721vegaro wants to merge 1 commit into
vegaro wants to merge 1 commit into
Conversation
…endpoint PaywallViewModel fetches UiConfig through awaitGetUiConfig() and threads it down to WorkflowScreenMapper instead of reading workflow.uiConfig, so workflow bodies can stop shipping ui_config once serving moves to the config endpoint. PublishedWorkflow.uiConfig still exists but is unread. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
5ae97b0 to
6cae726
Compare
7e1e442 to
95158d1
Compare
This was referenced Jul 6, 2026
tonidero
approved these changes
Jul 6, 2026
| // Neither flag applies to the customEntitlementComputation flavor, which doesn't serve paywalls | ||
| // this way. | ||
| val remoteConfigManager = if ( | ||
| (BuildConfig.ENABLE_REMOTE_CONFIG || appConfig.useWorkflows) && !appConfig.customEntitlementComputation |
Contributor
There was a problem hiding this comment.
We probably should unify these flags 😅 We can remove the remote config one and leave the workflows one if you'd like
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.
Workflow rendering used to read
ui_configfrom the workflow body. This makes it use the config endpoint instead (viaawaitGetUiConfig()from #3711), so workflow bodies can stop shippingui_configin the next PR.Note
Medium Risk
Changes how workflow paywalls are styled and when remote config is initialized; misconfiguration could break workflow rendering or leave paywalls unstyled, but scope is limited to workflow/UI paths.
Overview
Workflow paywalls no longer take styling from
ui_configon the workflow payload.PaywallViewModelloadsUiConfigviaawaitGetUiConfig()in parallel with the workflow and offerings, keeps it incurrentWorkflowUiConfig, and passes it intoWorkflowScreenMapper(including rebuilds, pre-warm, and navigation) instead ofworkflow.uiConfig.PaywallOptions.injectedWorkflowgains an optionaluiConfig(stored asinjectedWorkflowUiConfig) so previews can supply styling when the injected workflow body no longer includesui_config.PurchasesFactorynow createsRemoteConfigManagerwhenuseWorkflowsis enabled (not onlyENABLE_REMOTE_CONFIG), so the config layer is available whenever workflow rendering needs/v1/config.Reviewed by Cursor Bugbot for commit 95158d1. Bugbot is set up for automated code reviews on this repo. Configure here.