Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop delaying ElementCall until the next sync loop and only notify other participants when presumed to already be up to date. #3559

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

stefanceriu
Copy link
Member

We implementing ringing we observed that sometimes notifications were being sent multiple times, causing multiple incoming calls to appear. The reason for that was that the app wasn't necessarily up to date and the call member list wes still unknown.

The fix was to delay the starting of the call until the next sync loop but that in turn made entering an ElementCall slow. We are now reverting that and only, intentionally, sending a notification if the user presses the button and a call is not running yet. We're assuming that the app is already up to date at that point and that the call state is correctly known.

Relates to element-hq/voip-internal/issues/259

…her participants when presumed to already be up to date.
@stefanceriu stefanceriu added the pr-bugfix for bug fix label Nov 26, 2024
@stefanceriu stefanceriu requested a review from pixlwave November 26, 2024 15:45
@stefanceriu stefanceriu requested a review from a team as a code owner November 26, 2024 15:45
Copy link

github-actions bot commented Nov 26, 2024

Warnings
⚠️ Some of the commits are missing ticket numbers. Please consider squashing all commits that don't have a tracking number.
⚠️ You seem to have made changes to views. Please consider adding screenshots.

Generated by 🚫 Danger Swift against 833fa7d

Copy link

codecov bot commented Nov 26, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
876 1 875 0
View the full list of 1 ❄️ flaky tests
PreviewTests test_joinRoomScreen()

Flake rate in main: 28.57% (Passed 10 times, Failed 4 times)

Stack Traces | 4.55s run time
failed - Snapshot "Unknown" does not match reference.

@−
"file:.../__Snapshots__/PreviewTests/test_joinRoomScreen-iPhone-16-en-GB.Unknown.png"
@+
"file:.../tmp/PreviewTests/test_joinRoomScreen-iPhone-16-en-GB.Unknown.png"

To configure output for a custom diff tool, use 'withSnapshotTesting'. For example:

    withSnapshotTesting(diffTool: .ksdiff) {
      // ...
    }

The percentage of pixels that match 0.966095 is less than required 1.0
The lowest perceptual color precision 0.39937502 is less than required 0.98 (.../PreviewTests/Sources/PreviewTests.swift:84)

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Copy link
Member

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

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

Makes sense to me 📲

Comment on lines +582 to +583
// Here we assume that the app is running and the call state is already up to date
presentCallScreen(roomProxy: roomProxy, notifyOtherParticipants: !roomProxy.infoPublisher.value.hasRoomCall)
Copy link
Member

@pixlwave pixlwave Nov 26, 2024

Choose a reason for hiding this comment

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

FWIW, I think it would signal the intent more clearly if notifyOtherParticipants was passed up in the action, having its value derived from context.viewState.hasOngoingCall in the room screen. WDYT?

Copy link
Member Author

@stefanceriu stefanceriu Nov 27, 2024

Choose a reason for hiding this comment

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

Might as well yeah 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay no, I changed my mind. This would need to be passed through from the room, the room details and the user profile screens. I don't think it's worth it. The UserSessionFlowCoordinator is perfectly capable of figuring out what's right here.

Copy link
Member

Choose a reason for hiding this comment

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

Oh interesting, did think about that 👍

@stefanceriu stefanceriu merged commit be8c147 into develop Nov 27, 2024
6 checks passed
@stefanceriu stefanceriu deleted the stefan/elementCallSpeedup branch November 27, 2024 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix for bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants