Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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 @@
## fix/flu-857-coordinator-connection #1437 +/- ##
======================================================================
+ Coverage 43.86% 44.43% +0.57%
======================================================================
Files 420 421 +1
Lines 31525 31532 +7
======================================================================
+ Hits 13827 14011 +184
+ Misses 17698 17521 -177 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
f04dd8f to
bcc30a7
Compare
0a0c630 to
e959863
Compare
78c2fbf to
d31b923
Compare
d31b923 to
a8cd297
Compare
…inging The ringing and push handling moves out of StreamVideo into a RingingCallCoordinator, reached through streamVideo.ringing. The ringing delegates on StreamVideo and the deprecated CallKit aliases are removed. The ringing call and accepted call maps move into the client state, which Call clears on leave. Accepting a call answered on the native call screen runs through one method for both entry points. 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>
a8cd297 to
5355808
Compare
- Keep the moved ringing methods on StreamVideo as deprecated forwarders. - Drop the dart fix renames that pointed at StreamVideo methods that no longer exist. - Mark the ringing maps on MutableClientState @internal and restore the accept markers' verbose logs. - Read the push notification manager lazily, so a manager that reaches for StreamVideo.ringing while it is built does not hit a late field. - Test joining after an accept, a failed cold-start connect, the stale ring checks, the accept and verification dedupe, and the auto-reject cancel on accept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
StreamVideo.ringing is now typed as an exported RingingCallCoordinator interface carrying only the public ringing API. The implementation, with the hooks the client drives it through, is an internal RingingCallCoordinatorImpl that is not exported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The analyzer now warns when a class outside stream_video implements the interface; the push package's test mock opts out of the warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The accept now starts from a disconnected client, so connectUser is actually awaited while the ring timer runs. The two real-time timer tests wait longer, and a redundant argument is dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The client-level ringing handler is now RingingFlowCoordinator, with RingingFlowCoordinatorImpl behind it, so it is no longer confused with the per-call CallRingingController. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SDK Size
Measured on |
Size BreakdownWhat each SDK adds to an empty release app, per Dart package and native library. Dart sizes are uncompressed symbol sizes. Open the Measured on android ·
|
| Component | Size | Δ vs v2 |
|---|---|---|
native:libjingle_peerconnection_so.so |
11.96 MB | 0 |
package:stream_video |
1.07 MB | +38.0 KB |
classes.dex |
256.7 KB | 0 |
dart:@unknown |
254.0 KB | +4.2 KB |
dart:_http |
153.9 KB | -0.0 KB |
package:protobuf |
145.0 KB | +0.0 KB |
dart:mixin_deduplication |
137.0 KB | +3.7 KB |
native:libdartjni.so |
121.7 KB | 0 |
dart:io |
99.3 KB | -0.0 KB |
dart:async |
77.1 KB | -0.0 KB |
package:stream_core |
65.8 KB | +0.0 KB |
package:stream_webrtc_flutter |
56.6 KB | -0.0 KB |
package:rxdart |
54.3 KB | +0.0 KB |
dart:core |
52.2 KB | -0.0 KB |
package:dio |
52.0 KB | -0.0 KB |
| other (71) | 535.6 KB | +1.3 KB |
android · stream_video_flutter: 17.28 MB (+16.2 KB)
| Component | Size | Δ vs v2 |
|---|---|---|
native:libjingle_peerconnection_so.so |
11.96 MB | 0 |
package:stream_video |
1.12 MB | +27.5 KB |
package:flutter |
692.3 KB | -0.1 KB |
classes.dex |
447.0 KB | 0 |
dart:@unknown |
423.6 KB | +2.0 KB |
dart:mixin_deduplication |
326.3 KB | -15.0 KB |
package:stream_video_flutter |
194.1 KB | +0.2 KB |
dart:_http |
154.1 KB | -0.0 KB |
package:protobuf |
147.0 KB | +0.0 KB |
dart:io |
136.4 KB | -0.0 KB |
native:libdartjni.so |
121.7 KB | 0 |
assets |
118.5 KB | 0 |
package:stream_core_flutter |
114.3 KB | -0.0 KB |
package:hive_ce |
99.2 KB | +0.0 KB |
dart:@shared |
81.4 KB | +1.0 KB |
| other (98) | 1.22 MB | +0.5 KB |
ios · stream_video: 15.55 MB (+53.9 KB)
| Component | Size | Δ vs v2 |
|---|---|---|
native:StreamWebRTC.framework |
11.82 MB | 0 |
package:stream_video |
1.19 MB | +43.4 KB |
Runner |
625.3 KB | 0 |
dart:@unknown |
251.0 KB | +4.6 KB |
dart:_http |
166.0 KB | 0 |
native:objective_c.framework |
164.2 KB | 0 |
package:protobuf |
155.2 KB | -0.0 KB |
dart:mixin_deduplication |
145.0 KB | +3.9 KB |
dart:io |
95.5 KB | -0.0 KB |
dart:async |
84.5 KB | -0.0 KB |
package:stream_core |
74.3 KB | +0.0 KB |
package:stream_webrtc_flutter |
64.6 KB | +0.3 KB |
dart:@shared |
62.8 KB | +1.4 KB |
package:rxdart |
59.0 KB | -0.0 KB |
package:dio |
57.1 KB | +0.0 KB |
| other (71) | 586.2 KB | +0.3 KB |
ios · stream_video_flutter: 18.3 MB (+24.4 KB)
| Component | Size | Δ vs v2 |
|---|---|---|
native:StreamWebRTC.framework |
11.82 MB | 0 |
package:stream_video |
1.25 MB | +32.8 KB |
Runner |
1.16 MB | 0 |
package:flutter |
788.7 KB | -0.0 KB |
dart:@unknown |
424.5 KB | +2.1 KB |
dart:mixin_deduplication |
337.3 KB | -12.5 KB |
package:stream_video_flutter |
209.1 KB | +0.2 KB |
Frameworks |
171.3 KB | 0 |
dart:_http |
166.2 KB | -0.0 KB |
native:objective_c.framework |
164.2 KB | 0 |
package:protobuf |
157.1 KB | +0.0 KB |
dart:io |
136.5 KB | +0.0 KB |
package:stream_core_flutter |
123.8 KB | +0.0 KB |
dart:@shared |
113.2 KB | +1.5 KB |
package:hive_ce |
107.1 KB | -0.0 KB |
| other (98) | 1.23 MB | +0.5 KB |
Fixes FLU-856
Part of FLU-859 · 22/26, stacked on #1436
What changed
RingingFlowCoordinator(lib/src/ringing/) holds the ringing and push handling that was about 900 lines ofStreamVideo.stream_video.dartdrops from 1,900 to 965 lines.streamVideo.ringing. The ringing methods keep their names onringing, so migrating is mechanical:streamVideo.observeCoreRingingEvents(...)becomesstreamVideo.ringing.observeCoreRingingEvents(...).StreamVideostay as deprecated forwarders toringing.observeCoreCallKitEvents,observe*CallKitEventandhandleVoipPushNotificationare removed.RingingFlowCoordinatoris an exported interface with only the public API. The implementation,RingingFlowCoordinatorImpl, holds the constructor and the hooksStreamVideouses (clear,dispose,ringingCalls,handleCoordinatorEvent); it is@internaland not exported.@sealed(frompackage:meta): implementing it outsidestream_videogives an analyzer warning._onEvent's two branches);handleRingingFlowNotifications,getCallRingingState,consumeIncomingCall;_acceptIncomingCallandconsumeAndAcceptActiveCallran the same steps: cancel the timer, guard, consume, accept, and end the native call if it can't be set up. They are now one_acceptRingingCallwith two flags:connectFirst, forconsumeAndAcceptActiveCallon a cold start;joinAfter, for the native accept event.MutableClientState.ClientStategains three@internalhooks,markCallAcceptedOnThisDevice,clearCallAcceptedOnThisDeviceandreleaseRingingCall, soCalltalks to the client state alone on accept and on leave. The maps themselves are@internal.streamVideo.ringingwhile it is built works), the options, a ringing-call factory, andconnectas theensureConnectedcallback (C3).StreamVideoPushNotificationManager, dogfooding, and thestream_video_flutterexample.Decisions to check
RingingFlowCoordinator, to keep it apart from the per-callCallRingingControllerin B3. It handles ringing flows across calls and the push and native layers; the controller handles one call's ring.ringing.observeCoreRingingEventsrepeats "ringing", but keeping the names makes the migration a search and replace, anddart fixcannot move a method behind a getter. For the same reason the deprecated forwarders have nodart fixrule, and the old CallKit rename rules that pointed atStreamVideoare deleted.markCallAcceptedOnThisDevice,clearCallAcceptedOnThisDeviceandreleaseRingingCall. They were already@internalonStreamVideo.handleCoordinatorEventtakes everyCoordinatorCallRingingEvent, including the caller's own and non-ringing ones. Before, those fell through to the connection, which ignores them, so nothing changes in behaviour.@sealedfrompackage:meta, not a class modifier.sealed,finalandbaseare enforced per library, so the implementation would have to be apartfile, and no test anywhere, ours or an app's, could mockringing.@sealedis per package and only a warning, so a mock can still opt out with an// ignore.CallKitEventtypedef stays. It is a type, not aStreamVideomethod, and has its owndart fixrule.getCallRingingStatereads the call through the coordinator client. It no longer builds aCalland callsget. ThatCallwas never disposed, and itsgetresolved the call settings, which enumerates the media devices: media work in the background push isolate. The request is the samegetCallwithringing,notifyandvideofalse.disposeAfterResolvingRingingstays onStreamVideo. It is deprecated already and disposes the client, so it usesringing.onRingingEvent. It goes away with the deprecation._mutedCameraByStateChangeand_mutedAudioByStateChangemaps stay for C4, as the ticket says.ClientStateare abstract. EveryClientStateimplementation now has to provide them; the SDK's own is the only one, and test mocks pick them up fromMock.MutableClientStateowns the maps. This letsCallwrite through its client state alone, which B6'sCallHostbuilds on. The alternative is private maps in the coordinator, withCallcalling@internalhooks onstreamVideo.ringing.Tests
test/src/ringing/ringing_flow_coordinator_test.dart(28), on the C2 fixture with a push manager whose native events the test emits:fakeAsync);handleRingingFlowNotificationsfor a ringing push, a cancelled one, a missed one and a foreign one;getCallRingingState, also when the call can't be read, and without ringing the call again;consumeAndAcceptActiveCallconnects before it consumes, ends the native call when connecting fails, and leaves joining to the app;StreamVideo.handleRingingFlowNotificationsstill forwards;connectFirst, the accepted-elsewhere check, or the timer cancel on dispose or on accept; flippingjoinAfter; dropping either dedupe set or the answered-on-this-device check; not ending the native call on a failed connect; andgetCallRingingStateringing the call.streamVideo.ringing:verify_displayed_incoming_calls_test,call_accepted_on_this_device_test,ringing_cancelled_by_caller_test;background_push_handler_test, whoseMockStreamVideonow carries aMockRingingFlowCoordinator, with an// ignore: subtype_of_sealed_class.stream_video: 1324 passed;stream_video_flutterwithout goldens: 729;stream_video_push_notification: 67.Note
The external docs (incoming-calls guide, ringing tutorial) need a docs-content follow-up for
streamVideo.ringing.*.The first commit picked up the untracked
packages/stream_video_flutter/example/macos/Podfileby mistake. The next commit removes it again, so the squash leaves it out.🤖 Generated with Claude Code