After https://github.com/eclipse-theia/theia/issues/13488, I've noticed a few issues in incorrect caching of notebook cells. Mostly related to them staying in storage for too long, thereby overriding new cells. This is mostly related to:
Missing calls to $acceptEditorsAndDocumentsDelta when creating new notebook cell editors
Dangling monaco-model references after calling createTextModelsForNotebook
Dangling monaco-model references after disposing a cell model
How to test
I've been pretty successful in reproducing the behavior on master by:
Opening an existing notebook file
Adding a few new code cells to the start of the file
Closing the notebook file again
Opening it again
On master the new code cells contain content of other, existing code cells (this seems to happen almost at random, though it is consistent). This change should produce empty cells after opening the notebook again.
Furthermore, reviewers should test that cell execution on newly created cells works as expected (to test the newly added call to $acceptEditorsAndDocumentsDelta).
Review checklist
[x] As an author, I have thoroughly tested my changes and carefully followed the review guidelines
What it does
After https://github.com/eclipse-theia/theia/issues/13488, I've noticed a few issues in incorrect caching of notebook cells. Mostly related to them staying in storage for too long, thereby overriding new cells. This is mostly related to:
$acceptEditorsAndDocumentsDelta
when creating new notebook cell editorscreateTextModelsForNotebook
How to test
I've been pretty successful in reproducing the behavior on
master
by:On
master
the new code cells contain content of other, existing code cells (this seems to happen almost at random, though it is consistent). This change should produce empty cells after opening the notebook again.Furthermore, reviewers should test that cell execution on newly created cells works as expected (to test the newly added call to
$acceptEditorsAndDocumentsDelta
).Review checklist
Reminder for reviewers