Use cellHandle instead of index when talking to output webview #14649
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What it does
Now using cellHandle instead of index when "talking" to the output webview. The reason is that in some cases (cell deletion) there is no way to identify a visible cell to the corresponding start index as the notebook no longer contain this cell.
Doing so, we also align
cellsSpliced
to existingcellMoved
webview communication channel, that already uses handles instead of ids.How to test
Open a notebook with many cells that has output. Delete some cell in the middle. Check that there are any old/overlapping outputs.
Follow-ups
Breaking changes
Attribution
Review checklist
Reminder for reviewers