-
Notifications
You must be signed in to change notification settings - Fork 368
fix(core): ensure StreamChannel future completes after channel initialization #2324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…r channel initialization The `StreamChannel` widget's `_channelInitFuture` could previously complete before the underlying `channel.initialized` future. This change ensures that `_channelInitFuture` now waits for both the channel's initialization process and the `channel.initialized` future to complete.
The `_buildError` method in `StreamChannel` now unwraps `ParallelWaitError` to display the underlying error, providing more specific feedback to the user, especially for network-related issues.
WalkthroughThis change updates the Changes
Sequence Diagram(s)sequenceDiagram
participant Widget as StreamChannel
participant Channel as Channel
participant FutureBuilder as FutureBuilder
Widget->>Channel: _maybeInitChannel()
Widget->>Channel: channel.initialized
Note right of Widget: Waits for both futures to complete
Widget->>FutureBuilder: Build with _channelInitFuture
FutureBuilder->>Widget: Render child when both complete
FutureBuilder->>Widget: Show loading/error as appropriate
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2324 +/- ##
=======================================
Coverage 63.64% 63.65%
=======================================
Files 409 409
Lines 25605 25609 +4
=======================================
+ Hits 16297 16301 +4
Misses 9308 9308 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Submit a pull request
Fixes: #2323
Description of the pull request
The
StreamChannel
widget's_channelInitFuture
could previously complete before the underlyingchannel.initialized
future. This change ensures that_channelInitFuture
now waits for both the channel's initialization process and thechannel.initialized
future to complete.Summary by CodeRabbit
Bug Fixes
Tests