In https://github.com/jupyterlab/jupyterlab/pull/16498 JupyterLab will handle cell outputs in a better way. Previously, the assumption was that only the frontend could modify a document (apart from the initial loading), but with server-side execution this is not true anymore. Thus changes to the Y model must be observed and modelDB must be changed accordingly. But in turns, changes to modelDB must also be applied to the Y model, so in order to break this circular dependency, we must use Yjs's origins to not apply a change initiated by modelDB to modelDB again.
In this PR, the origin that identifies a change from modelDB is the string "modeldb". A change with this origin will not emit a change signal.
In https://github.com/jupyterlab/jupyterlab/pull/16498 JupyterLab will handle cell outputs in a better way. Previously, the assumption was that only the frontend could modify a document (apart from the initial loading), but with server-side execution this is not true anymore. Thus changes to the Y model must be observed and modelDB must be changed accordingly. But in turns, changes to modelDB must also be applied to the Y model, so in order to break this circular dependency, we must use Yjs's origins to not apply a change initiated by modelDB to modelDB again. In this PR, the origin that identifies a change from modelDB is the string
"modeldb"
. A change with this origin will not emit a change signal.