Skip to content

Fix overlapping screen share operations - #806

Open
HariharanIT wants to merge 3 commits into
preprodfrom
codex/screenshare-overlap-race-fix
Open

HariharanIT wants to merge 3 commits into
preprodfrom
codex/screenshare-overlap-race-fix

Conversation

@HariharanIT

Copy link
Copy Markdown
Collaborator

Summary

  • prevent concurrent screen-share Start workflows with an immediate four-state operation guard
  • queue the first Stop received while Start is pending and ignore duplicate requests
  • make the RTC wrapper execute explicit Start and Stop actions instead of inferring through shared state
  • keep tracks locally owned until publish succeeds and make active cleanup exactly once
  • ignore stale track-ended callbacks and cancel pending Starts during release
  • add clear Datadog session start/end separators containing the screen-share session ID
  • disable built-in screen-share controls while starting or stopping

Root cause

React kept screen share inactive until the asynchronous picker, join, and publish sequence completed. Multiple Start requests could enter during that window. The RTC wrapper used shared tracks, client state, and toggle behavior, so a failed overlapping Start could clean a successful share. The following Stop could then enter the Start branch.

Verification

  • 27 focused Jest tests passed
  • production Webpack build passed with existing warnings
  • targeted ESLint checks passed for new files
  • Prettier and git diff whitespace checks passed

Notes

The standalone TypeScript Webpack check remains blocked by the existing TypeScript 4.8 and tsconfig library compatibility issue.

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
app-builder-core Ready Ready Preview Sep 8, 2026 8:06am UTC
app-builder-core-audio-livecast Ready Ready Preview Sep 8, 2026 8:06am UTC
app-builder-core-audio-livecast-light Ready Ready Preview Sep 8, 2026 8:06am UTC
app-builder-core-light Ready Ready Preview Sep 8, 2026 8:06am UTC
app-builder-core-live-streaming Ready Ready Preview Sep 8, 2026 8:06am UTC
app-builder-core-live-streaming-light Ready Ready Preview Sep 8, 2026 8:06am UTC
app-builder-core-voice-chat Ready Ready Preview Sep 8, 2026 8:06am UTC
app-builder-core-voice-chat-light Ready Ready Preview Sep 8, 2026 8:06am UTC

Request Review

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.

1 participant