Persistency of unsaved edits (autosave?)
On reloading the browser tab, the current data file is reloaded back at t0 and all the edits are lost. Basically, the app totally resets its state, although in some circumstancies the metadata appear "polluted" by the pre-reload state (an issue should be opened about this unexpected exception).
Problem: As a browser tab can be unexpectedly closed for a number of reasons, data may be lost quite often.
We need some degree of persistency, especially for the manual labels. There are several approaches:
Proposal 1: Implement a full-blown history of user actions. This could also allow undoing the user actions. For the purpose of the present discussion, the idea would be to replay the history. The history is actually implemented, and most user actions are stored in a stack of "transactions" (that stick to the user action level, abstracting away the lower-level operations on the software model). However, undoing/redoing such transactions is not implemented, and this is going to be a tough task; expect loads of bugs.
Proposal 2: Make much of the state of the app persistent, storing all the controllers outside the "session" (but in a way bound to the client). This is probably the best compromise for the purpose of preventing data loss.
Proposal 3: Autosave the manual labels in a file cache, and make persistent the path to this temporary file (and the cache) so that data could be recovered even in case of complete server shutdown. Only the list of active labels and the manually assigned tags would be properly recovered, though. This is not a complete answer, but would be nice to have anyway.
We will also have to define test scenarios, because any proposal is a major feature, to be incrementally improved over time.