Repository navigation
Never update cell contents from the extension side - #8325
Conversation
| // If cell state changes, then update just the state and the cell data (excluding source). | ||
| // Prevent updates to the source, as its possible we have recieved a response for a cell execution | ||
| // and the user has updated the cell text since then. | ||
| if (this.pendingState.cellVMs[index].cell.state !== cell.state) { |
There was a problem hiding this comment.
I'm a bit confused as to why it was the way it was before. If state was the same we did want to update source?
There was a problem hiding this comment.
Hmm. Not sure why. Maybe for live share? You'd get an update as the user typed?
There was a problem hiding this comment.
Yeah, maybe that was it. I think we commented out part of the lines above when we disabled live share, but not this part. In any case seems good now.
In reply to: 341397570 [](ancestors = 341397570)
Codecov Report
@@ Coverage Diff @@
## master #8325 +/- ##
==========================================
+ Coverage 58.66% 59.01% +0.35%
==========================================
Files 505 505
Lines 22778 23147 +369
Branches 3740 3740
==========================================
+ Hits 13363 13661 +298
- Misses 8522 8593 +71
Partials 893 893
Continue to review full report at Codecov.
|
For #8215
I cannot repro this bug, but the code looks like it might be possible to cause an update. A cell would have to be in the error state when the user typed and executing would have to immediately cause an error. In this situation, the typing that occurred after execution would be lost.
Anyway there's no reason to ever update the source of a cell unless