Skip to content

fix(meetings): prevent stale whiteboard share event during content handoff#4958

Open
mickelr wants to merge 1 commit into
webex:nextfrom
mickelr:fix/cannot-receive-sharing
Open

fix(meetings): prevent stale whiteboard share event during content handoff#4958
mickelr wants to merge 1 commit into
webex:nextfrom
mickelr:fix/cannot-receive-sharing

Conversation

@mickelr
Copy link
Copy Markdown
Contributor

@mickelr mickelr commented May 6, 2026

Summary

  • Fix share-state handling when whiteboard is released while a new content share is still in an intermediate non-GRANTED disposition such as ACCEPTED
  • Ensure this transition resolves to NO_SHARE instead of keeping stale WHITEBOARD_SHARE_ACTIVE
  • Add regression coverage for whiteboard -> file/content share handoff so we do not re-emit MEETING_STARTED_SHARING_WHITEBOARD

Why

When a whiteboard share is released and the next content share arrives as ACCEPTED before GRANTED, the previous logic left newShareStatus unchanged. That could re-fire whiteboard start events with a stale/released whiteboard URL before the real remote share starts.

Test

source ~/.nvm/nvm.sh
nvm use 22.14
yarn workspace @webex/plugin-meetings test:unit --targets meeting/index.js

Focused run with temporary .only on share scenarios:

28 passing (116ms)

@mickelr mickelr requested review from a team as code owners May 6, 2026 09:53
@mickelr mickelr force-pushed the fix/cannot-receive-sharing branch from e10edf7 to 8cb600a Compare May 6, 2026 11:29
@mickelr mickelr added the validated If the pull request is validated for automation. label May 6, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8cb600a29a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +3212 to 3213
else {
newShareStatus = SHARE_STATUS.NO_SHARE;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve local state until remote grant

When a local content share is active and Locus sends an intermediate ACCEPTED update for another participant before the final GRANTED, this default branch changes shareStatus to NO_SHARE. The subsequent GRANTED update then starts remote sharing with oldShareStatus === NO_SHARE, so the existing steal-handling path that calls unpublishStreams() only when oldShareStatus === LOCAL_SHARE_ACTIVE is skipped; the local share tracks can remain published after a remote participant takes the floor. This branch should avoid clearing a local active content share on an intermediate accepted handoff, or otherwise preserve enough state to unpublish on the final remote grant.

Useful? React with 👍 / 👎.

@mickelr mickelr force-pushed the fix/cannot-receive-sharing branch from 8cb600a to e02286e Compare May 6, 2026 12:47
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6ba0ac4877

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +3213 to +3214
this.shareStatus === SHARE_STATUS.LOCAL_SHARE_ACTIVE &&
contentShare.disposition === FLOOR_ACTION.ACCEPTED
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve remote shares during ACCEPTED handoffs

When an existing remote content share is active and another participant's floor update arrives as ACCEPTED before the final GRANTED, this exception does not apply because it only preserves LOCAL_SHARE_ACTIVE; the new default branch then sets NO_SHARE. In that remote-to-remote handoff scenario the listener emits MEETING_STOPPED_SHARING_REMOTE and loses the REMOTE_SHARE_ACTIVE state before the final grant, bypassing the remote-steal path below that is specifically meant to handle one remote presenter taking over from another without stopping the share.

Useful? React with 👍 / 👎.

@mickelr mickelr force-pushed the fix/cannot-receive-sharing branch 2 times, most recently from e02286e to e956efc Compare May 6, 2026 13:43
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e956efc64c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 3212 to +3215
else if (
((previousContentShare && contentShare.disposition === FLOOR_ACTION.RELEASED) ||
contentShare.disposition === null) &&
((previousWhiteboardShare && whiteboardShare.disposition === FLOOR_ACTION.RELEASED) ||
whiteboardShare.disposition === null)
(this.shareStatus === SHARE_STATUS.LOCAL_SHARE_ACTIVE ||
this.shareStatus === SHARE_STATUS.REMOTE_SHARE_ACTIVE) &&
contentShare.disposition === FLOOR_ACTION.ACCEPTED
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve only real content shares on ACCEPTED

When a webinar attendee or guest is viewing a whiteboard, the earlier whiteboard branch stores it as REMOTE_SHARE_ACTIVE; if that whiteboard is then RELEASED while the next content floor is only ACCEPTED, this new preservation branch treats the whiteboard-backed remote state as an active content share. In that context the listener skips the transition to NO_SHARE and the accepted-event path below is also suppressed, so the stale whiteboard/remote state remains until the final GRANTED update instead of stopping the released whiteboard as intended. Please gate this preservation on the previous/current content floor actually representing an active content share, not just on the shared REMOTE_SHARE_ACTIVE status.

Useful? React with 👍 / 👎.

@mickelr mickelr force-pushed the fix/cannot-receive-sharing branch from e956efc to 05bf5bb Compare May 7, 2026 01:55
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 05bf5bb730

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +3406 to +3409
} else if (
newShareStatus === SHARE_STATUS.REMOTE_SHARE_ACTIVE &&
contentShare.disposition !== FLOOR_ACTION.ACCEPTED
) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve previous presenter for member updates

When a content handoff goes through ACCEPTED, this branch now suppresses locusMediaSharesUpdate until the final GRANTED update, but that final payload has previous.content.disposition === ACCEPTED for the new presenter, not the old granted presenter. In local/remote A -> B handoffs, Members.locusMediaSharesUpdate therefore never sees the old A as a granted previous share and never emits endedSharingId or clears A's isContentSharing, leaving the old presenter marked as sharing after B is granted. The accepted handoff path needs to preserve/pass the old granted presenter to the members update, not just the meeting share status.

Useful? React with 👍 / 👎.

@mickelr mickelr force-pushed the fix/cannot-receive-sharing branch from 05bf5bb to 12406e1 Compare May 7, 2026 02:11
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 12406e179a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +3217 to +3218
previousContentShare?.disposition === FLOOR_ACTION.GRANTED &&
contentShare.disposition === FLOOR_ACTION.ACCEPTED
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve handoff state across repeated ACCEPTED deltas

When Locus sends more than one intermediate ACCEPTED update for the same content handoff, the first one preserves the active share, but the next delta has previous.content.disposition === ACCEPTED, so this condition fails and the default branch changes shareStatus to NO_SHARE. A later GRANTED update then again misses the local-unpublish/remote-steal paths that this patch is trying to protect. Consider also preserving while acceptedContentHandoffPreviousShare is already set and the current floor is still ACCEPTED.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated If the pull request is validated for automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant