Skip to content

notebooks: fix check to take simple path in diff operation#273664

Merged
connor4312 merged 1 commit intomainfrom
connor4312/fix-nb-diff
Oct 29, 2025
Merged

notebooks: fix check to take simple path in diff operation#273664
connor4312 merged 1 commit intomainfrom
connor4312/fix-nb-diff

Conversation

@connor4312
Copy link
Member

Noticed this when working on edit sessions, this seems like what the intended behavior should be

Noticed this when working on edit sessions, this seems like what the intended behavior should be
Copilot AI review requested due to automatic review settings October 27, 2025 23:57
@connor4312 connor4312 enabled auto-merge (squash) October 27, 2025 23:57
@connor4312 connor4312 self-assigned this Oct 27, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@vs-code-engineering vs-code-engineering bot added this to the October 2025 milestone Oct 27, 2025
@connor4312 connor4312 merged commit bfdddc0 into main Oct 29, 2025
28 checks passed
@connor4312 connor4312 deleted the connor4312/fix-nb-diff branch October 29, 2025 11:23
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
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Dec 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants