Resetting Browser History Eats Work...

When you reset the browser you get logged out, but observable won’t properly recognise this.
It will then continue to allow changes but saving will fail relatively silently, only showing a small message at the very top of the notebook (which you won’t see in long notebooks).

When you then try to download the notebook to make sure that the saves don’t get lost, you get redirected to a different page, nuking everything.

Just lost half a days work…

1 Like

Hi @j-pb. Sorry for the confusion. We’re working on a stronger indication of when changes aren’t being saved to the server.

When Observable can’t reach to the server (as when you’ve signed out), it still saves your changes to localStorage and will save them automatically if you sign-in and visit your notebook again. However, it will not attempt to save these changes if you have made other changes to your notebook in the meantime (say in another browser).

So, you may be able to recover your work by visiting your notebook again, or if that doesn’t work, by checking the contents of your localStorage. If you’d like further assistance with this please reach out to support@.

1 Like

Hm, sadly the local storage wasn’t applied, even though I didn’t change anything else.
Maybe it was nuked by logging back in, not sure.

I’ve managed to rewrite the lost code from memory, and try to see it as an Exercise in Joe Armstrongs philosophy of “write it once, then throw it all out, because you didn’t understand the problem enough the first time, to solved it properly.” :sweat_smile:

1 Like

Perhaps the existing merge UI could be adapted to resolve conflicts between the local version and the saved version?

1 Like

Good idea, yes, we’ve discussed using compare to merge and recover stashed changes. That would handle conflicts and make it less surprising when potentially-obsolete changes are available to recover. However, it’s not trivial to implement and it’s not currently on our roadmap.

Thanks to @j-pb’s report I was able to reproduce and diagnose a bug where stashed changes were lost when visiting a notebook while signed-out. I’ll deploy a fix for that soon I’ve deployed a fix for that, and the redesigned logic should make recovery of stashed changes more reliable. Thanks for the feedback!

3 Likes