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

UX : Restarting the mobile apps makes PMs disappear for a second or two #4006

Closed
manavmehta opened this issue Mar 27, 2020 · 7 comments
Closed
Labels
a-data-sync Zulip's event system, event queues, staleness/liveness

Comments

@manavmehta
Copy link

manavmehta commented Mar 27, 2020

Restarting the mobile app results in Private Messages being disappeared for a couple of frames showing 'No recent conversations'. Although that exists for a short span, it affects the user experience

OS : Android 8.1, iOS 12.4.5

Clear steps to reproduce the issue (from @ray-kraesig in the chat thread):

1.first, while the app is loading, the banner is present, my existing conversations are shown;

  1. The banner disappears, and the PMs display switches to "No recent conversations" for only a frame or two;

  2. The conversations come back.

Relevant screenshots:

android
iOS

@gnprice
Copy link
Member

gnprice commented Mar 28, 2020

Thanks @manavmehta for the report!

In the description you quoted from @ray-kraesig , the "No recent conversations" lasts for just a couple of frames -- which means for less than a tenth of a second.

How long does that situation last for you? Is it also that fast, or does it last longer?

I'm asking partly because you didn't mention having any trouble getting these screenshots. 😉 Doing that would take some excellent timing, like playing a hard video game, if it's as quick for you as Ray reported it is for him.

@gnprice gnprice added the a-data-sync Zulip's event system, event queues, staleness/liveness label Mar 28, 2020
@gnprice
Copy link
Member

gnprice commented Mar 28, 2020

Also, here's the diagnosis I posted in that chat thread:


@ray-kraesig said:

  • then the banner disappears, and the PMs display switches to "No recent conversations" for only a frame or two;

Aha, I think I see why. This was a good clue for pinpointing it. 🙂 It's this sequence in doInitialFetch in fetchActions.js:

  dispatch(initialFetchComplete());
  // ...
  dispatch(fetchPrivateMessages());

And the PM conversations screen relies not on the data we get from /register -- which we've completed fetching by the time we do that initialFetchComplete -- but on the data we get listing specific recent PMs, in fetchPrivateMessages.

And the loading banner (#3901) relies on the flag cleared by initialFetchComplete.

I think the right way to fix this will be to use the recent_private_conversations feature of the server API, described in #3133.

There was a PR for this, #3535. It made substantial progress, but then stalled because the author's summer ended (they were doing GSoC) and they got busy back at school.

@gnprice
Copy link
Member

gnprice commented Mar 28, 2020

Marking this as blocked on #3133 . When that's fixed, we should come back and look at this issue -- I expect it will have been fixed by the same change that fixes #3133.

@gnprice gnprice added the blocked on other work To come back to after another related PR, or some other task. label Mar 28, 2020
@manavmehta
Copy link
Author

@gnprice though it was a 'couple' of frames that made it last for me for about a second, so yeah not just one or two frames :P

@rk-for-zulip
Copy link
Contributor

@gnprice though it was a 'couple' of frames that made it last for me for about a second, so yeah not just one or two frames :P

And to confirm, for me it really was "only a frame or two" (i.e., under 100ms). Greg's explanation implies this timespan would be Internet-connection-speed-dependent, though, so this doesn't seem too mysterious a discrepancy.

I think the right way to fix this will be to use the recent_private_conversations feature of the server API, described in #3133.

Agreed on that being the right fix.

If we need something sooner (say, if the visibility of this bug turns out to be higher than we currently think, or #3133 turns out to have unforeseen complications), a reasonable temporary fix would be to show a spinner in place of "No recent conversations" on the PMs screen until fetchPrivateMessages has concluded.

@WesleyAC WesleyAC removed the blocked on other work To come back to after another related PR, or some other task. label Apr 6, 2021
@WesleyAC
Copy link
Contributor

WesleyAC commented Apr 6, 2021

Removing "blocked on other work" label, since #3133 appears to be fixed.

@WesleyAC
Copy link
Contributor

WesleyAC commented May 9, 2021

I don't see this anymore, I presume #4392 fixed it. If anyone is still seeing this on a modern server and app, please file a new issue.

@WesleyAC WesleyAC closed this as completed May 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-data-sync Zulip's event system, event queues, staleness/liveness
Projects
None yet
Development

No branches or pull requests

4 participants