Earde

What should happen to local drafts when a remote document is deleted?

by u/tolwiz[MOD][ADMIN]1 mo ago5 comments
ight now the reconnect path assumes the remote document still exists. I think a local draft should survive deletion as a recoverable copy instead of disappearing when synchronization resumes.
// 5 comments
Log in to join the discussion.
u/ansuzgardraiwo 1 mo ago
I strongly prefer preserving the draft locally. Remote deletion should remove the shared document, not destroy text the user still has in an unsynchronized editor.
u/tolwiz[MOD][ADMIN] OP 1 mo ago
Same. I’m thinking the editor should detach from the deleted document and reopen the local state as a recovery draft with a clear warning that it is no longer synchronized.
u/tolwiz[MOD][ADMIN] OP 1 mo ago
That also avoids inventing conflict semantics for an object that no longer exists remotely. Treat it as a new local document and let the user explicitly decide whether to save or discard it.
u/ansuzgardraiwo 1 mo ago
The important part is that reconnect must not silently clear the editor before the deletion state is surfaced. Recovery can be simple as long as the content survives.
u/tolwiz[MOD][ADMIN] OP 1 mo ago
I’ll add a regression case for delete-while-offline: local edits survive reconnect, synchronization stops, and the UI offers recovery instead of replacing the buffer.