when you unlink a directory, you later get unlink
ops for its descendants, but there’s an issue that causes you not to get those unlink
ops for the directory’s direct children. as the OT server handles a user’s unlink
op, it removes the document they’re unlinking from all clients’ registered documents. then when the server ops get broadcast, no one gets the direct children unlink
ops because their parent document, i.e. that original unlinked directory, is not in anyone’s registered document sets.
this seems important though. isn’t it how clients learn about what gets deleted according to the server, as clients may have since moved things in/out of that directory that got unlinked.
example:
- load the editor (call this window 1) with the network dev tools open
- create file
b/c.txt
and writehello
- open another editor window of the project (call this window 2)
- window 1: set network throttling to “Offline”
- window 2: delete the
b
directory - window 1: move
b/c.txt
out to the root,c.txt
- window 1: set network throttling to “No throttling”
result: window 1 thinks c.txt
exists, window 2 variously thinks c.txt
doesn’t exist or is empty. typing into c.txt
in window 1 doesn’t save anything in the project and causes script errors in window 2.
p. s. am I allowed to say #coolbugs here