Repository navigation
fix(core): keep sending state active during overlapping sends - #1462
Draft
drewsephski wants to merge 1 commit into
Draft
drewsephski wants to merge 1 commit into
drewsephski wants to merge 1 commit into
Conversation
|
@drewsephski is attempting to deploy a commit to the LiveKit Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 6b42a1c The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This branch has not been 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.
When two calls to the same chat or data-channel
send()overlap, finishing either call setsisSendingtofalsewhile the other call is still pending. Consumers such as the documenteduseChatexample can therefore re-enable their send button too early. A rejected send has the same effect.Track the number of pending sends within each setup instance and derive the completion state from that count. Chat sends remain pending through both
sendTextand the legacy publish. Include a patch changeset for@livekit/components-core.Reproduction before the fix
Added and ran the regression tests against unmodified production code at
6b9bc6ee1065221f74093f15be395439d6dba45f:pnpm --filter @livekit/components-core test src/components/chat.test.ts src/observables/dataChannel.test.tsAll six new cases failed with
expected false to be trueafter settling the first send while holding the second send pending; the three existing data-channel cases passed. Deferred SDK method spies cover successful and failed text sends, successful and failed legacy publishes, data-channel success/failure, and subscribers joining while a send remains pending.Local validation after the fix
pnpm --filter @livekit/components-core test— 117 tests passed.pnpm test— all repository test tasks passed.pnpm lintandpnpm format:check— passed.pnpm build:coreandpnpm build— passed.pnpm api:check— passed; the repository explicitly disables the core API check, and the React API extractor completed successfully.git diff --cached --check— passed before committing.AI assistance: Codex helped investigate, implement, and run the local checks described above. Opening as a draft for review.