Skip to content

refactor(workflows): render workflows with ui_config from the config endpoint#3721

Open
vegaro wants to merge 1 commit into
cesar/workflows-ui-config-read-pathfrom
cesar/workflows-uiconfig-threading
Open

refactor(workflows): render workflows with ui_config from the config endpoint#3721
vegaro wants to merge 1 commit into
cesar/workflows-ui-config-read-pathfrom
cesar/workflows-uiconfig-threading

Conversation

@vegaro

@vegaro vegaro commented Jul 6, 2026

Copy link
Copy Markdown
Member

Workflow rendering used to read ui_config from the workflow body. This makes it use the config endpoint instead (via awaitGetUiConfig() from #3711), so workflow bodies can stop shipping ui_config in 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_config on the workflow payload. PaywallViewModel loads UiConfig via awaitGetUiConfig() in parallel with the workflow and offerings, keeps it in currentWorkflowUiConfig, and passes it into WorkflowScreenMapper (including rebuilds, pre-warm, and navigation) instead of workflow.uiConfig.

PaywallOptions.injectedWorkflow gains an optional uiConfig (stored as injectedWorkflowUiConfig) so previews can supply styling when the injected workflow body no longer includes ui_config.

PurchasesFactory now creates RemoteConfigManager when useWorkflows is enabled (not only ENABLE_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.

…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>
@vegaro vegaro force-pushed the cesar/workflows-ui-config-read-path branch from 5ae97b0 to 6cae726 Compare July 6, 2026 14:42
@vegaro vegaro force-pushed the cesar/workflows-uiconfig-threading branch from 7e1e442 to 95158d1 Compare July 6, 2026 14:45
@vegaro vegaro marked this pull request as ready for review July 6, 2026 14:55
@vegaro vegaro requested a review from a team as a code owner July 6, 2026 14:55

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚢

// 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We probably should unify these flags 😅 We can remove the remote config one and leave the workflows one if you'd like

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