digidem / comapeo-mobile

The next version of Mapeo mobile
GNU General Public License v3.0
5 stars 1 forks source link

Continue syncing when the user navigates to other screens #560

Open gmaclennan opened 1 month ago

gmaclennan commented 1 month ago

Is your feature request related to a problem? Please describe.

Currently sync is stopped when the user navigates away from the sync screen.

This is a change in behavior from Mapeo Mobile, which would continue sync even when the user navigated away from the sync screen.

This can lead to sync being terminated unexpectedly before sync has completed, for all currently syncing devices. Incomplete syncs should not cause errors any more, but they can leave the database in an unexpected state, e.g. some data can be missing, or edits could be missing.

This is a more significant issue when sync is slow, either because of a slow wifi connection, large amounts of data, or slow devices. In QA testing it generally is not an issue because sync is so fast with small amounts of data on a fast connection.

Describe the solution you'd like

Sync should continue when the user navigates away from the sync screen, until it completes, and then it should stop.

Describe alternatives you've considered

The alternative solution for now is for users to remain on the sync screen until sync has stopped.

Additional context

I think this is ok to address post-MVP, but deep-accompaniment and product support teams should be made aware of the requirement to stay on the sync screen until sync has completed.

achou11 commented 1 month ago

would it be sufficient to just remove the offending code for now?

the original reasons for having it were:

ignoring these restores parity with mapeo mobile, which seems like an improvement despite room for additional improvement, at the cost of a relatively small code change.

EDIT: maybe it's more nuanced than that, given the context provided in https://github.com/digidem/comapeo-mobile/issues/561