Skip to content

Align FlowManager APIs across platforms#805

Open
KVSRoyal wants to merge 3 commits intoplayer-1-dot-zerofrom
flow-manager
Open

Align FlowManager APIs across platforms#805
KVSRoyal wants to merge 3 commits intoplayer-1-dot-zerofrom
flow-manager

Conversation

@KVSRoyal
Copy link
Contributor

@KVSRoyal KVSRoyal commented Feb 23, 2026

Why

Ideally, Player's APIs are consistent on different platforms. This PR better aligns the FlowManager APIs across platforms.

What

The updates to the Migration Notes double as the "what" section and Release Notes of this PR.

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major
  • N/A (part of 1.0)

Does your PR have any documentation updates?

  • Updated docs
  • No Update needed
  • Unable to update docs

@KVSRoyal KVSRoyal added the skip-release Preserve the current version when merged label Feb 23, 2026
@KVSRoyal KVSRoyal force-pushed the flow-manager branch 3 times, most recently from 33e9748 to 7f55c8b Compare February 26, 2026 20:38
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 83.87097% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.87%. Comparing base (ec0701d) to head (06e39f9).
⚠️ Report is 29 commits behind head on player-1-dot-zero.

Files with missing lines Patch % Lines
...ts/ManagedPlayer/ManagedPlayerViewModelTests.swift 66.66% 2 Missing ⚠️
.../swiftui/ViewInspector/TransitionPluginTests.swift 0.00% 2 Missing ⚠️
.../com/intuit/playerui/core/managed/AsyncIterator.kt 75.00% 1 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           player-1-dot-zero     #805      +/-   ##
=====================================================
- Coverage              85.90%   85.87%   -0.03%     
=====================================================
  Files                    507      507              
  Lines                  22891    23129     +238     
  Branches                2656     2657       +1     
=====================================================
+ Hits                   19664    19862     +198     
- Misses                  2898     2939      +41     
+ Partials                 329      328       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KVSRoyal KVSRoyal changed the base branch from main to player-1-dot-zero February 27, 2026 02:44
Comment on lines +12 to +13
public class AsyncIterationManager<Item : Any, Result : Any, Data : Any>(
public val iterator: AsyncIterator<Item, Result, Data>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is public but actually not user-facing, per offline discussions. So no release notes are added for this.

@codecov
Copy link

codecov bot commented Feb 27, 2026

Bundle Report

Changes will decrease total bundle size by 4.58kB (-0.08%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
plugins/beacon/core 401.09kB -950 bytes (-0.24%) ⬇️
plugins/check-path/core 419.49kB -950 bytes (-0.23%) ⬇️
plugins/stage-revert-data/core 383.11kB -950 bytes (-0.25%) ⬇️
plugins/reference-assets/core 462.33kB 571 bytes (0.12%) ⬆️
react/player 73.12kB -234 bytes (-0.32%) ⬇️
plugins/common-expressions/core 405.35kB -950 bytes (-0.23%) ⬇️
plugins/markdown/core 660.17kB -947 bytes (-0.14%) ⬇️
plugins/common-types/core 479.68kB -950 bytes (-0.2%) ⬇️
plugins/metrics/core 437.65kB -950 bytes (-0.22%) ⬇️
plugins/async-node/core 457.15kB 2.34kB (0.51%) ⬆️
core/player 950.97kB -610 bytes (-0.06%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: core/player

Assets Changed:

Asset Name Size Change Total Size Change (%)
Player.native.js -976 bytes 400.88kB -0.24%
cjs/index.cjs 122 bytes 187.63kB 0.07%
index.legacy-esm.js 122 bytes 181.22kB 0.07%
index.mjs 122 bytes 181.22kB 0.07%
view changes for bundle: plugins/beacon/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
BeaconPlugin.native.js -950 bytes 386.62kB -0.25%
view changes for bundle: plugins/stage-revert-data/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
StageRevertDataPlugin.native.js -950 bytes 376.29kB -0.25%
view changes for bundle: plugins/common-types/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
CommonTypesPlugin.native.js -950 bytes 408.5kB -0.23%
view changes for bundle: plugins/common-expressions/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
CommonExpressionsPlugin.native.js -950 bytes 384.1kB -0.25%
view changes for bundle: react/player

Assets Changed:

Asset Name Size Change Total Size Change (%)
cjs/index.cjs -78 bytes 26.63kB -0.29%
index.legacy-esm.js -78 bytes 23.25kB -0.33%
index.mjs -78 bytes 23.25kB -0.33%
view changes for bundle: plugins/metrics/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
MetricsPlugin.native.js -950 bytes 405.31kB -0.23%
view changes for bundle: plugins/check-path/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
CheckPathPlugin.native.js -950 bytes 390.01kB -0.24%
view changes for bundle: plugins/reference-assets/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
ReferenceAssetsPlugin.native.js 571 bytes 432.43kB 0.13%
view changes for bundle: plugins/async-node/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
AsyncNodePlugin.native.js 571 bytes 409.31kB 0.14%
cjs/index.cjs 590 bytes 17.41kB 3.51%
index.legacy-esm.js 590 bytes 15.22kB 4.03%
index.mjs 590 bytes 15.22kB 4.03%
view changes for bundle: plugins/markdown/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
MarkdownPlugin.native.js -947 bytes 635.02kB -0.15%

@KVSRoyal KVSRoyal marked this pull request as ready for review March 2, 2026 16:31
@KVSRoyal KVSRoyal requested review from a team as code owners March 2, 2026 16:31
A function called to fetch the next flow. If the flow is complete, return `nil`.
`CompletedState` will be `nil` if it is asking for the first state
- parameters:
- state: The `CompletedState` from the previous flow if there was one
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to update this comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's up to date? Is there anything specific that you think we should update?

Copy link
Contributor

Choose a reason for hiding this comment

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

oh I meant for changing the parameter name from state to result

}

protected val manager: FlowManager = FlowManager(flows)
protected val internalManager = AsyncIterationManager(manager)
Copy link
Member

@sugarmanz sugarmanz Mar 3, 2026

Choose a reason for hiding this comment

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

Can we rename AsyncIterationManager to AsyncIterationFlow since we're changing the context of what "manager" represents here? Then we can just rename this to managerFlow instead of internalManager

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup sounds, good.

}

protected val manager: FlowManager = FlowManager(flows)
protected val internalManager = AsyncIterationManager(manager)
Copy link
Contributor

Choose a reason for hiding this comment

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

rename this to iterationManager


/** Generic async iterator that uses some [Result] to determine the next [Item] in the iteration */
public interface AsyncIterator<Item : Any, Result : Any> {
public interface AsyncIterator<Item : Any, Result : Any, Data : Any> {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a breaking change, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. I have some release notes for it here.

@KetanReddy KetanReddy linked an issue Mar 5, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-release Preserve the current version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align FlowManager APIs across platforms

5 participants