dionmunk / vscode-notes

Notes is a Markdown focused notes extension for Visual Studio Code that takes inspiration from Notational Velocity and nvAlt.
https://marketplace.visualstudio.com/items?itemName=dionmunk.vscode-notes
Other
63 stars 18 forks source link

Notes didn't save - data lost #12

Closed stevage closed 3 years ago

stevage commented 3 years ago

I have now twice experienced a (pretty terrible) situation where I "saved" notes, and later found they were not saved. I don't know why, I'm just going to find a different product.

My setup:

In the first case, I had saved some notes to a file. Added some more notes (and, I assume saved, but may have just left the window open as I often do in VS Code). A few days later I came back, discovered that the later batch of notes was missing. (I'm not sure which of the two computers above this was on)

In the second case, I started a new file. Added some notes. (On the second computer). Almost certain I pressed the save button. Next day I come back (on the other computer), the notes file is there, it has the auto generated headline, no content.

I don't know what went wrong, whether this is an issue with the Notes extension, VS Code, or even Dropbox, but the end result is pretty bad. (I don't think I've ever lost data in VS Code before, even when I have taken notes in an unnamed and never-saved text file, it's still accessible even after the computer crashed and rebooted.)

stevage commented 3 years ago

Ok, I think I have established the problematic use case:

  1. Add notes to mynotes.md on machine A. Save.
  2. Add more notes to mynotes.md on machine A. Don't save. Leave it open.
  3. Add more notes to mynotes.md on machine B. Save.
  4. (Notes are not loaded on machine A, because there are unsaved changes)
  5. Add more notes on machine A. Save.
  6. (Notes written on machine B are lost forever.)

I don't know if this is something this extension can address. But solutions might look like:

dionmunk commented 3 years ago

Interesting. It sounds like two things would have helped in your situation:

  1. Some sort of autosave feature.
  2. Periodically checking to see if a note has been changed in the background and prompting the user to save/reload/merge the note. I'll look into what I could do to possibly add these features.
stevage commented 3 years ago

Hmm, normally you get a warning like this:

Screen Shot 2021-03-26 at 2 55 00 pm

I'm really not sure what was different to cause that behaviour not to happen. When I try to replicate it now, I get that warning at step 5.

dionmunk commented 3 years ago

I'm going to say this issue is resolved. It looks like VSCode has been updated to have smarter file handling.