Skip to content

Pull notebook diagnostics after cell reorder - #1892

Merged
Dirk Bäumer (dbaeumer) merged 4 commits into
microsoft:mainfrom
mangomac:fix-notebook-reorder-diagnostics
Oct 20, 2026
Merged

Dirk Bäumer (dbaeumer) merged 4 commits into
microsoft:mainfrom
mangomac:fix-notebook-reorder-diagnostics

Conversation

@mangomac

Copy link
Copy Markdown
Contributor

Fixes #1836.

The diagnostic feature ignored structure.array changes, so reordering notebook cells did not trigger a new pull. With interFileDependencies enabled it now pulls after a structure change.

Tests: a new client-node-tests case moves a cell and asserts a pull happens. I also set interFileDependencies: true in fullNotebookServer. Before the change the suite was 214 pass / 1 fail, after it is 215 / 0. Only the client package was tested; the browser and other packages were not run.

Note: this pulls all matching cells and could be narrowed. It does not change the 500ms delay discussed in #1837.

@mangomac

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

Copilot AI balanced review requested due to automatic review settings October 19, 2026 14:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Structural refreshes duplicate newly opened cell requests, and the regression test can pass on unrelated pulls.

2 open issues
What changed in this PR

Refreshes notebook diagnostics after cell reordering to address #1836, without changing the scheduler delay discussed in #1837.

Changes:

  • Pulls matching cells after structural changes when inter-file dependencies are enabled.
  • Enables that capability in the test server and adds a reorder regression test.

Verification here was limited to source inspection; no tests were run.

File Description
client/​src/​common/​diagnostic.ts Adds diagnostic pulls after notebook structure changes.
client-node-tests/​src/​servers/​fullNotebookServer.ts Enables inter-file diagnostic dependencies.
client-node-tests/​src/​integration.test.ts Adds a cell-reorder regression test.

Review effort: Balanced

Comment thread client-node-tests/src/integration.test.ts Outdated
Comment thread client/src/common/diagnostic.ts

@dbaeumer Dirk Bäumer (dbaeumer) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

mango (@mangomac) see copilot review

Signed-off-by: mangomac <333602023+mangomac@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 19, 2026 14:42
@mangomac

Copy link
Copy Markdown
Contributor Author

Pushed ff03c87 to address the review notes.

  • diagnostic.ts: on cell insert or replace, the same cell could be pulled twice (once from the opened-cells loop, once from the structure loop). The structure loop now skips URIs that were already pulled in that pass.
  • integration.test.ts: the reorder test now settles first, resets the recorded pulls, moves the cell, and polls (bounded, 3s) until the moved cell's URI shows up as pulled, instead of asserting that any pull happened after a fixed delay.

Caveat: I compiled the two files, but the VS Code integration tests need the electron host and I could not run them locally, so that part is untested. CI will be the first real run.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused fix preserves capability gating and existing request patterns, with regression coverage and no identified blocking issues.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 20, 2026 06:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused change follows existing diagnostic-pull handling, includes regression coverage, and has no identified blocking issues.

No open issues 🎉

Review effort: Balanced

@dbaeumer
Dirk Bäumer (dbaeumer) enabled auto-merge (squash) October 20, 2026 07:43
@dbaeumer
Dirk Bäumer (dbaeumer) merged commit c049c9e into microsoft:main Oct 20, 2026
8 checks passed
@dbaeumer Dirk Bäumer (dbaeumer) added this to the 3.18.5 milestone Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notebook cell reordering does not invalidate pulled diagnostics

5 participants