Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/flu-853-stream-video-test-seams #1436 +/- ##
========================================================================
+ Coverage 43.72% 43.80% +0.08%
========================================================================
Files 419 420 +1
Lines 31490 31510 +20
========================================================================
+ Hits 13770 13804 +34
+ Misses 17720 17706 -14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
renefloor
added this pull request to stack #1442
October 9, 2026 06:12
renefloor
force-pushed
the
fix/flu-857-coordinator-connection
branch
from
October 9, 2026 12:27
2db696e to
0184b45
Compare
renefloor
force-pushed
the
fix/flu-857-coordinator-connection
branch
2 times, most recently
from
October 9, 2026 12:58
458781a to
c023e63
Compare
renefloor
force-pushed
the
fix/flu-857-coordinator-connection
branch
2 times, most recently
from
October 9, 2026 13:17
c8a8267 to
66db7fd
Compare
…ection The user's coordinator connection moves out of StreamVideo into CoordinatorConnection, the one writer of the connection state. A lock replaces the cancelable operations, whose cancel never stopped the running body, and dispose disconnects through the same path, keeping the push device registered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
renefloor
force-pushed
the
fix/flu-857-coordinator-connection
branch
from
October 9, 2026 13:37
66db7fd to
cdbaa4d
Compare
A connect whose socket is up stays connected when setting up the subscriptions or registering the push device throws, and a failed registration is tried again by the next connect. A disconnect always closes the socket, also after it dropped and is reconnecting, and ends disconnected when unregistering the push device or dropping the connection's state fails. The client state no longer writes the connection state on clear. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e read Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Fixes FLU-857
Part of FLU-859 · 21/26, stacked on #1435
What changed
CoordinatorConnection(lib/src/core/,@internal) connects the user to the coordinator and disconnects them. It is the one place that writesstate.connection.StreamVideo.connect,disconnectanddisposedelegate to it.asCancelable()wraps the future without anonCancel, so the old cancel never stopped the running_connector_disconnect. Adisconnectduring aconnectcould leave the user connected with the state cleared. ALocknow runs connects and disconnects one at a time, in the order they are called, so the last one asked for wins:MutableClientState.clear()no longer writes it. The events still come in throughStreamVideo's event subscription; see the decisions below.disposedisconnects through the same path, with these differences:StreamVideo.dispose; C1 moves them.connect:includeUserDetailsonly applies to the connect that opens the socket.registerPushDeviceregisters the device once per connection, also from a later connect when the first one skipped it. Before, the first caller's options silently applied to everyone, so an auto-connect withregisterPushDevice: false(the ringing path) meant a laterconnect()never registered.connectUseror token fetch that throws now leaves the statefailed. Before, it stayedconnecting. A connected user's token that cannot be read is returned as a failure instead of thrown.deleteDevicerequest. That includesStreamVideo.reset(disconnect: true), and replacing the singleton withfailIfSingletonExists: falseuntil C5 makes that adispose.Decisions to check
disposekeeps the push device registered. The ticket asksdisposeto go through_disconnect, which unregisters it. But the background push handler builds a client, handles the ring and disposes it. Unregistering there would stop the next push.disconnect()still unregisters, as it always did.CoordinatorConnectionState. That emitter is private toCoordinatorClientOpenApi, and following it would change what the app sees. When the app pauses,StreamVideocancels its event subscription before it closes the socket, sostate.connectionstaysconnectedin the background. A connect on resume relies on that. The class follows the same connected and disconnected events_onEventhandled, so this PR changes who writes the state, not when.CoordinatorClientto support abortingconnectUser._rewatchCallsstays inStreamVideo. It is aqueryCallson the client, not part of the connection._onEventcalls it after a connected event.v2. C4 reworks that handling.Tests
test/src/core/coordinator_connection_test.dart(21) runs on the C2 fixture:stream_video: 1296 passed.🤖 Generated with Claude Code