-
Notifications
You must be signed in to change notification settings - Fork 306
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
Handle moved messages in unreads data #901
Comments
The key user-facing scenario where this comes up, which I happened to see again earlier today:
What's happening is that the |
I will work on this next as with #1301 this scenario might come up more often. |
|
TODO explain implementation Fixes: zulip#901 Signed-off-by: Zixuan James Li <[email protected]>
This is similar to how we add support to handling moves for unreads (commit 34e6201), also with optimizations to avoid making unnecessary copies of message IDs when the entire conversation is moved (e.g. resolve/unresolve topic). An alternative approach to this that we didn't take is extracting helpers from handleMessages and handleDeleteMessageEvent and combining the two to handle moves, like web does (https://github.com/zulip/zulip/blob/bd04a30b/web/src/recent_senders.ts#L165-L190), but it appears easier to create a dedicated helper to meet our performance need. Fixes: zulip#901
This is similar to how we add support to handling moves for unreads (commit 34e6201), also with optimizations to avoid making unnecessary copies of message IDs when the entire conversation is moved (e.g. resolve/unresolve topic). An alternative approach to this that we didn't take is extracting helpers from handleMessages and handleDeleteMessageEvent and combining the two to handle moves, like web does (https://github.com/zulip/zulip/blob/bd04a30b/web/src/recent_senders.ts#L165-L190), but creating a dedicated helper makes it more sraightforward to optimize for our performance need. Fixes: zulip#901
The tests do not have to use PerAccountStore, but this setup makes it a bit more integrated. This is similar to how we add support to handling moves for unreads (commit 34e6201), also with optimizations to avoid making unnecessary copies of message IDs when the entire conversation is moved (e.g. resolve/unresolve topic). An alternative approach to this that we didn't take is extracting helpers from handleMessages and handleDeleteMessageEvent and combining the two to handle moves, like web does (https://github.com/zulip/zulip/blob/bd04a30b/web/src/recent_senders.ts#L165-L190), but creating a dedicated helper makes it more sraightforward to optimize for our performance need. Fixes: zulip#901
This is similar to how we add support to handling moves for unreads (commit 34e6201), especially the optimizations to avoid making unnecessary copies of message IDs when the entire conversation is moved (e.g. resolve/unresolve topic). An alternative approach to this is extracting helpers from handleMessages and handleDeleteMessageEvent and combining the two to handle moves, like web does (https://github.com/zulip/zulip/blob/bd04a30b/web/src/recent_senders.ts#L165-L190). Compared to that, creating a dedicated helper (this commit) makes it more straightforward to optimize for our performance needs. (The tests do not have to use PerAccountStore, but this setup makes it a bit more integrated.) Fixes: zulip#901
This is similar to how we add support to handling moves for unreads (commit 34e6201), especially the optimizations to avoid making unnecessary copies of message IDs when the entire conversation is moved (e.g. resolve/unresolve topic). An alternative approach to this is extracting helpers from handleMessages and handleDeleteMessageEvent and combining the two to handle moves, like web does (https://github.com/zulip/zulip/blob/bd04a30b/web/src/recent_senders.ts#L165-L190). Compared to that, creating a dedicated helper (this commit) makes it more straightforward to optimize for our performance needs. (The tests do not have to use PerAccountStore, but this setup makes it a bit more integrated.) Fixes: zulip#901
This is similar to how we add support to handling moves for unreads (commit 34e6201), especially the optimizations to avoid making unnecessary copies of message IDs when the entire conversation is moved (e.g. resolve/unresolve topic). An alternative approach to this is extracting helpers from handleMessages and handleDeleteMessageEvent and combining the two to handle moves, like web does (https://github.com/zulip/zulip/blob/bd04a30b/web/src/recent_senders.ts#L165-L190). Compared to that, creating a dedicated helper (this commit) makes it more straightforward to optimize for our performance needs. (The tests do not have to use PerAccountStore, but this setup makes it a bit more integrated.) Fixes: zulip#901
I've split out the recent-senders part of this issue as its own, M6 post-launch issue #1460, for the reasons at #1418 (comment) . This issue is now purely about the unreads data, which was an M5a launch-blocker issue. It was fixed by #1311. |
With #787 we implemented most of #150, handling moved messages. But as that PR description said:
Then we didn't do that scan.
Places that still need updating on message moves include:
Unreads
(which has a TODO comment for it)→ split to its own issue: Handle moved messages in recent-senders data #1460RecentSenders
(that's one of those recently-merged data structures)RecentDmConversationsView
, but that's only about DMs and those can't be moved.)Related issues:
The text was updated successfully, but these errors were encountered: