Skip to content

[Bug fix] CallId switch losing participants fix#5725

Merged
dmceachernmsft merged 10 commits intomainfrom
dmceachernmsft/callid-fix
Mar 27, 2025
Merged

[Bug fix] CallId switch losing participants fix#5725
dmceachernmsft merged 10 commits intomainfrom
dmceachernmsft/callid-fix

Conversation

@dmceachernmsft
Copy link
Copy Markdown
Member

What

Fix issue where useAdaptedSelector is using a stale callId when the callId updates in the call when joining a group call

Why

Resolves an issue where the participant loses the other people in the call until the next state change in the adapter

https://skype.visualstudio.com/SPOOL/_workitems/edit/4005860

How Tested

Validated locally

return;
}
const newProps = selector(adaptState(state), selectorProps ?? callConfigProps);
const newProps = selector(adaptState(state), selectorProps ?? { callId: state.call?.id });
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I assume it's ok { callId: state.call?.id } will be a new object each time selector is called, but perhaps we should check that selector from reselect doesn't require the props to be memoized

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Looking at their docs for create selector it does not seem that they need anything to be memoized. they have lots of options to memoize the selector though
https://reselect.js.org/api/createSelector

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just verified this, put a console log inside the if (propRef.current !== newProps) { (and one in an else to that) and validate there is no difference if a cached { callId } is used vs creating the callId object each pass 👍

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 20, 2025

@azure/communication-react jest test coverage for stable.

Lines Statements Functions Branches
Base 29300 / 46001
63.69%
29300 / 46001
63.69%
808 / 1476
54.74%
2407 / 3826
62.91%
Current 29300 / 46001
63.69%
29300 / 46001
63.69%
808 / 1476
54.74%
2407 / 3826
62.91%
Diff 0 / 0
0%
0 / 0
0%
0 / 0
0%
0 / 0
0%

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 20, 2025

@azure/communication-react jest test coverage for beta.

Lines Statements Functions Branches
Base 58476 / 94476
61.89%
58476 / 94476
61.89%
1180 / 2698
43.73%
3536 / 5834
60.61%
Current 58444 / 94470
61.86%
58444 / 94470
61.86%
1180 / 2698
43.73%
3495 / 5813
60.12%
Diff -32 / -6
-0.03%
-32 / -6
-0.03%
0 / 0
0%
-41 / -21
-0.49%

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

@dmceachernmsft dmceachernmsft enabled auto-merge (squash) March 27, 2025 15:58
@github-actions
Copy link
Copy Markdown
Contributor

CallWithChat bundle size is not changed.

  • Current size: 12401048
  • Base size: 12401048
  • Diff size: 0

@github-actions
Copy link
Copy Markdown
Contributor

Calling bundle size is not changed.

  • Current size: 12401036
  • Base size: 12401036
  • Diff size: 0

@github-actions
Copy link
Copy Markdown
Contributor

Chat bundle size is not changed.

  • Current size: 1775237
  • Base size: 1775237
  • Diff size: 0

@github-actions
Copy link
Copy Markdown
Contributor

@dmceachernmsft dmceachernmsft merged commit 013de1f into main Mar 27, 2025
41 checks passed
@dmceachernmsft dmceachernmsft deleted the dmceachernmsft/callid-fix branch March 27, 2025 16:13
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.

3 participants