Open gmaclennan opened 3 months ago
I think a timeout of 2-5 minutes should be sufficient for other devices to join the "sync party". I think maybe the timeout should start when sync starts, rather than when it finishes.
just for clarity, are you suggesting that this timeout should be handled client-side? the sync start method exposes an option for a timeout, but I believe it's applied to when you're no longer receiving new data
Syncing should stop after a timeout has elapsed from when syncing is complete.
ah missed this initial note, although this seems to somewhat conflict with the previous one I referred to 🤔
My apologies, I have edited my comment about the timeout being from when sync starts.
Thanks for the share to the sync.start() method - I got caught be my browser autocompleting to a previous commit of mapeo-core-next and I couldn't find that autostopDataSyncAfter
method.
I've refined the issue to be specific about the tech tasks.
Is your feature request related to a problem? Please describe.
Currently, once a user has started syncing, and sync completes, the only way to stop syncing with any additional devices is to navigate away from the sync screen.
Example workflow:
Users may find this behaviour unexpected. This becomes a bigger issue if we do not stop sync when the user navigates away from the sync screen (see #560), because there is then no way for the user to ever stop syncing.
Describe the solution you'd like
Syncing should stop after a timeout has elapsed from when syncing is complete.
The timeout is important because sync can be fast, and if it stops as soon as it completes it can restrict the ability of others to also sync. Example scenario:
I think a timeout of 2-5 minutes should be sufficient for other devices to join the "sync party". From the users perspective: anyone wanting to join a sync party needs to start syncing within 2-5 minutes of each other.
I think this will also require additional UX to enable users to manually stop syncing before the timeout. Currently the user can only stop sync before sync is complete, but when sync is complete, there is no way to stop it.
Describe alternatives you've considered
The current implementation (continue syncing until the user navigates away from the screen) is ok for now, since this issue will only affect users who remain on the sync screen after sync has complete and unexpected sync with additional devices.
Once #560 has been addressed, this issue will become more pressing.
Design tasks
Coding tasks
autostopDataSyncAfter
option.