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

#Mail: Deleted messages reappear momentarily with local index #1604

Open
gtandersen opened this issue Oct 9, 2024 · 2 comments
Open

#Mail: Deleted messages reappear momentarily with local index #1604

gtandersen opened this issue Oct 9, 2024 · 2 comments
Labels
bug Something isn't working P1-urgent Priority urgent
Milestone

Comments

@gtandersen
Copy link
Contributor

Describe the bug
When deleting a (significant) number of messages while using the local index, they disappear momentarily and then reappear until the messages have been deleted on the server (?).

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://runbox.com/app and ensure the local index is in use
  2. Click to select a (large) number of messages
  3. Click to delete
  4. Observe that the messages disappear for then to reappear, and then finally disappear again

Expected behavior
The messages should immediately disappear for good.

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Firefox
@gtandersen gtandersen added bug Something isn't working P1-urgent Priority urgent labels Oct 9, 2024
@gtandersen gtandersen added this to the Nanna milestone Oct 9, 2024
@gtandersen
Copy link
Contributor Author

See also #1555

@castaway
Copy link
Contributor

castaway commented Oct 9, 2024

This appears to be a timing issue: When running user changes (eg deleting messages), we ask the index worker to delete the data locally (from the browser copy of the index), which persists the changes to the indexdb, notifies the main thread to reload its copy of the index, which then redraws the list (so they disappear), while asking the api to delete the actual messages, which will eventually trigger an index update with the message removal from the backend.

This is while regular index updates are happening, so things may interleave rather than happen sequentially, so some of the messages (not always all of them!) reppear briefly, then disappear again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1-urgent Priority urgent
Projects
None yet
Development

No branches or pull requests

2 participants