Skip to content

fix(client): warn about dangling audio bindings only for published audio tracks#2183

Merged
jdimovska merged 1 commit intomainfrom
watchdog
Apr 2, 2026
Merged

fix(client): warn about dangling audio bindings only for published audio tracks#2183
jdimovska merged 1 commit intomainfrom
watchdog

Conversation

@jdimovska
Copy link
Copy Markdown
Contributor

@jdimovska jdimovska commented Apr 2, 2026

💡 Overview

This PR fixes an issue where the audio bindings watchdog reported dangling audio bindings even after the track had been unpublished.

Summary by CodeRabbit

  • Bug Fixes

    • Improved accuracy of audio binding detection by aligning warnings with actual published audio tracks rather than the mere presence of audio streams.
  • Tests

    • Added test coverage for the updated audio binding detection behavior.

@jdimovska jdimovska requested a review from oliverlaz April 2, 2026 09:50
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 2, 2026

⚠️ No Changeset found

Latest commit: b49f238

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9b86fb28-fa58-459a-8830-4d623150bdd5

📥 Commits

Reviewing files that changed from the base of the PR and between eb0931b and b49f238.

📒 Files selected for processing (2)
  • packages/client/src/helpers/AudioBindingsWatchdog.ts
  • packages/client/src/helpers/__tests__/AudioBindingsWatchdog.test.ts

📝 Walkthrough

Walkthrough

The watchdog's dangling-audio detection now conditions warnings on the participant's publishedTracks property instead of only stream presence. Audio binding warnings are only emitted when corresponding streams exist AND their TrackType appears in publishedTracks.

Changes

Cohort / File(s) Summary
Audio Bindings Watchdog Logic
packages/client/src/helpers/AudioBindingsWatchdog.ts
Updated periodic dangling-audio detection to gate warnings on publishedTracks presence. Added TrackType import and conditional checks: warns on missing generic audio binding only when publishedTracks includes TrackType.AUDIO; warns on missing screen-share-audio binding only when publishedTracks includes TrackType.SCREEN_SHARE_AUDIO.
Audio Bindings Watchdog Tests
packages/client/src/helpers/__tests__/AudioBindingsWatchdog.test.ts
Updated test helper addRemoteParticipant to derive publishedTracks from stream presence instead of always returning empty array. Added new test case validating watchdog does not warn when audioStream exists but publishedTracks excludes audio.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 The watchdog learns to read between the streams,
Checking publishedTracks in participant dreams.
No false alarms on unannounced audio play,
Bindings aligned—detection's fair today!
Hop hop, the fix hops closer to perfection! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description explains the problem and fix but is missing implementation details and required template sections (ticket reference and documentation link). Add the ticket reference and documentation link sections from the template, and optionally include implementation notes explaining the publishedTracks gating logic.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: gating audio binding warnings on published tracks rather than stream presence.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch watchdog

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jdimovska jdimovska merged commit ff47662 into main Apr 2, 2026
18 checks passed
@jdimovska jdimovska deleted the watchdog branch April 2, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants