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

Add "Typing" message for automatic replies #3029

Open
svenseeberg opened this issue Jan 7, 2025 · 4 comments · May be fixed by #3056
Open

Add "Typing" message for automatic replies #3029

svenseeberg opened this issue Jan 7, 2025 · 4 comments · May be fixed by #3056
Assignees
Labels
Chat good first issue Good for newcomers ready Task Web Affects the web project

Comments

@svenseeberg
Copy link
Member

svenseeberg commented Jan 7, 2025

As long as we expect automatic replies, we should show a placeholder message with 3 dots (...). This is the default indicator that the other side is typing. This message should be shown for about 60s when the last message is a user message. After 60s the message should disappear.

This is not a perfect mechanism but should do the trick in most cases. It will provide a hint to the user that an answer can most likely be expected. We have no good indication (yet?) for the front end that the back end is still working on an answer.

In the long run we probably want to indicate that the back end is actually working on an answer. However, this is only in reach when we merge the chat back end into the Integreat CMS and start implementing websockets.

Additional information

Tracking issue in integreat-chat: digitalfabrik/integreat-chat#120

@svenseeberg
Copy link
Member Author

There is one caveat I "discovered" yesterday: the first response should be ignored as it is returned every time and is returned "quickly". This message usually just says that our bot is going to try to answer.

@lunars97 lunars97 moved this from Next Up to In Review in team-app Jan 29, 2025
@steffenkleinle
Copy link
Member

There is one caveat I "discovered" yesterday: the first response should be ignored as it is returned every time and is returned "quickly". This message usually just says that our bot is going to try to answer.

@svenseeberg can you clarify a little more why we should not display the typing indicator in that case? Our current polling interval is 16s, so the user might have to wait 16s until he gets the automatic message. I think that is not really quick.
Furthermore, I think it is even fine if the typing indicator is only displayed one second until the first message is received, isn't it?

Or do you mean the typing indicator should still be shown after the first automatic response because we are still going to receive the chatbot message?

@svenseeberg
Copy link
Member Author

Or do you mean the typing indicator should still be shown after the first automatic response because we are still going to receive the chatbot message?

Yes the first message, that comes back within seconds, should be ignored. This is always the same boiler plate that is not really relevant.

@svenseeberg can you clarify a little more why we should not display the typing indicator in that case?

The real automatic response takes about 60s. However, the user has no idea how long it will take. Indicating that a message might come back is IMHO useful to keep the user waiting for that amount of time. If no message arrives within 60 or 90s, usually the back end is broken and no automatic answer will arrive (soon).

@steffenkleinle
Copy link
Member

We discussed the topic in person and the result was the following:
There was a slight misunderstanding of the first response should be ignored. While I understood that we don't want to show a typing indicator BEFORE the first automatic message (i.e. after the first user messages), the meaning was that we want to keep showing the typing indicator AFTER the first non-user message (since there should always be one automated standard information message followed by an actual answer).
@lunars97 accordingly, the behavior should be as follows:

  • Show a typing indicator if the last message is written by the user
  • Show a typing indicator if the last message is the FIRST message NOT written by the user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chat good first issue Good for newcomers ready Task Web Affects the web project
Projects
Status: In Review
Development

Successfully merging a pull request may close this issue.

4 participants