fix(client): deduplicate mic.capture_report trace emissions#2189
fix(client): deduplicate mic.capture_report trace emissions#2189
Conversation
Only trace mic.capture_report when the capturesAudio value actually changes, reducing noise from repeated emissions during sustained silence. The internal dispatchEvent continues firing on every callback so consumers are unaffected.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdded state tracking ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
💡 Overview
Reduces trace noise from
mic.capture_reportby only tracing when thecapturesAudiovalue actually changes, rather than on every periodic emission during sustained silence. The internaldispatchEventcontinues firing on every callback so downstream consumers are unaffected.📝 Implementation notes
lastCapturesAudiovariable scoped to each no-audio detector instance insideMicrophoneManager.setup()tracer.trace('mic.capture_report', ...)is now gated oncapturesAudio !== lastCapturesAudiostreamClient.dispatchEvent(event)remains unconditionalSummary by CodeRabbit
Release Notes