Skip to content

Conversation

seeM
Copy link
Contributor

@seeM seeM commented Oct 8, 2025

This PR integrates Positron notebook editors with the extension API, addresses #9440. This is a more focused alternative to #9709.

Release Notes

New Features

  • N/A

Bug Fixes

  • N/A

QA Notes

Nothing should break. I'll follow up with another PR that adds cell debugging to Positron notebooks which will make it possible to QA this functionality.

@:notebooks

@seeM seeM requested a review from nstrayer October 8, 2025 16:08
@seeM seeM marked this pull request as ready for review October 8, 2025 16:08
@seeM seeM force-pushed the feature/positron-nb-extension-api branch from a115b59 to 9fa2fec Compare October 8, 2025 16:42
Copy link

github-actions bot commented Oct 8, 2025

E2E Tests 🚀
This PR will run tests tagged with: @:critical @:notebooks

readme  valid tags

Copy link
Contributor

@nstrayer nstrayer left a comment

Choose a reason for hiding this comment

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

Code looks great.

The adapter raises lots of questions about how we can/should update the base implementation to make this translation easier (as long as it doesn't make the main implementation more complicated.)

// Get all Positron notebook instances
const instances = new Map<string, IPositronNotebookInstance>();
for (const instance of this._positronNotebookService.listInstances()) {
if (instance.textModel) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wont this always be true because textModel is an observable? Should it be instance.textModel.get()?

super.dispose();
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/**
* Extracts the Positron notebook instance from a generic editor pane, if it contains one.
*
* The workbench editor service deals with generic `IEditorPane` objects that could
* represent any type of editor (text, notebook, diff, etc.). When integrating Positron notebooks
* with the extension API, we need to identify which editor panes contain Positron notebooks.
*
* @returns The notebook instance if the pane is a Positron notebook editor, undefined otherwise
*/

I found myself needing to look at this to get context so a docstring may help.

@seeM seeM closed this Oct 9, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2025
@seeM seeM deleted the feature/positron-nb-extension-api branch October 9, 2025 14:56
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.

2 participants