notebooks: fix check to take simple path in diff operation#273664
Merged
connor4312 merged 1 commit intomainfrom Oct 29, 2025
Merged
notebooks: fix check to take simple path in diff operation#273664connor4312 merged 1 commit intomainfrom
connor4312 merged 1 commit intomainfrom
Conversation
Noticed this when working on edit sessions, this seems like what the intended behavior should be
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a logic issue in the notebook diff operation's "simple path" check. The code was incorrectly rejecting diff results that contained unchanged cells, even though such results are valid and should use the optimized path.
Key changes:
- Updated the condition that determines whether to take the simple diff path to also accept unchanged cells alongside modified cells
- Updated test expectations to reflect the corrected diff results, where consecutive modified cells are now properly grouped into single diff change entries
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/notebook/common/services/notebookWebWorker.ts | Fixed the condition to accept both 'modified' and 'unchanged' cell types when taking the simple diff path |
| src/vs/workbench/contrib/notebook/test/browser/diff/notebookDiffService.test.ts | Updated test expectations to reflect the corrected behavior where consecutive modified cells are grouped together |
DonJayamanne
approved these changes
Oct 29, 2025
dmitrivMS
pushed a commit
that referenced
this pull request
Oct 29, 2025
Noticed this when working on edit sessions, this seems like what the intended behavior should be
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Noticed this when working on edit sessions, this seems like what the intended behavior should be