This is a missing adoption when notebooks became floating window capable. Notice how the status bar entry appears in the main window and not the floating window:
We have had a similar issue with the text editor status bar and solved it by instantiating it per-window:
I think a similar approach would work for notebooks too.
The key for this to work is that you get a scoped IEditorService in the onDidCreateAuxiliaryEditorPart that allows you to listen only to editor change events in the respective window. Consequently, you use a main-window scoped editor service for the main-window status bar:
This is a missing adoption when notebooks became floating window capable. Notice how the status bar entry appears in the main window and not the floating window:
We have had a similar issue with the text editor status bar and solved it by instantiating it per-window:
https://github.com/microsoft/vscode/blob/b41db6119374a19f030f194ac859733a95eb7009/src/vs/workbench/browser/parts/editor/editorStatus.ts#L895-L904
I think a similar approach would work for notebooks too.
The key for this to work is that you get a scoped
IEditorService
in theonDidCreateAuxiliaryEditorPart
that allows you to listen only to editor change events in the respective window. Consequently, you use a main-window scoped editor service for the main-window status bar:https://github.com/microsoft/vscode/blob/b41db6119374a19f030f194ac859733a95eb7009/src/vs/workbench/browser/parts/editor/editorStatus.ts#L897
Let me know if you have questions, but I think its easy to copy what we do for editor status here.