Repository navigation
Conversation
Follow-up to GetStream/protocol#2116. Stop sending the legacy subscriber/publisher stats, input devices and per-PC rtc stats, which the SFU no longer accepts. StatsTracer.takeSample() now returns only the derived PerformanceStats. The stats reporter's device subscription used to warm the device-list cache that device persistence reads, so persist the active track's label as a fallback when that cache is cold. Ticket: REACT-1204
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
💤 Files with no reviewable changes (2)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe client now persists a label from an active media track when device enumeration omits the selected device. Stats sampling and reporting now use performance-stat arrays and exclude input-device details from report payloads. ChangesDevice preference persistence
Stats sampling and reporting
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The device-label and stats-reporting changes have no identified merge-blocking issue after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change reduces device and raw-stat reporting while preserving the existing session-bound sending path. No new privilege or cross-user access was identified in the inspected flows. Remaining uncertainty concerns server compatibility and device-preference behavior during interrupted or overlapping transitions. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Bundle sizeBuilt package output. Sizes in KB; delta vs
|
💡 Overview
Follow-up to GetStream/protocol#2116, which removed the deprecated
SendStatsRequestfields (subscriber_stats,publisher_stats,audio_devices,video_devices,subscriber_rtc_stats,publisher_rtc_stats). The client stops sending them and drops the code that only existed to fill them.📝 Implementation notes
signal.tsregenerated without the removed fields.SfuStatsReporterno longer serializes rawgetStats()reports or observes mic/camera device lists, so it no longer needsmicrophone,cameraandstatein its options.StatsTracer.takeSample()returnsPerformanceStats[]instead of{ performanceStats, stats }; theComputedStatstype is gone.DeviceManager.persistPreferencenow falls back to the active track's label when the device isn't in the cached list. Covered by a newCameraManagertest.StreamSfuClient.sendStats()is exported, and its parameter type loses the removed fields.SendStatsreturns 200 without the removed fields, encode/decode stats map to publisher/subscriber, the leave flush is sent, and device preferences keep their labels.🎫 Ticket: https://linear.app/stream/issue/REACT-1204
📑 Docs: not needed (internal stats payload only)
Summary by CodeRabbit
Bug Fixes
Improvements