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

StartedTyping signaling message is send for each keystroke #9548

Closed
SystemKeeper opened this issue May 14, 2023 · 4 comments · Fixed by #9603
Closed

StartedTyping signaling message is send for each keystroke #9548

SystemKeeper opened this issue May 14, 2023 · 4 comments · Fixed by #9603
Labels
0. Needs triage bug feature: chat 💬 Chat and system messages feature: frontend 🖌️ "Web UI" client feature: signaling 📶 Internal and external signaling backends
Milestone

Comments

@SystemKeeper
Copy link
Contributor

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Type something in the chat input and observer the signaling messages being send

Expected behaviour

As far as I understood, we should send one startedTyping signaling message to each participant (and to each newly joined participant in case we are still typing) and after a timeout (or sending the chat message) send a stoppedTyping to all participants. This means as long as we are continuously typing, we only ever get one startedTyping signaling message.

Actual behaviour

A signaling message is send each time the chat input changes, e.g. for each keystroke.

So either this is a bug on web or we should make this behavior more clear as this will 1.) interfere with the current talk-ios implementation and 2.) not work like this on talk-ios.

Talk app

Master on sermo

@SystemKeeper SystemKeeper added 0. Needs triage bug feature: chat 💬 Chat and system messages feature: signaling 📶 Internal and external signaling backends feature: frontend 🖌️ "Web UI" client labels May 14, 2023
@SystemKeeper SystemKeeper added this to the 💙 Next RC (27) milestone May 14, 2023
@nickvergessen
Copy link
Member

@Antreesy is on vacation.

@ShGKme can you have a look maybe?

@SystemKeeper
Copy link
Contributor Author

SystemKeeper commented May 15, 2023

In general the question is if we can assume that for each startedTyping we receive at least/at most one stoppedTyping.
See also questions at #9272 (comment).
Should typing indicators be tracked by userid? Or by session? If we receive 2 times startedTyping from user1 and then 1x stoppedTyping from user1 should the typing indicator be hidden for that user or do we wait for the second stoppedTyping message to arrive?

@nickvergessen
Copy link
Member

I think it's somehow sensible to resend the typing, so that if connection is lost, you can ignore old typings after some seconds.
But shouldn't happen on each keystroke I guess. maybe some delay like once per second?

@Antreesy
Copy link
Contributor

Antreesy commented May 15, 2023

https://github.com/nextcloud/spreed/blob/master/src/components/NewMessage/NewMessage.vue#L387

if (!this.typingTimeout) { 
    this.$store.dispatch('setTyping', { typing: true }) 
} 
clearTimeout(this.typingTimeout)

Something similar to this should be enough to prevent sending extra signals, when timeout is still set, and start it again

Plus additional clearTimeout, when sending a stopTyping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage bug feature: chat 💬 Chat and system messages feature: frontend 🖌️ "Web UI" client feature: signaling 📶 Internal and external signaling backends
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants