Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Show connection error message immediately, also during reconnect #2138

Closed
wants to merge 1 commit into from

Conversation

bwindels
Copy link
Contributor

As catchup sync can take quite some time (maybe temporarily even slower with LL)
it can be confusing when you come back to riot after a couple of days and you only see old messages while the first sync is running. If riot didn't get the time to fail /sync 3 times (like when sleeping your laptop), it won't show you anything to indicate your timeline is behind and its reconnecting.

This is probably not the best way to deal with this, as in the laptop wakeup scenario, you might as well have 0 failed syncs but still catchup takes minutes. Looking at how much time there was between the last and new sync might be better, but this sort of does the job for now

Addresses item 6 (We no longer show a spinner when recovering after losing connectivity) of element-hq/element-web#7182

As catchup sync can take quite some time (maybe temporarily even slower with LL)
it can be confusing when you come back to riot after a couple of days and you only see old messages while the first sync is running. If riot didn't get the time to fail /sync 3 times (like when sleeping your laptop), it won't show you anything to indicate your timeline is behind and its reconnecting.

This is probably not the best way to deal with this, as in the laptop wakeup scenario, you might as well have 0 failed syncs but still catchup takes minutes. Looking at how much time there was between the last and new sync might be better, but this sort of does the job for now
@bwindels bwindels requested a review from a team August 28, 2018 07:57
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason for having reconnecting is that the nature of HTTP is that sometimes connections will drop and we'll have to retry, but that's not a problem.

I thought we had the spinner at the bottom when trying to sync, indicating that we're trying to fetch new messages?

@bwindels
Copy link
Contributor Author

@dbkr this is what @ara4n also thought, and that since LL it doesn't show anymore. I just went over it again and can't figure out how that would have ever worked. MessagePanel shows a bottomSpinner when clientSyncState == 'PREPARED', which currently only occurs after initial sync.

I guess a better fix would be to also show the spinner on RECONNECTING, and fix the transition from ERROR to SYNCING to go through PREPARED as the state diagram in client.js says it should.

@bwindels
Copy link
Contributor Author

Closed this in favor of matrix-org/matrix-js-sdk#702

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants