tutao / tutanota

Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.
https://tuta.com
GNU General Public License v3.0
6.1k stars 525 forks source link

Swiping to delete email on mobile may cause other connected clients to mark different email as read #3691

Open Kingwad opened 2 years ago

Kingwad commented 2 years ago

Bug in web app

Describe the bug Swiping to delete/archive an email directly above an unread email may cause the unread message to be marked as read, without displaying the email on screen, so never actually reading it.

This one took me a while to figure out the reproduction steps, as it seemed to only intermittently occur. The key was when I realized it required two clients signed in and viewing the Inbox, in my case the desktop app and the mobile app.

To Reproduce Steps to reproduce the behavior:

First, create the inital conditions required to trigger the bug

  1. Have at least two emails in the inbox, the second of which is unread.
  2. Open the desktop client on your computer.
  3. Open the first of the email from step 1 on the desktop client.
  4. (Optional, but included to slightly increase the severity of the issue) Minimize the desktop client so it can not be seen.

Now that the conditions are setup, trigger the bug

  1. Open the Mobile client on your phone.
  2. From the Inbox list, swipe to delete or archive the first email (the one that is open on the desktop client and above the unread email)
  3. (At this point on the desktop client, the selected email is deleted and the client automatically opens the next email, but if you minimized it in step 4, or if you are even in another location entirely, this is entirely invisible and not actually displayed anywhere.)
  4. Watch as the unread indicator disappears from the unread email on the mobile client.

Expected behavior When one email is modified (deleted) on one client, other connected clients should not automatically change the status of other email (read). Perhaps on remote modification of the email list that removes the current email, select no mail instead of the next one.

Screenshots Video from mobile's viewpoint. The email with the subject "Second email" is open in a minimized desktop client on a different machine. video

Desktop (please complete the following information):

Smartphone (please complete the following information):

charlag commented 2 years ago

@Kingwad thanks for reporting. I guess this happens because another client that is open will automatically select the next email. I guess we could avoid doing that if there was no active action by the user