i have a collapsable tree view UI with virtual files and folders which can be simultaneously edited by multiple users. my problem starts when i try to figure out how to deal with cases in which one user action completely override another user action.
for instance: user A decides to remove a folder with all of its contents while user B is editing a file inside that folder.
technically, user B's UI will know that something is wrong only when it tries to save the changes on this file.
how should i tackle this?
disable removing of a folder while it's contents are being edited by another user?
decline saving changes on that file until it is dragged to an existing folder?
both solutions sounds bad and require a lot of infrastructure work to achieve.