Repository navigation
fix(extension): release failed camera preview connections - #3443
Open
vedanth-jadhav wants to merge 1 commit into
Open
vedanth-jadhav wants to merge 1 commit into
vedanth-jadhav wants to merge 1 commit into
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Camera preview negotiation in both the iframe preview and parent picture-in-picture path can fail before the caller receives its peer. Offer/description/messaging failures leave that peer open, and the separate remote-stream promise can reject without a handler while negotiation is still pending. Failed answer application can also strand an already-received track.
Share connection ownership between both paths. On failure, close the local peer and stop any early remote tracks. Remove temporary track/connection listeners and the timeout on every settlement. Represent the remote wait as an outcome so an early timeout cannot become an unhandled rejection while setup is awaited; preserve the actual setup failure. Successful peers and streams still pass to the existing caller cleanup.
Validation: all 50 extension tests pass, including 11 new connection cases. Eight initial regressions fail against the extracted original implementation. Covers offer/local-description/messaging/remote-description failures, rejected or missing answers, track timeout, failed connection, early-track cleanup, a timeout preceding a later setup failure, and successful ownership transfer. Strict scoped helper/test TypeScript with Chrome types and
noUncheckedIndexedAccess, Biome on all four files and diff checks pass.Reproduce:
cd apps/chrome-extension && bun run test.Tests control WebRTC peers/events and Chrome messaging. Physical camera capture, real ICE negotiation, full extension build/typecheck and browser installation were not run. Existing caller disposal and reconnect policies remain in place; no dependencies or message contracts change.


Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Both camera preview paths now use
connectCameraPreviewto share cleanup.No actionable issues were found. Tests and browser capture were not run during this review.
Reviews (1) · Last reviewed commit: "fix(extension): release failed camera pr..." · Reviewed by Greptile