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

Immediately mark a conversation as "read" when switching browser tabs and seeing the message in Expensify.cash #2573

Closed
isagoico opened this issue Apr 26, 2021 · 14 comments · Fixed by #2699
Assignees
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement. Reviewing Has a PR in review

Comments

@isagoico
Copy link

isagoico commented Apr 26, 2021

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Expected Result:

If someone writes you a direct message (DM) while you are in another browser tab and you switch to the Expensify.cash browser tab (to view the message), it should appear as "read" in the Left Hand Nav if you land in the DM chat.

Actual Result:

When you switch to the Expensify.cash browser tab and land directly in the DM chat, the message shows as "unread" for 3 seconds, even though you are clearly viewing it.

Action Performed:

  1. Open Expensify.cash in browser tab A
  2. Create a chat with person X and stay in that chat DM (i.e, don't select another chat DM)
  3. Open some other browser tab B and stay on that page
  4. Have person X write you a message in Expensify.cash (ie, to make chat X unread in the DM)
  5. Switch back to browser tab A
  6. Note that chat X doesn't get marked as "read", even though you land in the chat DM directly

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Yes, you can still use the application but this negatively impacts unread DM accuracy.

Platform:

Where is this issue occurring?

Web ✔️
iOS
Android
Desktop App
Mobile Web

Version Number: Latest, accessed from Expensify.cash web browser

Notes/Photos/Videos:

Grabando.182.mp4

Expensify/Expensify Issue URL: https://github.com/Expensify/Expensify/issues/162219

View all open jobs on Upwork


From @quinthar https://expensify.slack.com/archives/C01GTK53T8Q/p1619202674082700

ISSUE: On desktop web, when you switch back to a tab on an unread chat, the chat doesn't get marked as unread until you navigate away and back. I would think it should become read automatically upon coming into the foreground.

@isagoico isagoico added the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Apr 26, 2021
@MelvinBot
Copy link

Triggered auto assignment to @MitchExpensify (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@MelvinBot MelvinBot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Apr 26, 2021
@MitchExpensify MitchExpensify added Improvement Item broken or needs improvement. Weekly KSv2 Engineering labels Apr 27, 2021
@MelvinBot
Copy link

Triggered auto assignment to @tgolen (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@MitchExpensify
Copy link
Contributor

MitchExpensify commented Apr 27, 2021

Looks unique and clear to me. Probably a good external issue, adding eng label to decide that!

@tgolen
Copy link
Contributor

tgolen commented Apr 27, 2021

Yeah, external sounds fine and all is good here.

@tgolen tgolen added the External Added to denote the issue can be worked on by a contributor label Apr 27, 2021
@MelvinBot
Copy link

Triggered auto assignment to @michaelhaxhiu (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@michaelhaxhiu
Copy link
Contributor

Oopsie, I didn't realize this was waiting on me! I thought for some reason it was being worked on by @MitchExpensify because he was assigned too.

Sorry, posting this shortly.

@michaelhaxhiu michaelhaxhiu changed the title Conversation is not marked as unread when navigating from another tab and back Conversation is not marked as "read" when switching browser tabs and seeing the message in Expensify.cash May 4, 2021
@michaelhaxhiu
Copy link
Contributor

Cleaned up a few tiny things in the GH title and body. Next steps:

  • Make E/E issue for tracking purposes
  • Post to Upwork, and provide daily updates

@parasharrajat
Copy link
Member

Just to be sure. I see that the message is marked as read in some time. So when the user is away we want to show a notification and keep the message unread as the user has not viewed it even if the tab is active. When user focuses the tab we trigger the last read timer which takes 3 sec before marking the messages as read. Is this no happening currently? Sorry, I am not able to understand the issue here.

@michaelhaxhiu

This comment has been minimized.

@michaelhaxhiu
Copy link
Contributor

michaelhaxhiu commented May 4, 2021

Ok, so I just tested this on my side and see what you are saying @parasharrajat. After 3 seconds of focusing on the tab, the DM updates and it appears as "read" properly. Check out my DM with Ted for reference:

54124

Hmm, so I think the question at this point is... do we want to shorten the 3 second timing? Otherwise, this does appear to be working properly.

cc @quinthar

@Gonals Gonals assigned Gonals and michaelhaxhiu and unassigned tgolen and michaelhaxhiu May 5, 2021
@Gonals
Copy link
Contributor

Gonals commented May 5, 2021

I'll grab this, since I plan to touch that code anyways 🤷

@michaelhaxhiu michaelhaxhiu changed the title Conversation is not marked as "read" when switching browser tabs and seeing the message in Expensify.cash Immediately mark a conversation as "read" when switching browser tabs and seeing the message in Expensify.cash May 5, 2021
@michaelhaxhiu michaelhaxhiu removed their assignment May 5, 2021
@michaelhaxhiu michaelhaxhiu added Daily KSv2 and removed Weekly KSv2 labels May 5, 2021
@michaelhaxhiu
Copy link
Contributor

Changing to Daily per the standard process.

@Gonals
Copy link
Contributor

Gonals commented May 5, 2021

PR created. I'm going to hold it until the mark as unread one merges (which should be soon), since that one removes a related function.

@michaelhaxhiu
Copy link
Contributor

Good call.

@Gonals Gonals added the Reviewing Has a PR in review label May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement. Reviewing Has a PR in review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants