insanum / sncli

Simplenote CLI
MIT License
397 stars 34 forks source link

Opening sncli pushes last seen version of note #104

Open sshaikh opened 3 years ago

sshaikh commented 3 years ago

This may be user error but:

1) Open sncli, edit or make a note (v2) and close by pressing qq. 2) Open SN elsewhere (say mobile), make changes to note (v3). Verify this is seen on third client (eg PC). 3) Open sncli. This pushes v2 back up, overwriting v3 (or the latest note if others have been made) with a version of v2 (although it may actually be a new version that looks like v1)

Interestingly I still see v2 in the note history, albeit with a later date than the latest (copy of v1) note. So I currently have something like the following in my history for a note subject to this:

v1@t1 (initial note) v2@t2 (edited in sncli) v3@t3 (edited on mobile) . v6@t6 (edited on mobile) v2@t2 (created automatically on opening sncli since its last edit) v6@t6 (manually reverted using mobile UI)

At this point, closing and reopening sncli shows v6.

I suspect I (or the app?) isn't cleaning up properly at some stage, although I'm not entirely sure what I should change in my workflow to ensure safe updates.

If it helps I also see a few "precondition failed" errors in the log which don't go away.