Skip to content

Add platform_ready support#1

Merged
lhoward merged 1 commit intomainfrom
platform-ready
Dec 6, 2025
Merged

Add platform_ready support#1
lhoward merged 1 commit intomainfrom
platform-ready

Conversation

@prspn
Copy link
Contributor

@prspn prspn commented Dec 6, 2025

This is a suggested change to OcaChannelManager, it adds a callback channel that signals platform_ready at the end of init, letting Flutter code synchronize stream subscriptions to when native listeners have been set up.

This PR is meant for main, but there is currently a similar kind of race in the client-connection-broker-2 branch; onControl will create a new OcaChannelManager but the Flutter side currently will not know when it is ready.

This PR will work for that case as well, at least until a better solution is available, the only change needed for that case would be to use a channelSuffix for the new platformStateChannel.

See what you think?

@prspn prspn requested a review from lhoward December 6, 2025 20:12
@lhoward
Copy link
Contributor

lhoward commented Dec 6, 2025

Remind me as I've been out of this code for a while, this is moving the signaling from our UI into FlutterSwiftOCA? Is there a reason this is required or is this just a good refactoring that would be required (rather than optional) in the connection broker branch?

@lhoward lhoward self-assigned this Dec 6, 2025
@lhoward lhoward added the enhancement New feature or request label Dec 6, 2025
@prspn
Copy link
Contributor Author

prspn commented Dec 6, 2025

Yes, it would serve the same function as the current code does in the three runners (each is setting up a channel for this), so we could remove that. And it would also serve the same purpose for the connection broker branch, so it solves 4 problems in one location. It will co-exist with the current solution, though.

@lhoward lhoward merged commit 72ef439 into main Dec 6, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants