Question: <ins> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { ExtensionContext, NotebookCellKind, NotebookDocument, NotebookDocumentChangeEvent, NotebookEdit, workspace, WorkspaceEdit, type NotebookCell, type NotebookDocumentWillSaveEvent } from 'vscode'; import { getCellMetadata, getVSCodeCellLanguageId, removeVSCodeCellLanguageId, setVSCodeCellLanguageId } from './serializers'; import { CellMetadata } from './common'; import { getNotebookMetadata } from './notebookSerializer'; import type * as nbformat from '@jupyterlab/nbformat'; const noop = () => { // }; /** * Code here is used to ensure the Notebook Model is in sync the the ipynb JSON file. * E.g. assume you add a new cell, this new cell will not have any metadata at all. * However when we save the ipynb, the metadata will be an empty object `{}`. * Now thats completely different from the metadata os being `empty/undefined` in the model. * As a result, when looking at things like diff view or accessing metadata, we'll see differences. * * This code ensures that the model is in sync with the ipynb file. */ export const pendingNotebookCellModelUpdates = new WeakMap<NotebookDocument, Set<Thenable<void>>>(); export function activate(context: ExtensionContext) { workspace.onDidChangeNotebookDocument(onDidChangeNotebookCells, undefined, context.subscriptions); workspace.onWillSaveNotebookDocument(waitForPendingModelUpdates, undefined, context.subscriptions); } function isSupportedNotebook(notebook: NotebookDocument) { return notebook.notebookType === 'jupyter-notebook' || notebook.notebookType === 'interactive'; } function waitForPendingModelUpdates(e: NotebookDocumentWillSaveEvent) { if (!isSupportedNotebook(e.notebook)) { return; } const promises = pendingNotebookCellModelUpdates.get(e.notebook); if (!promises) { return; } e.waitUntil(Promise.all(promises)); } function cleanup(notebook: NotebookDocument, promise: PromiseLike<void>) { const pendingUpdates = pendingNotebookCellModelUpdates.get(notebook); if (pendingUpdates) { pendingUpdates.delete(promise); if (!pendingUpdates.size) { pendingNotebookCellModelUpdates.delete(notebook); } } } function trackAndUpdateCellMetadata(notebook: NotebookDocument, cell: NotebookCell, metadata: CellMetadata & { vscode?: { languageId: string } }) { const pendingUpdates = pendingNotebookCellModelUpdates.get(notebook) ?? new Set<Thenable<void>>(); pendingNotebookCellModelUpdates.set(notebook, pendingUpdates); const edit = new WorkspaceEdit(); edit.set(cell.notebook.uri, [NotebookEdit.updateCellMetadata(cell.index, { ...(cell.metadata), custom: metadata })]); const promise = workspace.applyEdit(edit).then(noop, noop); pendingUpdates.add(promise); const clean = () => cleanup(notebook, promise); promise.then(clean, clean); } function onDidChangeNotebookCells(e: NotebookDocumentChangeEvent) { if (!isSupportedNotebook(e.notebook)) { return; } const notebook = e.notebook; const notebookMetadata = getNotebookMetadata(e.notebook); // use the preferred language from document metadata or the first cell language as the notebook preferred cell language const preferredCellLanguage = notebookMetadata.metadata?.language_info?.name; // When we change the language of a cell, // Ensure the metadata in the notebook cell has been updated as well, // Else model will be out of sync with ipynb https://github.com/microsoft/vscode/issues/207968#issuecomment-2002858596 e.cellChanges.forEach(e => { if (!preferredCellLanguage || e.cell.kind !== NotebookCellKind.Code) { return; } const languageIdInMetadata = getVSCodeCellLanguageId(getCellMetadata(e.cell)); if (e.cell.document.languageId !== preferredCellLanguage && e.cell.document.languageId !== languageIdInMetadata) { const metadata: CellMetadata = JSON.parse(JSON.stringify(getCellMetadata(e.cell))); metadata.metadata = metadata.metadata || {}; setVSCodeCellLanguageId(metadata, e.cell.document.languageId); trackAndUpdateCellMetadata(notebook, e.cell, metadata); } else if (e.cell.document.languageId === preferredCellLanguage && languageIdInMetadata) { const metadata: CellMetadata = JSON.parse(JSON.stringify(getCellMetadata(e.cell))); metadata.metadata = metadata.metadata || {}; removeVSCodeCellLanguageId(metadata); trackAndUpdateCellMetadata(notebook, e.cell, metadata); } else if (e.cell.document.languageId === preferredCellLanguage && e.cell.document.languageId === languageIdInMetadata) { const metadata: CellMetadata = JSON.parse(JSON.stringify(getCellMetadata(e.cell))); metadata.metadata = metadata.metadata || {}; removeVSCodeCellLanguageId(metadata); trackAndUpdateCellMetadata(notebook, e.cell, metadata); } }); // Ensure all new cells in notebooks with nbformat >= 4.5 have an id. // Details of the spec can be found here https://jupyter.org/enhancement-proposals/62-cell-id/cell-id.html# e.contentChanges.forEach(change => { change.addedCells.forEach(cell => { // When ever a cell is added, always update the metadata // as metadata is always an empty `{}` in ipynb JSON file const cellMetadata = getCellMetadata(cell); // Avoid updating the metadata if it's not required. if (cellMetadata.metadata) { if (!isCellIdRequired(notebookMetadata)) { return; } if (isCellIdRequired(notebookMetadata) && cellMetadata?.id) { return; } } // Don't edit the metadata directly, always get a clone (prevents accidental singletons and directly editing the objects). const metadata: CellMetadata = { ...JSON.parse(JSON.stringify(cellMetadata || {})) }; metadata.metadata = metadata.metadata || {}; if (isCellIdRequired(notebookMetadata) && !cellMetadata?.id) { metadata.id = generateCellId(e.notebook); } trackAndUpdateCellMetadata(notebook, cell, metadata); }); }); } /** * Cell ids are required in notebooks only in notebooks with nbformat >= 4.5 */ function isCellIdRequired(metadata: Pick<Partial<nbformat.INotebookContent>, 'nbformat' | 'nbformat_minor'>) { if ((metadata.nbformat || 0) >= 5) { return true; } if ((metadata.nbformat || 0) === 4 && (metadata.nbformat_minor || 0) >= 5) { return true; } return false; } function generateCellId(notebook: NotebookDocument) { while (true) { // Details of the id can be found here https://jupyter.org/enhancement-proposals/62-cell-id/cell-id.html#adding-an-id-field, // & here https://jupyter.org/enhancement-proposals/62-cell-id/cell-id.html#updating-older-formats const id = generateUuid().replace(/-/g, '').substring(0, 8); let duplicate = false; for (let index = 0; index < notebook.cellCount; index++) { const cell = notebook.cellAt(index); const existingId = getCellMetadata(cell)?.id; if (!existingId) { continue; } if (existingId === id) { duplicate = true; break; } } if (!duplicate) { return id; } } } /** * Copied from src/vs/base/common/uuid.ts */ function generateUuid() { // use `randomValues` if possible function getRandomValues(bucket: Uint8Array): Uint8Array { for (let i = 0; i < bucket.length; i++) { bucket[i] = Math.floor(Math.random() * 256); } return bucket; } // prep-work const _data = new Uint8Array(16); const _hex: string[] = []; for (let i = 0; i < 256; i++) { _hex.push(i.toString(16).padStart(2, '0')); } // get data getRandomValues(_data); // set version bits _data[6] = (_data[6] & 0x0f) | 0x40; _data[8] = (_data[8] & 0x3f) | 0x80; // print as string let i = 0; let result = ''; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += '-'; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += '-'; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += '-'; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += '-'; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += _hex[_data[i++]]; return result; } </ins>

Create an ipynb file (with one Python cell) Save this Verify the entry exists in time line Change the language of the cell to Save this Verify we have an entry Click that item Bug On the left we need On the right there's no such entry in metadata This is incorrect. The ipynb has the above metadata. What seems to be happening is When the language changes, We serialize the ipynb and JSon contains the metadata However the model is not updated with corresponding changes to the ipynb file I.e. model change triggered =ipynb serialize to JSON =Json contains new metadtaa not in model =Missing step is to update the model again If we implement the last step, we could always end up in an infinite loop, Perhaps we should first update the model with metadata when ever we detect chagnes in the model before the save event. E.g. as part of pre-Save (onDidChangeNotebookDocument &/or onWillSaveNotebookDocument) This way, model will always be accurate and upto date when ipynb is serialized.
Easier way to explain the bug Create an ipynb file (with one Python cell) Save this Change the language of the cell to Save this The cell metadata will not contain the new metadata that exists in the ipynb JSON file. (model is not in sync with ipynb json)
Suggested Solution Perform model updates when we're about to save (or when we detect changes to model) When saving, ensure we save the metadata as is, without generating any new content I.e. JSON.stringify the metadata.
/cc
Considering that a serialize operation should not have side effects (ideally), enforcing a "save participant" from ipynb extension makes very good sense to me. We can leverage which support additional async operations, like how we handle attachment clearnup
For such critical metadata change, we might want to handle both auto save and manual save as we want the json and model to be always in sync.
Another simple repro step Create a notebook, and save this Add a new cell The latest entry in timeline will be However there's a difference, one has and the other (current model state) does not have any Again, model does not contain metadta (as this is a new cell) and ipynb JSON contains metadata when serialized.


Question: <ins> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { ExtensionContext, NotebookCellKind, NotebookDocument, NotebookDocumentChangeEvent, NotebookEdit, workspace, WorkspaceEdit, type NotebookCell, type NotebookDocumentWillSaveEvent } from 'vscode'; import { getCellMetadata, getVSCodeCellLanguageId, removeVSCodeCellLanguageId, setVSCodeCellLanguageId } from './serializers'; import { CellMetadata } from './common'; import { getNotebookMetadata } from './notebookSerializer'; import type * as nbformat from '@jupyterlab/nbformat'; const noop = () => { // }; /** * Code here is used to ensure the Notebook Model is in sync the the ipynb JSON file. * E.g. assume you add a new cell, this new cell will not have any metadata at all. * However when we save the ipynb, the metadata will be an empty object `{}`. * Now thats completely different from the metadata os being `empty/undefined` in the model. * As a result, when looking at things like diff view or accessing metadata, we'll see differences. * * This code ensures that the model is in sync with the ipynb file. */ export const pendingNotebookCellModelUpdates = new WeakMap<NotebookDocument, Set<Thenable<void>>>(); export function activate(context: ExtensionContext) { workspace.onDidChangeNotebookDocument(onDidChangeNotebookCells, undefined, context.subscriptions); workspace.onWillSaveNotebookDocument(waitForPendingModelUpdates, undefined, context.subscriptions); } function isSupportedNotebook(notebook: NotebookDocument) { return notebook.notebookType === 'jupyter-notebook' || notebook.notebookType === 'interactive'; } function waitForPendingModelUpdates(e: NotebookDocumentWillSaveEvent) { if (!isSupportedNotebook(e.notebook)) { return; } const promises = pendingNotebookCellModelUpdates.get(e.notebook); if (!promises) { return; } e.waitUntil(Promise.all(promises)); } function cleanup(notebook: NotebookDocument, promise: PromiseLike<void>) { const pendingUpdates = pendingNotebookCellModelUpdates.get(notebook); if (pendingUpdates) { pendingUpdates.delete(promise); if (!pendingUpdates.size) { pendingNotebookCellModelUpdates.delete(notebook); } } } function trackAndUpdateCellMetadata(notebook: NotebookDocument, cell: NotebookCell, metadata: CellMetadata & { vscode?: { languageId: string } }) { const pendingUpdates = pendingNotebookCellModelUpdates.get(notebook) ?? new Set<Thenable<void>>(); pendingNotebookCellModelUpdates.set(notebook, pendingUpdates); const edit = new WorkspaceEdit(); edit.set(cell.notebook.uri, [NotebookEdit.updateCellMetadata(cell.index, { ...(cell.metadata), custom: metadata })]); const promise = workspace.applyEdit(edit).then(noop, noop); pendingUpdates.add(promise); const clean = () => cleanup(notebook, promise); promise.then(clean, clean); } function onDidChangeNotebookCells(e: NotebookDocumentChangeEvent) { if (!isSupportedNotebook(e.notebook)) { return; } const notebook = e.notebook; const notebookMetadata = getNotebookMetadata(e.notebook); // use the preferred language from document metadata or the first cell language as the notebook preferred cell language const preferredCellLanguage = notebookMetadata.metadata?.language_info?.name; // When we change the language of a cell, // Ensure the metadata in the notebook cell has been updated as well, // Else model will be out of sync with ipynb https://github.com/microsoft/vscode/issues/207968#issuecomment-2002858596 e.cellChanges.forEach(e => { if (!preferredCellLanguage || e.cell.kind !== NotebookCellKind.Code) { return; } const languageIdInMetadata = getVSCodeCellLanguageId(getCellMetadata(e.cell)); if (e.cell.document.languageId !== preferredCellLanguage && e.cell.document.languageId !== languageIdInMetadata) { const metadata: CellMetadata = JSON.parse(JSON.stringify(getCellMetadata(e.cell))); metadata.metadata = metadata.metadata || {}; setVSCodeCellLanguageId(metadata, e.cell.document.languageId); trackAndUpdateCellMetadata(notebook, e.cell, metadata); } else if (e.cell.document.languageId === preferredCellLanguage && languageIdInMetadata) { const metadata: CellMetadata = JSON.parse(JSON.stringify(getCellMetadata(e.cell))); metadata.metadata = metadata.metadata || {}; removeVSCodeCellLanguageId(metadata); trackAndUpdateCellMetadata(notebook, e.cell, metadata); } else if (e.cell.document.languageId === preferredCellLanguage && e.cell.document.languageId === languageIdInMetadata) { const metadata: CellMetadata = JSON.parse(JSON.stringify(getCellMetadata(e.cell))); metadata.metadata = metadata.metadata || {}; removeVSCodeCellLanguageId(metadata); trackAndUpdateCellMetadata(notebook, e.cell, metadata); } }); // Ensure all new cells in notebooks with nbformat >= 4.5 have an id. // Details of the spec can be found here https://jupyter.org/enhancement-proposals/62-cell-id/cell-id.html# e.contentChanges.forEach(change => { change.addedCells.forEach(cell => { // When ever a cell is added, always update the metadata // as metadata is always an empty `{}` in ipynb JSON file const cellMetadata = getCellMetadata(cell); // Avoid updating the metadata if it's not required. if (cellMetadata.metadata) { if (!isCellIdRequired(notebookMetadata)) { return; } if (isCellIdRequired(notebookMetadata) && cellMetadata?.id) { return; } } // Don't edit the metadata directly, always get a clone (prevents accidental singletons and directly editing the objects). const metadata: CellMetadata = { ...JSON.parse(JSON.stringify(cellMetadata || {})) }; metadata.metadata = metadata.metadata || {}; if (isCellIdRequired(notebookMetadata) && !cellMetadata?.id) { metadata.id = generateCellId(e.notebook); } trackAndUpdateCellMetadata(notebook, cell, metadata); }); }); } /** * Cell ids are required in notebooks only in notebooks with nbformat >= 4.5 */ function isCellIdRequired(metadata: Pick<Partial<nbformat.INotebookContent>, 'nbformat' | 'nbformat_minor'>) { if ((metadata.nbformat || 0) >= 5) { return true; } if ((metadata.nbformat || 0) === 4 && (metadata.nbformat_minor || 0) >= 5) { return true; } return false; } function generateCellId(notebook: NotebookDocument) { while (true) { // Details of the id can be found here https://jupyter.org/enhancement-proposals/62-cell-id/cell-id.html#adding-an-id-field, // & here https://jupyter.org/enhancement-proposals/62-cell-id/cell-id.html#updating-older-formats const id = generateUuid().replace(/-/g, '').substring(0, 8); let duplicate = false; for (let index = 0; index < notebook.cellCount; index++) { const cell = notebook.cellAt(index); const existingId = getCellMetadata(cell)?.id; if (!existingId) { continue; } if (existingId === id) { duplicate = true; break; } } if (!duplicate) { return id; } } } /** * Copied from src/vs/base/common/uuid.ts */ function generateUuid() { // use `randomValues` if possible function getRandomValues(bucket: Uint8Array): Uint8Array { for (let i = 0; i < bucket.length; i++) { bucket[i] = Math.floor(Math.random() * 256); } return bucket; } // prep-work const _data = new Uint8Array(16); const _hex: string[] = []; for (let i = 0; i < 256; i++) { _hex.push(i.toString(16).padStart(2, '0')); } // get data getRandomValues(_data); // set version bits _data[6] = (_data[6] & 0x0f) | 0x40; _data[8] = (_data[8] & 0x3f) | 0x80; // print as string let i = 0; let result = ''; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += '-'; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += '-'; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += '-'; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += '-'; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += _hex[_data[i++]]; result += _hex[_data[i++]]; return result; } </ins>

<details<summaryInternal Notes</summaryHere's the work flow Add a cell A change event is triggered, undo redo stack is updated Last undo redo is User hits save button Working copy starts to handle the save operation Save participants start We add a save participant and update the model via a work space edit Now a new change event is triggered This results in a whole new undo redo stack The latest (last) undo redo item is Save participants done Working copy keeps track of the last as the entry for Problems Time line does not include , time line shows only I guess this is correct, However from a users perspective, the labels are never going to be meaningful as we'd always say . </details


Question: import * as vscode from 'vscode'; import { NotebookSerializer } from './notebookSerializer'; <del> import { ensureAllNewCellsHaveCellIds } from './cellIdService'; </del> <ins> import { activate as keepNotebookModelStoreInSync } from './notebookModelStoreSync'; </ins> import { notebookImagePasteSetup } from './notebookImagePaste'; import { AttachmentCleaner } from './notebookAttachmentCleaner';


Question: import * as vscode from 'vscode'; import { NotebookSerializer } from './notebookSerializer'; <del> import { ensureAllNewCellsHaveCellIds } from './cellIdService'; </del> <ins> import { activate as keepNotebookModelStoreInSync } from './notebookModelStoreSync'; </ins> import { notebookImagePasteSetup } from './notebookImagePaste'; import { AttachmentCleaner } from './notebookAttachmentCleaner';


Question: } // Refresh Parent (View) await this.view?.refresh(shouldDeepRefresh, parent); <ins> if (this.view?.getFocus().length === 0) { this.view?.focusLast(); } </ins> } })); }

Type: <bBug</bWhen pressing to collapse all nodes in a list view it leaves selection in such a state that you cannot expand nodes with until you do something to change the selection. ! I believe what's happening is is leaving the originally selected node selected. So after executing the command you end up with 2 selections, your original selection plus the last root node in the list. The original selection is the primary selection, and if it has no children does not have anything to expand and is a no-op. As a user it looks like you have the root node selected, which has children to expand, but pressing does nothing. Pressing then expands the list to reveal your original selection and you see that you unexpectedly have multiple selections. The current behavior of appears to be: Leave the originally selected node selected Add a second selection to the last root node in the list The expected behavior here is: Move selection to the root node of your currently selected node Ideally this also retains multiple selection: each selection is moved to the root node of that selection. VS Code version: Code - Insiders 1.76.0-insider (, 2023-02-10T16:22:19.445Z) OS version: WindowsNT x64 10.0. Modes: Sandboxed: Yes <details<summarySystem Info</summary </detailsExtensions: none<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
Looking at this again in the File Explorer it looks like the selection highlight is left on the where the original selection was despite the fact that the node is now in a different position. However, the "real" selection is still on the node. This means it looks like one thing is highlighted and pressing opens a different thing.
Just submitted a PR for this. Could you please review it?
What is the behavior supposed to be? Here's what I see: keyboard to focus a tree node that has a parent to collapse all moves to the whole tree and arrow down takes me to the first tree element. Right arrow does nothing.
The current behavior sort-of fixes the issue, insofar as is dodges it by doing something less desirable - moves selection to the whole tree. Imo, selection should remain on the root node(s) of whichever tree branch selection is currently in.


Question: } // Refresh Parent (View) await this.view?.refresh(shouldDeepRefresh, parent); <ins> if (this.view?.getFocus().length === 0) { this.view?.focusLast(); } </ins> } })); }

I think this is what the previous behavior was trying to do, it just had an issue with leaving selection in a bad state. A couple examples ([x] denotes current selection): Start state End state, after Stat state End state
I agree, feel free to send an issue for it. Your observations are the fixed state. Here's the entire story: Marking it as verified.


Question: } // Refresh Parent (View) await this.view?.refresh(shouldDeepRefresh, parent); <ins> if (this.view?.getFocus().length === 0) { this.view?.focusLast(); } </ins> } })); }

Testing focus on trusted URI list of items tab to navigate to the X to remove an item. Press to trigger removal nicely gets removed from the list, however focus is lost Focus should be preserved in the list on the neighbour item (example: checkout how Explorer does that when deleting a file). I thought this would be tackled via
The trust editor does a lot of full page re-rendering which I should improve (remove) so I doubt this is an issue with the table widget itself.


Question: export interface RenderOutput { html: string; <del> containingImages: { src: string }[]; </del> <ins> containingImages: Set<string>; </ins> } interface RenderEnv { <del> containingImages: { src: string }[]; </del> <ins> containingImages: Set<string>; </ins> currentDocument: vscode.Uri | undefined; resourceProvider: WebviewResourceProvider | undefined; }

<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes/No <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: 1.68.1 OS Version: Windows 10 Steps to Reproduce: a Markdown file and open "Open Preview to the Side" add line: ! image in preview second line: ! second image shows up. Remove the line above image preview shows 2 images and does not update properly !
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.68.1. Please try upgrading to the latest version and checking whether this issue remains. Happy Coding!
Still happens in 1.68.1. Updating bug
Does this reproduce in the with all ?
Yes still happens with all extensions disabled


Question: @IWorkbenchThemeService protected themeService: IWorkbenchThemeService, @INotificationService private notificationService: INotificationService, @ICommandService private commandService: ICommandService, <ins> @IExtensionService private extensionService: IExtensionService, </ins> @IContextMenuService private contextMenuService: IContextMenuService, <ins> @IKeybindingService private keybindingService: IKeybindingService, </ins> @ITelemetryService private telemetryService: ITelemetryService, @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService, @IFileService private fileService: IFileService,

Repro Steps: install VS Code native menubar has no keyboard shortcuts Alternative Repro Steps: a keybinding the menubar does not reflect the change.
Must fix.
Reviewed, tested, merged and cherry picked to . See
since you tested this can you please add a verified label


For example: Context:
As we anticipate we might need shell scoping as well in the future, use something similar to instead. Updated proposal: One issue with this is that carries optional properties. Hence an alternative could be:
The required would need to be removed when we a second one anyway, we can just treat and the same as
Sorry what do you mean by the "second one"? Mostly I was trying to follow : But I guess we don't have to strictly follow it?
by a second one I mean a second scope, we don't want the user to explicitly enumerate all the scopes to set it which would do.
Updated proposal:
Closing in favor of as these issues were only open to finalize proposed API.
Moving this out of June as it's a feature request.
I was expecting this so it's easier to understand for an API user:
That's what I had initially had , you're the one who recommended that perhaps we should put it inside itself:
API sync also seemed to be in agreement with that, but maybe we should check again.
my mistake, I forgot some of the conversations as this has gone through a few iterations
Based on discussion in API sync, we should probably deprecate existing API and merge it with the scoped one (similar to )
Assigning myself too so it's easier for me to track
When viewing contributions, is it possible to open the preview of the markdown directly instead of the file? ! as opposed to ! I can open preview using: !
since this is an advanced feature I think the raw markdown is more flexible as the user can navigate and copy section of it better. So I don't think this is a necessary change personally
Feedback before finalization: Add an interface implements Add to the Clarify how scoped interacts with the non-scoped collection Don't deprecate
Should we also call out how it's applied in addition to (and after) the global collection? Looks good otherwise
Sure, I have modified the docstrings to append it I plan to have the implementation ready but only merge and adopt it in Python extension next week to avoid multiple iterations.


Question: this.debugService.getModel().getSessions().forEach(registerLoadedSourceListener); this.disposables.push(this.debugService.onDidEndSession(session => { <del> clearTimeout(timeout); </del> root.remove(session.getId()); <del> if (this.tree) { this.tree.refresh(root, false); } </del> <ins> this.treeRefreshScheduler.schedule(); </ins> })); }

debugging the loaded scripts view open debugging, notice exception in the console can not reproduce with Stable so it might be that my listener refactoring caused this If you pause on exception you will see that caused it.
did you have a chance to look into this? Or would you like me to investigate? I suspect this is breaking the loaded scripts view and is the root cause for
no, please investigate since this and was working before, and I haven't touched this code for two weeks.
end session events are not arriving in As a consequence the tree for the session is not properly removed.
I see something differnetly, the end sessions are arriving however when the last session end arrives view starts refreshing the tree and while that is in progress the view gets disposed which throws an exception. Looking into a fix...
I have created a PR which address this issue


Question: this.textArea.setAttribute('aria-haspopup', 'false'); this.textArea.setAttribute('aria-autocomplete', 'both'); <del> if (options.get(EditorOption.domReadOnly)) { </del> <ins> if (options.get(EditorOption.domReadOnly) && options.get(EditorOption.readOnly)) { </ins> this.textArea.setAttribute('readonly', 'true'); }

<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --- VS Code Version: 1.56.0-insider OS Version: MacOS Big Sur 11.2.3 Steps to Reproduce: Settings and and editor it manually. a rule: editors can't be edited anymore. <!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported direct to the extension publisher. The 'Help Report Issue' dialog can assist with this. --


Question: import { isIOS } from 'vs/base/common/platform'; import Severity from 'vs/base/common/severity'; import { ThemeIcon } from 'vs/base/common/themables'; <del> import { isString, withNullAsUndefined } from 'vs/base/common/types'; </del> <ins> import { isString, withNullAsUndefined, withUndefinedAsNull } from 'vs/base/common/types'; </ins> import 'vs/css!./media/quickInput'; import { localize } from 'vs/nls'; import { ILayoutService } from 'vs/platform/layout/browser/layoutService';

cc: Type: <bBug</bSteps to reproduce: at least 2 files in VSCode. orca. ctrl+tab to switch to the next open file. In my environment orca announces something similar to the following: Is this the expected behavior? VS Code version: Code - Insiders 1.78.0-insider (, 2023-04-06T05:21:17.374Z) OS version: Linux x64 6.2.8-200.fc37.x8664 Modes: Sandboxed: Yes <details<summarySystem Info</summary </details<details<summaryExtensions (42)</summaryExtensionVersion ------ doxdocgen1.4.0 vscode-markdownlint0.49.0 vscode-eslint2.4.0 EditorConfig0.16.4 copilot1.79. rest-client0.25.1 better-cpp-syntax1.17.2 docomment1.0.0 azure-pipelines1.208.0 vscode-docker1.24.0 csharp1.25.4 vscode-dotnet-runtime1.6.0 vscode-kubernetes-tools1.3.11 remote-containers0.289.0 remote-ssh0.101. remote-ssh-edit0.84.0 azure-account0.11.3 cmake-tools1.13.45 cpptools1.15.1 cpptools-extension-pack1.3.0 makefile-tools0.6.0 powershell2023.3.3 remote-explorer0.5. vsliveshare1.0.5834 oracledevtools21.5.0 fabric8-analytics0.3.6 java1.17. vscode-xml0.25. vscode-yaml1.12.2 sonarlint-vscode3.16.0 cmake0.0.17 intellicode-api-usage-examples0.2.7 vscodeintellicode1.2.30 vscode-boot-dev-pack0.2.1 vscode-spring-boot1.45.0 vscode-java-debug0.49. vscode-java-dependency0.21. vscode-java-pack0.25. vscode-java-test0.38. vscode-maven0.41.


Question: import { isIOS } from 'vs/base/common/platform'; import Severity from 'vs/base/common/severity'; import { ThemeIcon } from 'vs/base/common/themables'; <del> import { isString, withNullAsUndefined } from 'vs/base/common/types'; </del> <ins> import { isString, withNullAsUndefined, withUndefinedAsNull } from 'vs/base/common/types'; </ins> import 'vs/css!./media/quickInput'; import { localize } from 'vs/nls'; import { ILayoutService } from 'vs/platform/layout/browser/layoutService';

vscode-spring-boot-dashboard0.12.0 vscode-spring-initializr0.11.2 (1 theme extensions excluded) </details<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
This is happening because of the fix for I think it is behaving as designed, though will leave that with
That's a bit weird. Since experience does not visually render a placeholder. So I would not expect it gets read out.
Question is, should it say nothing, or is the aria-label for not correct and it should be ? I'm leaning "nothing" because otherwise they might have to hold down until the actual quick pick option highlighted is read out.
I have a fix out with the "nothing" idea... but would love to know what you folks think before I merge.
In version 1.77, when I press ctrl+tab, orca informs me that the focus has moved to a list box and the name of the next file is read. Imagining the following scenario: two files, a.js and b.js. start editing the a.js file. press ctlr+tab. My screen reader reads the following information: List Box, b.js. In my view this behavior would be sufficient.
It is fixed, thanks.


Question: "build-notebook": "node ./esbuild" }, "dependencies": { <del> "@vscode/markdown-it-katex": "^1.0.3" </del> <ins> "@vscode/markdown-it-katex": "^1.1.0" </ins> }, "devDependencies": { "@types/markdown-it": "^0.0.0",

Type: <bBug</bWhen editing a Markdown file, VS Code will apply LaTeX syntax highlighting to math in double-dollar signs (math blocks), e.g., will color and and the numbers. GitHub Markdown also supports a code block syntax (the triple-tick syntax; see ), so the above could be written in GitHub-flavored Markdown as <img width="200" alt="image" src="https://user-"It'd be nice if it could apply the same highlighting as double-dollar signs. VS Code version: Code 1.75.1 (Universal) (, 2023-02-08T21:34:59.000Z) OS version: Darwin arm64 22.2.0 Modes: Sandboxed: Yes <details<summarySystem Info</summary </details<details<summaryExtensions (19)</summaryExtensionVersion ------ prettier-vscode9.10.4 linter-gfortran3.2.0 unicode-math-vscode0.3.5 isort2022.8.0 python2023.2.0 vscode-pylance2023.2.30 jupyter2023.1. jupyter-keymap1.0.0 jupyter-renderers1.0.14 vscode-jupyter-cell-tags0.1.6 vscode-jupyter-slideshow0.1.5 cmake-tools1.13.45 cpptools1.14.3 cpptools-extension-pack1.3.0 vsliveshare1.0.5831 rewrap1.16.3 cmake0.0.17 clang-format1.9.0 markdown-all-in-one3.5.0 (1 theme extensions excluded) </details<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
<!-- -96bd-47a8-a0e8- --This feature request is now a candidate for our backlog. The community has 60 days to the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our . Happy Coding!
Yay, 23 upvotes!!
<!-- -c9e0-7adb-d31b- --:slightlysmilingface: This feature request received a sufficient number of community upvotes and we moved it to our backlog.


Question: "build-notebook": "node ./esbuild" }, "dependencies": { <del> "@vscode/markdown-it-katex": "^1.0.3" </del> <ins> "@vscode/markdown-it-katex": "^1.1.0" </ins> }, "devDependencies": { "@types/markdown-it": "^0.0.0",

To learn more about how we handle feature requests, please see our . Happy Coding!
Having math block and code-block specific code linting would be also great!


Question: 'properties': { 'workbench.startupEditor': { 'type': 'string', <del> 'enum': ['none', 'welcomePage', 'newUntitledFile'], </del> <ins> 'enum': ['none', 'welcomePage', 'newUntitledFile', 'welcomePageInEmptyWorkbench'], </ins> 'enumDescriptions': [ localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.none' }, "Start without an editor."), localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.welcomePage' }, "Open the Welcome page (default)."), localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.newUntitledFile' }, "Open a new untitled file (only applies when opening an empty workspace)."), <ins> localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.welcomePageInEmptyWorkbench' }, "Open the Welcome page when opening an empty workbench."), </ins> ], 'default': 'welcomePage', 'description': localize('workbench.startupEditor', "Controls which editor is shown at startup, if none are restored from the previous session.")

When you open a recent project from the welcome screen, the last one remains opened in a tab. VSCode Version: 1.9.1 OS Version: macOS Sierra 10.12.3 Steps to Reproduce: a new VSCode window. a recent project from the welcome screen. project is opened and the welcome screen remains opened.
The current behavior was chosen in the hope that this would help new users by staying in the same context.
I agree that the welcome screen should be closed after taking an action from it. Especially in my case, where I prefer to use the setting, having to close the otherwise empty welcome window after opening from the 'Recents' list or via FileOpen feels like a bug.
You can just not show it at all. Or do you need any of the actions on it? (I'm trying to preserve the new user experience here which relies much more on guidance.)
It's ok showing the welcome screen, but it should be closed after opening a project from there.
With we change the Welcome editor to open in preview mode, this way it will close when the next editor opens. (If preview mode is not disabled in settings.)
This could be an additional value for the setting.
Hey, I could look into this. Got any tips on where I should start ?
Great: Add an additional enum literal here: Check for that literal and the 'open folder' condition here:
Hey , I've ran into some questions which you might be able to help me with: should I name the enum literal? I can't seem to come up with the right name would I check for the 'open folder' condition?
You could use . Check for no folder being open: . You can get at the context service by adding it to the constructor of the calling class, similar to:
Hey everything seems to be working now, just one last question which is confusing me: isn't the objective of this issue to NOT show the Welcome Page when opening a new project? So why is your enum suggestion welcomePageInEmptyWorkbench? What is happening right now after my additions is: upon opening a new project, no Welcome Page is shown. Is this right?
Show it only in the empty workbench. :)
Hey Now I'm getting upon opening a new window (empty workbench). Any ideas? I did the comparison as you said for no folder being open.
Is the ?


Question: 'properties': { 'workbench.startupEditor': { 'type': 'string', <del> 'enum': ['none', 'welcomePage', 'newUntitledFile'], </del> <ins> 'enum': ['none', 'welcomePage', 'newUntitledFile', 'welcomePageInEmptyWorkbench'], </ins> 'enumDescriptions': [ localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.none' }, "Start without an editor."), localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.welcomePage' }, "Open the Welcome page (default)."), localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.newUntitledFile' }, "Open a new untitled file (only applies when opening an empty workspace)."), <ins> localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.welcomePageInEmptyWorkbench' }, "Open the Welcome page when opening an empty workbench."), </ins> ], 'default': 'welcomePage', 'description': localize('workbench.startupEditor', "Controls which editor is shown at startup, if none are restored from the previous session.")

You can debug it either in VS Code or in the Developer Tools (Help Toggle Developer Tools in the window running from source).
Upon opening a new window, it isn't undefined (verified by a console log) but then it turns undefined (verified by the same console log). Edit: and immediately after Edit2: Found it! Seems like isWelcomePageEnabled() is called twice, once in the class constructor and the other one in the onReady method. I'll make the PR in a bit


Question: const original = md.renderer.rules.image; md.renderer.rules.image = (tokens: Token[], idx: number, options, env: RenderEnv, self) => { const token = tokens[idx]; <del> token.attrJoin('class', 'loading'); </del> const src = token.attrGet('src'); if (src) { <del> env.containingImages?.push({ src }); const imgHash = stringHash(src); token.attrSet('id', `image-hash-${imgHash}`); </del> <ins> env.containingImages?.add(src); </ins> if (!token.attrGet('data-src')) { token.attrSet('src', this.toResourceUri(src, env.currentDocument, env.resourceProvider));


Question: "configuration.suggest.completeFunctionCalls": "Complete functions with their parameter signature.", "configuration.suggest.includeAutomaticOptionalChainCompletions": "Enable/disable showing completions on potentially undefined values that insert an optional chain call. Requires strict null checks to be enabled.", "configuration.suggest.includeCompletionsForImportStatements": "Enable/disable auto-import-style completions on partially-typed import statements.", <del> "configuration.suggest.includeCompletionsWithSnippetText": "Enable/disable snippet completions from TS Server.", </del> "typescript.tsdk.desc": "Specifies the folder path to the tsserver and `lib*.d.ts` files under a TypeScript install to use for IntelliSense, for example: `./node_modules/typescript/lib`.nn- When specified as a user setting, the TypeScript version from `typescript.tsdk` automatically replaces the built-in TypeScript version.n- When specified as a workspace setting, `typescript.tsdk` allows you to switch to use that workspace version of TypeScript for IntelliSense with the `TypeScript: Select TypeScript version` command.nnSee the [TypeScript documentation](https://code.visualstudio.com/docs/typescript/typescript-compiling#_using-newer-typescript-versions) for more detail about managing TypeScript versions.", "typescript.disableAutomaticTypeAcquisition": "Disables [automatic type acquisition](https://code.visualstudio.com/docs/nodejs/working-with-javascript#_typings-and-automatic-type-acquisition). Automatic type acquisition fetches `@types` packages from npm to improve IntelliSense for external libraries.", "typescript.enablePromptUseWorkspaceTsdk": "Enables prompting of users to use the TypeScript version configured in the workspace for Intellisense.",

Request completions, commit on Expected: Regular completion, no method body OR completion that is otherwise identical to both settings being . Actual
I want to understand this better, since this kind of behavior is also present in other completions I think: how should interact with completions that can or cannot contain snippets? For instance, the class member completion can be a snippet, but it doesn't necessarily have to be, which is why it still shows up in the example above when is false, but the difference is that it's no longer a snippet (i.e. there's no tab stop in the body of the completed method). I guess this bug is saying that this completion should never be offered in its non-snippet form? Is this the case because not having the tab stop in the method's body degrades the user experience? Is it because of some other reason?
Ugh - okay, so there's plain completions completions with insert text completions with tab stops and for some reason, is the one that enables tab stops. Did I get that right?
I think so, yes. Not sure if this this is relevant, but note that while is a setting that is user-configurable in vscode, while is not. Andrew B once told me that's because is supposed to indicate whether an editor supports insert text in completions or not.
I believe it's controlled by setting
and say that this should never have been user-visible in the first place. The flag shouldn't have been passed in as-is to TypeScript. If anything, the editor should use a flag like to blanket enable/disable other snippet features.
I don't see the removed setting anymore so marking as verified.


Question: class TestParcelWatcher extends ParcelWatcher { <del> testNormalizePaths(paths: string[]): string[] { </del> <ins> testNormalizePaths(paths: string[], excludes: string[] = []): string[] { </ins> // Work with strings as paths to simplify testing const requests: IRecursiveWatchRequest[] = paths.map(path => { <del> return { path, excludes: [], recursive: true }; </del> <ins> return { path, excludes, recursive: true }; </ins> }); return this.normalizeRequests(requests).map(request => request.path);

I'm using to mount a remote Azure Blob storage container into my local file system with FUSE. Once I open up that mount point (say ) in VSCode, network traffic immediately goes up to around 100 kb/s. In the storage provider's API logs I can see many thousand operation requests per second to files located at any hierarchy level inside my storage container, but also files that do not exists (e.g. ). I was assuming this is related to VSCode attempting to watch these files for changes, but can't use inotify on the remote share, so falls back to polling the files with a crazy frequency. However, applying the following settings didn't have any effect: Same issue occurs with or AWS S3 + and I presume also for sshfs, davfs2_ and the like. When killing the sub-process, I can observe a short decline in network usage until the process almost immediately restarts.
In this case I wonder if we should simply not install the file watcher at all if a setting is configured to disable it. I see no other workaround other than maybe addressing this in our external file watcher where we pass on these exclude rules.
Verification: run with and filter dev tools console to to see only file watcher related output configure to have an entry open a folder verify that in the output for the watcher you see no indication that the folder is being watched compare this to how the output looks like when you not have such a setting
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!


Question: this._list.triggerScrollFromMouseWheelEvent(event); } <ins> previousChange(): void { let currFocus = this._list.getFocus()[0]; if (isNaN(currFocus) || currFocus < 0) { currFocus = 0; } // find the index of previous change let prevChangeIndex = currFocus - 1; while (prevChangeIndex >= 0) { const vm = this._diffElementViewModels[prevChangeIndex]; if (vm.type !== 'unchanged') { break; } prevChangeIndex--; } if (prevChangeIndex >= 0) { this._list.setFocus([prevChangeIndex]); this._list.reveal(prevChangeIndex); } else { // go to the last one const index = lastIndex(this._diffElementViewModels, vm => vm.type !== 'unchanged'); if (index >= 0) { this._list.setFocus([index]); this._list.reveal(index); } } } nextChange(): void { let currFocus = this._list.getFocus()[0]; if (isNaN(currFocus) || currFocus < 0) { currFocus = 0; } // find the index of next change let nextChangeIndex = currFocus + 1; while (nextChangeIndex < this._diffElementViewModels.length) { const vm = this._diffElementViewModels[nextChangeIndex]; if (vm.type !== 'unchanged') { break; } nextChangeIndex++; } if (nextChangeIndex < this._diffElementViewModels.length) { this._list.setFocus([nextChangeIndex]); this._list.reveal(nextChangeIndex); } else { // go to the first one const index = this._diffElementViewModels.findIndex(vm => vm.type !== 'unchanged'); if (index >= 0) { this._list.setFocus([index]); this._list.reveal(index); } } } </ins> createOutput(cellDiffViewModel: DiffElementViewModelBase, cellViewModel: DiffNestedCellViewModel, output: IInsetRenderOutput, getOffset: () => number, diffSide: DiffSide): void { this._insetModifyQueueByOutputId.queue(output.source.model.outputId + (diffSide === DiffSide.Modified ? '-right' : 'left'), async () => { const activeWebview = diffSide === DiffSide.Modified ? this._modifiedWebview : this._originalWebview;

Testing Ideally there would be commands to navigate between changes. And they might deserve an action in the diff title bar. Same as the editor diff experience. !
Why is for these commands? I would expect them to be available from the command palette, since in a regular text editor Show Previous Change and Show Next Change both appear.


Question: this._list.triggerScrollFromMouseWheelEvent(event); } <ins> previousChange(): void { let currFocus = this._list.getFocus()[0]; if (isNaN(currFocus) || currFocus < 0) { currFocus = 0; } // find the index of previous change let prevChangeIndex = currFocus - 1; while (prevChangeIndex >= 0) { const vm = this._diffElementViewModels[prevChangeIndex]; if (vm.type !== 'unchanged') { break; } prevChangeIndex--; } if (prevChangeIndex >= 0) { this._list.setFocus([prevChangeIndex]); this._list.reveal(prevChangeIndex); } else { // go to the last one const index = lastIndex(this._diffElementViewModels, vm => vm.type !== 'unchanged'); if (index >= 0) { this._list.setFocus([index]); this._list.reveal(index); } } } nextChange(): void { let currFocus = this._list.getFocus()[0]; if (isNaN(currFocus) || currFocus < 0) { currFocus = 0; } // find the index of next change let nextChangeIndex = currFocus + 1; while (nextChangeIndex < this._diffElementViewModels.length) { const vm = this._diffElementViewModels[nextChangeIndex]; if (vm.type !== 'unchanged') { break; } nextChangeIndex++; } if (nextChangeIndex < this._diffElementViewModels.length) { this._list.setFocus([nextChangeIndex]); this._list.reveal(nextChangeIndex); } else { // go to the first one const index = this._diffElementViewModels.findIndex(vm => vm.type !== 'unchanged'); if (index >= 0) { this._list.setFocus([index]); this._list.reveal(index); } } } </ins> createOutput(cellDiffViewModel: DiffElementViewModelBase, cellViewModel: DiffNestedCellViewModel, output: IInsetRenderOutput, getOffset: () => number, diffSide: DiffSide): void { this._insetModifyQueueByOutputId.queue(output.source.model.outputId + (diffSide === DiffSide.Modified ? '-right' : 'left'), async () => { const activeWebview = diffSide === DiffSide.Modified ? this._modifiedWebview : this._originalWebview;

Testing Notice that the scroll range is below the decorations, even though they're on screen <img width="717" alt="image" src="https://user-"Meanwhile if I scroll to where they're shown, they aren't in viewport <img width="713" alt="image" src="https://user-"This was on the following gif: <img width="401" alt="image" src="https://user-"


Question: return true; }); <del> for (const placeholder of incompletePlaceholders) { </del> <ins> const fillInIncompletePlaceholder = (placeholder: Placeholder, stack: Set<number>) => { </ins> const defaultValues = placeholderDefaultValues.get(placeholder.index); <del> if (defaultValues) { const clone = new Placeholder(placeholder.index); clone.transform = placeholder.transform; for (const child of defaultValues) { clone.appendChild(child.clone()); </del> <ins> if (!defaultValues) { return; } const clone = new Placeholder(placeholder.index); clone.transform = placeholder.transform; for (const child of defaultValues) { const newChild = child.clone(); clone.appendChild(newChild); // "recurse" on children that are again placeholders if (newChild instanceof Placeholder && placeholderDefaultValues.has(newChild.index) && !stack.has(newChild.index)) { stack.add(newChild.index); fillInIncompletePlaceholder(newChild, stack); stack.delete(newChild.index); </ins> } <del> snippet.replace(placeholder, [clone]); </del> } <ins> snippet.replace(placeholder, [clone]); }; const stack = new Set<number>(); for (const placeholder of incompletePlaceholders) { fillInIncompletePlaceholder(placeholder, stack); </ins> } return snippet.children.slice(offset);

<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --Steps to Reproduce: created this simple snippet: I expand the snippet, I get this: Expected this: It uses the first variable as a part of the placeholder of the second variable. The second occurrence of the second variable is not substituted properly. !
Confirmed... Looks like we capture the value of 1 "replication". For now you can workaround by "inlining" the second occurrence of $1, e.g have two times


Question: import { IRange, Range } from 'vs/editor/common/core/range'; import { getDefinitionsAtPosition } from 'vs/editor/contrib/gotoSymbol/browser/goToSymbol'; import { goToDefinitionWithLocation } from 'vs/editor/contrib/inlayHints/browser/inlayHintsLocations'; <del> import { Position } from 'vs/editor/common/core/position'; </del> <ins> import { IPosition, Position } from 'vs/editor/common/core/position'; </ins> import { CancellationTokenSource } from 'vs/base/common/cancellation'; import { ILanguageConfigurationService } from 'vs/editor/common/languages/languageConfigurationRegistry'; import { ILanguageFeatureDebounceService } from 'vs/editor/common/services/languageFeatureDebounce';

Testing a Markdown file with headers up to H3, enable Sticky Scroll and scroll up and down in the editor. Stick Scroll a header leve and press . Try to scroll up and down with the arrow keys. Unclear where the cursor focus is. Try typing, the editor doesn't have focus Focus should should probably go to the editor on the selected header. That is the behavior with breadcrumb navigation
This is the general behavior of Sticky Scroll and also reproduces if you select a level via the mouse
Verified on OSS


Question: } canSerialize(): boolean { <del> return this.configurationService.getValue<boolean>(InteractiveWindowSetting.interactiveWindowHotExit); </del> <ins> return this.configurationService.getValue<boolean>(InteractiveWindowSetting.interactiveWindowRestore); </ins> } serialize(input: EditorInput): string {

Testing microsoft/vscode-jupyter The setting description says that the 'interactive window session' is restored. But after a reload, it seems that the state has been forgotten e.g. Open the interactive window run run prints 9 reload the window the output is restored but running again will show Note that I had to retype print(x) as there was no way to rerun the previously shown cells What's restored seems to be the last output. Maybe the settings description can clarify that?


Question: } canSerialize(): boolean { <del> return this.configurationService.getValue<boolean>(InteractiveWindowSetting.interactiveWindowHotExit); </del> <ins> return this.configurationService.getValue<boolean>(InteractiveWindowSetting.interactiveWindowRestore); </ins> } serialize(input: EditorInput): string {

Testing microsoft/vscode-jupyter IMO is about restoring a editor with unsaved changes, but the interactiveWindow doesn't seem to have a dirty state. Maybe just call it 'interactiveWindow.restore`? It's actually not really a window ;-)
Good point Martin, I think calling it makes better sense. is a bit ambiguous, we can revisit the name for it in the core when we stabilize the API.


Question: ${vscode.l10n.t("Focus Lock")}

Type: <bBug</bSimple Browser to visit a webpage that offers a download. the download. happens :bug: I plan to submit a PR. VS Code version: Code - Insiders 1.80.0-insider (, 2023-06-14T09:02:23.566Z) OS version: Windows_NT x64 10.0. Modes: <!-- generated by issue reporter --
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
/verified


Question: this.contextKeyService = service; } <ins> private filterNonUniversalActions(groups: Map<string, IAction>[], newActions: IAction[]) { const newActionsSet: Set<string> = new Set(newActions.map(a => a.id)); for (const group of groups) { const actions = group.keys(); for (const action of actions) { if (!newActionsSet.has(action)) { group.delete(action); } } } } private buildMenu(groups: Map<string, IAction>[]): IAction[] { const result: IAction[] = []; for (const group of groups) { if (group.size > 0) { if (result.length) { result.push(new Separator()); } result.push(...group.values()); } } return result; } private createGroups(actions: IAction[]): Map<string, IAction>[] { const groups: Map<string, IAction>[] = []; let group: Map<string, IAction> = new Map(); for (const action of actions) { if (action instanceof Separator) { groups.push(group); group = new Map(); } else { group.set(action.id, action); } } groups.push(group); return groups; } </ins> private getActions(menuId: MenuId, elements: ITreeItem[], listen?: DisposableStore): { primary: IAction[]; secondary: IAction[] } { if (!this.contextKeyService) { return { primary: [], secondary: [] }; } <del> const allowedPrimary = new Map<string, IAction>(); const allowedSecondary = new Map<string, IAction>(); </del> <ins> let primaryGroups: Map<string, IAction>[] = []; let secondaryGroups: Map<string, IAction>[] = []; </ins> for (let i = 0; i < elements.length; i++) { const element = elements[i]; const contextKeyService = this.contextKeyService.createOverlay([


Question: // Extensions Management else if (shouldSpawnCliProcess(args)) { <del> const cli = await import(['vs', 'code', 'node', 'cliProcessMain'].join('/') /* TODO@esm workaround to prevent esbuild from inlining this */); </del> <ins> const cli = await import(['./cliProcessMain.js'].join('/') /* TODO@esm workaround to prevent esbuild from inlining this */); </ins> await cli.main(args); return;

Version: 1.94.0-insider Commit: Date: 2024-09-09T17:10:54.809Z Electron: 30.4.0 ElectronBuildId: Chromium: 124.0.6367.243 20.15.1 V8: 12.4.254.20-electron.0 OS: Darwin arm64 23.6.0 Steps to Reproduce:
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!


Question: import { ISimpleSelectedSuggestion } from 'vs/workbench/services/suggest/browser/simpleSuggestWidget'; import type { IMarker, ITheme, Terminal as RawXtermTerminal } from '@xterm/xterm'; import { ScrollPosition } from 'vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon'; <ins> import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; </ins> export const ITerminalService = createDecorator<ITerminalService>('terminalService'); export const ITerminalEditorService = createDecorator<ITerminalEditorService>('terminalEditorService');

Type: <bBug</bPinning a terminal editor does not set some of the context variables that are normally set when pining a text editor. Here are the ones I've noticed: activeEditorIsDirty activeEditorIsFirstInGroup activeEditorIsLastInGroup activeEditorIsNotPreview activeEditorIsPinned In the case of activeEditorIsPinned this makes it impossible to detect if the current terminal editor is pinned. Since there is no command to toggle the pin on an editor this means it's not possible to create a single keybinding that can intelligently pin and unpin the current terminal editor. In the case of activeEditorIsLastInGroup it means it's not possible to create a keybinding to move a terminal editor out of the "pinned section" of editors in the current group. When editors are pinned they are moved to the left side of the current editor group. When moving an editor to the previous position in the current group if it happens to cross into the pinned section it will become pinned. But the inverse is not possible: you cannot move a pinned editor out of the pinned section unless there happens to be something else unpinned to the right of it. So I have a keybinding to unpin the current editor if it's the last editor in the current group. Since terminal editors don't set the required context they break this binding. Steps to Repro: Open a terminal in the editor area Pin the terminal editor Inspect context keys Notice activeEditorIsPinned is not set VS Code version: Code - Insiders 1.76.0-insider (, 2023-02-10T16:22:19.445Z) OS version: WindowsNT x64 10.0. Modes: Sandboxed: Yes <details<summarySystem Info</summary </detailsExtensions: none<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
The type of editor should not play any role in this. I somewhat doubt this is a bug in our code, so setting label that we need confirmation. Open for help, investigation, suggested fixes, PR.
This one I cannot confirm or reproduce. See this gif where I open a terminal, pin it and then inspect the context keys: ! What are some exact steps?
Looks like it depends where you click when inspecting context keys.


Question: import { ISimpleSelectedSuggestion } from 'vs/workbench/services/suggest/browser/simpleSuggestWidget'; import type { IMarker, ITheme, Terminal as RawXtermTerminal } from '@xterm/xterm'; import { ScrollPosition } from 'vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon'; <ins> import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; </ins> export const ITerminalService = createDecorator<ITerminalService>('terminalService'); export const ITerminalEditorService = createDecorator<ITerminalEditorService>('terminalEditorService');

I'm clicking inside the terminal, where my cursor is, because I'm attempting to make keybindings that work when using the terminal. You're clicking the editor tab. So it appears the context is set for the editor, but when you focus the terminal within it that context is removed. Interestingly I still see some of the context so not all of it is removed.
Quite likely that the terminal itself sets its own context keys.
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
/verified, but while confirming the fix I noticed more issues with these context keys


Question: // Layout centered Editor (only in vertical layout when one group is opened) const id = this.visibleEditors[Position.ONE] ? this.visibleEditors[Position.ONE].getId() : undefined; <del> const doCentering = this.layoutVertically && this.partService.isEditorLayoutCentered() && this.stacks.groups.length === 1 && id !== PREFERENCES_EDITOR_ID && id !== TEXT_DIFF_EDITOR_ID; </del> <ins> const doCentering = this.partService.isEditorLayoutCentered() && this.stacks.groups.length === 1 && id !== PREFERENCES_EDITOR_ID && id !== TEXT_DIFF_EDITOR_ID; </ins> if (doCentering && !this.centeredEditorActive) { this.centeredEditorSashLeft.show(); this.centeredEditorSashRight.show(); // no size set yet. Calculate a default value <del> if (!this.centeredEditorPreferedSize) { </del> <ins> if (!this.centeredEditorPreferredSize) { </ins> this.resetCenteredEditor(false); } } else if (!doCentering && this.centeredEditorActive) {

<!-- Do you have a question? Please ask it on --<!-- Use Help Report Issue to prefill these. --- VSCode Version: 1.21 OS Version: Mac 10.12.16 Steps to Reproduce: editor mode should be in vertical mode on centered layout with one tab, you should see it is centered split editor mode to horizontal mode centered layout will no longer work until you switch back to vertical mode <!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes
(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like: <!-- score: 0.458 --- <!-- score: 0.451 --- <!-- score: 0.451 --<!-- potentialduplicatescomment --
Thanks for figuring this out. I spent a while trying to figure out what the problem was. Thank to you, I changed splitting to vertical mode and now centered layout works. I can affirm that this big is happening to me too. I'm on a mac as well.
I would expect centered mode to work if I have horizontal layout and only one editor. I tried removing the check to simply also enable it for horizontal layout but somehow the layout gets broken in that case. I plan to fix this in the following week but just to let you know that a PR is more than welcome :)
I just let you know that money is more than welcome :smile: Just kidding... I run on fun xD you shall have your PR :) it has the number . The problem was, that the available size was calculated by using which holds the height and not the width of the editor when in horizontal mode. You have to play around with it a little... it seemed to work but I did no deep testing or anything As bonus I fixed two typos (one of whom I made myself :smile:)
thanks a lot for your PR, I just merged it in I tried it out and it works nicely, also thanks for fixing typos. For money feel free to apply for our internshipts if you are a student or to our open positions :)
:smile: I'll finish university in 4 month... so... I might very well do that xD


Question: return reject(new Error('Service Workers are not enabled. Webviews will not work. Try disabling private/incognito mode.')); } <del> const swPath = `service-worker.js${self.location.search}`; </del> <ins> const swPath = `service-worker.js?vscode-resource-base-authority=${(new URL(location.toString()).searchParams).get('vscode-resource-base-authority')}`; </ins> navigator.serviceWorker.register(swPath).then( async registration => {

<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: 1.62.3 OS Version: Chrome Version 96.0.4664.55 (Official Build) (arm64) macOS 12.0.1 Steps to Reproduce: vscode web version on localhost (use any build similar to ). Make sure the test repository has a jpg file such as the . Use a chromium based browser (not safari). on a .jpg file in the side pane explorer. Note that it takes 1s for the image to load, even when hosted from localhost. Click back and forth on other files and note that text files display immediately but any custom editor or image viewer that uses a webview always pauses for a second before loading Chrome/Edge service worker console and look for the service- version; note that the version increments each time the same webview is opened (and closed). It takes approximately 1050ms to load every image as shown in the following screenshot ! The service-worker for any webview is instantiated inside  with a query string that includes the unique id of the host frame. This is not actually needed or used by the webview code in but causes chromium based browsers to reinstall and reactivate the service worker even though the underlying service-worker code has the same code, eTag and content hash. For some reason Safari does not have the same delay. If the code is changed to only include the query parameter actually used by the script then the end to end browser time is reduced to 50ms on localhost, a 95% reduction The slow load time is experienced when navigating ordinary files in the editor with no extensions installed.


Question: return reject(new Error('Service Workers are not enabled. Webviews will not work. Try disabling private/incognito mode.')); } <del> const swPath = `service-worker.js${self.location.search}`; </del> <ins> const swPath = `service-worker.js?vscode-resource-base-authority=${(new URL(location.toString()).searchParams).get('vscode-resource-base-authority')}`; </ins> navigator.serviceWorker.register(swPath).then( async registration => {

It is also experienced (and why I noticed it) when developing custom editor extensions that use the webview. This makes it appear that built in editors such as the monaco editor are almost instantaneous, but third party editors appear to be 20x slower to load. ! Please see accompanying pull request, as a one line code change.


Question: return revive ? URI.revive(transformer.transformIncoming(obj)) : transformer.transformIncoming(obj); } <ins> if (obj instanceof VSBuffer) { return null; } </ins> // walk object (or array) for (const key in obj) { if (Object.hasOwnProperty.call(obj, key)) {

<!-- Please search existing issues to avoid creating duplicates. --- VS Code version: 1.62.3 (Universal) Jupyter Extension version (available under the Extensions sidebar): v2021.10. Python Extension version (available under the Extensions sidebar): v2021.11. OS (Windows Linux distro) and version: Mac Python and/or Anaconda version: 3.7.12 Type of virtual environment used (N/A ...): conda Jupyter server running: Remote I expect code cells to begin executing immediately and (for simple code snippets) to finish executing immediately (e.g. print('hello')) Once the jupyter notebook starts to contain a non-trivial amount of stuff, I start to observe the following behaviors: (1) code cells that contain simple tasks (e.g. ) start taking several seconds or more to complete, (2) it may take several seconds or even minutes for vscode to even visually show that it will start executing a code cell, and (3) in severe cases, the whole vscode editor will become unresponsive and I will need to force shut it down. Below is code for a jupyter notebook that contains a minimal example. The problems start to appear once you've cycled through the code cells 2 or 3 times. I think one of the main contributing factors to this issue are just notebooks that have a lot of "stuff" in them. To demonstrate that, the last code block prints 50 scatter plots as pngs, which the native jupyter lab server over the browser handles just fine... but vscode seems to have issues. Moreover, in this simple example I have observed instances where it starts to take a while to save the notebook and the editor may even become unresponsive. Other things to note: I am running this jupyter notebook on an AWS EC2 instance with ~90GB memory 48 CPUs (using a AWS linux ami: ). I have not yet observed these same issues when I have the kernel running on my local mac machine. <details<summaryJupyter example </summary<p</p</detailsHere is a screenshot where it takes almost 3 seconds for a simple print statement. I've seen worse in some of my code related to real projects, though. This is just what I was able to reproduce with a minimal example.


Question: return revive ? URI.revive(transformer.transformIncoming(obj)) : transformer.transformIncoming(obj); } <ins> if (obj instanceof VSBuffer) { return null; } </ins> // walk object (or array) for (const key in obj) { if (Object.hasOwnProperty.call(obj, key)) {

<img width="1593" alt="Screen Shot 2021-11-22 at 4 48 27 PM" src="https://user-"
Thanks for filing this issue & I'm sorry you're running into this issue, please could you try the following: Check the performance withouth any data frames in the outputs You can run most of the same cells, but not display the outputs (e.g. don't run the cells with ) I'd like to check whether the perf is a result of large outputs. If that doesn't make any difference please could you: Install VS Code Insiders Go into your settings and search for and change the logging level for Jupyter extension to Reload VS Code Try the same thing & provide the logs from the output panel (use the command to get to the output panel)
Thanks . Not displaying large amounts of output does help. I experimented with the code a bit and here are my observations: (1) If I disable the cell with just the statement (but still outputting the figures), while it helps a little, I still see a significant slowdown. In particular, once I execute the code block that prints the figures (see below) and it is done, I try to execute the first code block again (containing the import statements), but there is a good 30-60 second delay until it will start to executing. (2) If I still create the figures but no longer display them (see below), this helps immensely with performance... there are basically no issues. (3) While still hiding the figures as in (2), but I go back to displaying and increasing the number of columns and rows of that are display to 200 (see below), then there is small decrease in performance. (4) If I do the same as (3), but take it even further by displaying 500 rows and columns of , then performance significantly degrades (see the screenshot). Once it was done displaying , it took ~19 seconds for a print statement, ~35 seconds to make the figures (normally takes a ~3-5 seconds), and it took over a minute to execute that last empty cell (the execution time was hidden once it was done). <img width="1585" alt="Screen Shot 2021-11-23 at 10 14 06 AM" src="https://user-"
Thanks for the feedback.


Question: return revive ? URI.revive(transformer.transformIncoming(obj)) : transformer.transformIncoming(obj); } <ins> if (obj instanceof VSBuffer) { return null; } </ins> // walk object (or array) for (const key in obj) { if (Object.hasOwnProperty.call(obj, key)) {

Please could you: Install VS Code Insiders Go into your settings and search for and change the logging level for Jupyter extension to Reload VS Code Run the command An editor will be opened with some text such as , please copy all of that & paste that into this issue Try simple print statements (without any data frames, and figures, lets keep it very simple) Please ensure the notebook is empty & does not contain any outputs only 1-2 cells with simple print statements. Provide the logs from the output panel (use the command to get to the output panel) Reload VS Code Repeat what you did earlier Provide the logs from the output panel (use the command to get to the output panel) Please note, I'll need two logs, one without any data frames, no plots, just print statements. The other is the one with dataframes and the like.
Here is the text for : Even if vscode totally froze up while trying to run something in jupyter, I was still always able to ssh into the server no problem. Here is the Jupyter output from just the print statements: <details<summaryLog</summary</detailsHere is the Jupyter output where I print large dataframes and plots: <details<summaryLog</summary</detailsFew other things I've observed: (1) In the second log above, I see there are some lines like in it, but I was not always able to reproduce that output. (2) Here are some additional logs that I observed while it took 15 minutes to execute a cell with a simple print statement (but it was executed after cells with the dataframes and plots): <details<summaryLog from </summary</details<details<summaryLog from </summary</details
Thanks for the logs. Transferring to VS Code due to connectivity issues with remtoe SSH
Also having this issue with jupyter over ssh, in a notebook that has a decent number of plots.
This issue happened with me also (especially when i am insider a docker container inside the remote machine)
I have the same issue, even when I freshly open a notebook with some outputs it is very slow and unresponsive. <img width="273" alt="image" src="https://user-"I have a stable connection to the server: !
Same problem, sometimes it works fine, sometimes it is unusable, stable and insider !
After discussion in sync.


Question: return revive ? URI.revive(transformer.transformIncoming(obj)) : transformer.transformIncoming(obj); } <ins> if (obj instanceof VSBuffer) { return null; } </ins> // walk object (or array) for (const key in obj) { if (Object.hasOwnProperty.call(obj, key)) {

Possibly add logging for every message that's only turned on if the user explicitly is told to (for debugging purposes).
experiencing similar issues when working on jupyter via ssh to an ubuntu server from an ubuntu pc
ALso had the issue where running a cell lags(or starts after some time) for jupyter notebooks when using remote SSH aws azure
Still the same problem
I also experience the same. I observed that: It happens with Jupyter notebooks, but not in the Interactive window. It does not happen if you connect to a Jupyter kernel that is not managed by VScode. It happens when your notebooks has many figures. I hope these may help diagnose the problem.
Same here..
As an additional info to what enlightened us. Jupyter execution on remote ssh machine slows down (i.e., gets stuck) when notebook size is large (64 MB). VS code executing notebook cell normally for smaller sized (ie., 1MB ) notebook
Would it be possible to share such a notebook? Is the size 64 MB with or without ouput in the notebook? If its a large file you could optionally email it to one of us (us = Microsoft maintainers of VS Code)
sorry that is confidential work for the time being.
Experiencing the same issue as well. Networking is not a problem since I connect to the notebook's machine on a local network
I've also been having this issue lately although I think it only happens in certain circumstances. I can't share the notebook I'm working with at the moment as it's private (sorry!), but it does have many matplotlib figure outputs and dataframe outputs. The notebook itself is only 3.6 MB in size. I'm running the notebook on a Linux server with Python 3.9.7, specifically I'm connecting to the machine remotely with "Connect to Host" to edit and run code on the server remotely. Latest version of VS Code and all extensions, connecting from a machine running Windows 11. It seems connecting on the same network as the machine with my Linux laptop doesn't result in any issues, and I haven't noticed any problems with running the notebook from there. However, connecting from a different network when working from home causes the same notebook to be very laggy, including lagging for 30+ seconds on simple code cells containing e.g. just a print statement.


Question: return revive ? URI.revive(transformer.transformIncoming(obj)) : transformer.transformIncoming(obj); } <ins> if (obj instanceof VSBuffer) { return null; } </ins> // walk object (or array) for (const key in obj) { if (Object.hasOwnProperty.call(obj, key)) {

I don't see how network speed/my connection to the server from home could be the issue (12ms ping, ~5 Mbps upload / ~50 Mbps download connections). Maybe there's something in the different OSes having different results, could also be unrelated though. I should try connecting with a Linux machine not on the same network and see if I can reproduce the results.
Same problem here, just a correction it is not dependent on the figure number or commands difficulty, will take to execute 30 to 40s, and yes with a separate instance of Jupyter Lab server (not managed by VScode). Directly connecting to Jupyterlab over ssh port forwarding order of magnitude faster. Workflow: Windows to Linux remote SSH (cluster) Another instance in the cluster used to set up JupyterLab instance Change Jupyter server to remote of the previously created instance execution super slow (even delay between starting and finishing) ~ 30 second delay followed up by ~ 40 s execution Connecting directly from Windows tunnel to JupyterLab ~ few seconds execution Note: Both the Jupyter Lab instance and the initial remote ssh share access to the file system, just different hardware. Also after changing to remote, some shenanigans happen with the vscode, unable to open files, etc, had to restart everything to make it work again.
I've had the same issue with VScode and Jupyter - notebooks becoming unresponsive after a few cells are used. The console shows continuous (every 20 seconds) reconnecting. with the level set to "trace". I can share a relevant file if it is helpful.
I've had the same slow issue with VScode and Jupyter when connecting to a remote docker container via ssh, and I've also observed that keeps producing tremendous streams
If someone can share a notebook that triggers this issue (lots of outputs, graphs with lots of data, etc?) that would be helpful, thanks
I noticed that if I switch the format from svg to png (by changing the setting ), the notebook would run smoother.


Question: return revive ? URI.revive(transformer.transformIncoming(obj)) : transformer.transformIncoming(obj); } <ins> if (obj instanceof VSBuffer) { return null; } </ins> // walk object (or array) for (const key in obj) { if (Object.hasOwnProperty.call(obj, key)) {

My network: Roundtrip latency: 5.520ms Up: 2898.6 Mbps Down: 3007.5 Mbps Authority: ssh-remote+** Roundtrip latency: 21.320ms Up: 25.8 Mbps Down: 385.0 Mbps A test notebook (1KB zip file), need , and to run:
Having the same exact issue and it renders the jupyter unresponsive: ! And it's still running. A temporary solution I found is to click on "Clear outputs for all cells" and more often than not it works smooth again. Only works if the cell stops executing though...
I think notebook size may be the reason.
I resolved my issue by closing the JUPYTER: VARIABLES in the terminal below Maybe in my case was an issue with the output variables inside the jupyter section ..
I resolved it by using a jupyter server running on the remote machine which was not started by VSC. I'll use that until this bug is fixed unfortunately
life saviour! "Clear outputs for all cells" worked smooth as butter (:
Happy to help. I saw in one of the other tickets this bug has a synergy with notebook size, and since clearing all outputs reduces notebook size, this might be a temporary fix until the size increases eventually and we need to do it again. I would love to see this fixed as this bug is the biggest hindrance to me day-to-day vscode experience.
Same here, this issue was driving me crazy. That's the solution indeed, I had a lot of local memory usage in my code, not sure about what was the actual issue. EDIT: it seems I spoke too early. When a cell takes very long to compute, vscode seems to "disconnect" from the kernel, and any subsequenc cell evaluation waits forever without running.
I pushed a change which should mostly fix this slowness with large outputs. I think there are more optimizations we could do. The issue comes when a save happens, and this blocks the remote extension host process for some period of time. Then a symptom of that might be that an execution appears to hang or take a long time. Would appreciate anyone trying this out in tomorrow's vscode insiders build.


Question: return revive ? URI.revive(transformer.transformIncoming(obj)) : transformer.transformIncoming(obj); } <ins> if (obj instanceof VSBuffer) { return null; } </ins> // walk object (or array) for (const key in obj) { if (Object.hasOwnProperty.call(obj, key)) {

If you're seeing an issue related to the variables view, that wouldn't be fixed here, however I recently pushed a different fix that may help with that, and you could try it out in insiders + the jupyter pre-release extension.
I have been experiencing these slowdowns (specifically on an AWS server) and I don't use the variables view. I definitely found that clearing cell outputs eliminates the hangs. I'm confused how this is caused by saving though, because I just found that the notebook I was working on wasn't being saved. I was doing some work tethered to my phone as I rode a bus into remote mountains. Certainly noticed that the bad connectivity meant even more waiting for things to execute than usual. Unfortunately, when I got back to stronger internet vscode was complaining it couldn't connect and was hanging when it tried to save. I figured it was fine since I saw 's comment and naively interpreted that as meaning I should feel comfortable that my notebook was getting saved each time it hung. Nope. When I finally had to reload window to get things back to working I found that all the code I wrote on the bus was no longer in the notebook (no worries, I had copied it out just in case, so no loss). I'm trying the 2023-01-13T07:49:05.588Z insiders build right now (is the "tomorrow's" build that should have the changes?). I think it is still too soon for me to be able to offer an opinion on how much of an improvement this fix might be. It is hard because the problem is erratic: sometimes cells execute immediately and sometimes it takes 20 seconds or longer.
Yeah, that version has the latest fix, you might have hit a different issue. And the issue might still have been kicked off by the notebook attempting to save. I'll leave this issue open to track namely, we still send notebook data between the processes more often than we technically have to, and I think that can be improved. Sorry about that, glad you had it saved, the intent is that the unsaved changes would have been persisted on the frontend.
I can confirm that this change is a big improvement for my use case. If those additional optimizations ever get prioritized that would be amazing and appreciated, but I'm already grateful for this improvement. Thank you!


Question: return revive ? URI.revive(transformer.transformIncoming(obj)) : transformer.transformIncoming(obj); } <ins> if (obj instanceof VSBuffer) { return null; } </ins> // walk object (or array) for (const key in obj) { if (Object.hasOwnProperty.call(obj, key)) {

On second thought, closing this issue, and moving other work to
I have tried the insiders version on a podman container accessed on a machine over ssh (so I do vscode remote via ssh to the machine and then I use remote containers to access the container). It does not open a terminal and seems to be spinning forever with the following error in the logs: 2023-01-27 10:40:00.790 [info] [LocalProcess0][resolveAuthority(attached-container,27)][1013ms] waiting... 2023-01-27 10:40:00.818 [error] Shell server failed: Error: stream ended with:4 but wanted:9 at u (c:Usersvince.vscode-insidersextensionsms-vscode-distextension) at c:Usersvince.vscode-insidersextensionsms-vscode-distextension at s (c:Usersvince.vscode-insidersextensionsms-vscode-distextension) at Socket.<anonymous(c:Usersvince.vscode-insidersextensionsms-vscode-distextension) at (node:events:538:35) at endReadableNT (node:internal/streams/readable:1345:12) at process.processTicksAndRejections (node:internal/process/task_queues:83:21) May this be related to the recent changes or shall I seek for another bug report and eventually open a new one?
Not related to this change- you can open an issue against the Remote Containers extension, I'm not sure how to interpet that error
Hello, I have installed latest Insider's VS Code, maybe it's a bit better now, but in general issue is still there. Very slooow Jupyter Notebooks on large content. I'm using jupyter/r-notebook docker image to run on AWS EC2 instance and have 2 options to acces it: from browser on 8888 port to web version of Jupyter notebooks. It works lightning fast and responsive. over SSH to EC2 instance and then "Attach to running container" So if I compare those 2 options there is a huge difference in UI when notebook has some data and charts. For me it feels like VS Code continuously sends data to server. Even dropdown for intellisence takes few seconds to load.


Question: return revive ? URI.revive(transformer.transformIncoming(obj)) : transformer.transformIncoming(obj); } <ins> if (obj instanceof VSBuffer) { return null; } </ins> // walk object (or array) for (const key in obj) { if (Object.hasOwnProperty.call(obj, key)) {

It's so sad that I'm unable to use VS Code Jupyter Notebooks for my work. But if I create a brand new empty notebook in VS Code - everything works like a charm!
We have experimental saving logic for Remote SSH, it would be great if you can give this a try and see if it improves the performance on large notebooks Install latest VS Code Insiders Remote SSH into your remote machine Add to your Remote/User settings Reload the window Then test the scenarios which used to slow or block the network Thanks in advance!
The improvements are noticeable, thank you for your great work! However, the latency is still there and appears to be significant from time to time. I love this ssh-notebook function, and I believe there must be more folks like me. Hope your team can prioritize this issue. Appreciate!
Hi, I just checked VS Code Insiders 1.81.0 version with "Remote Save" feature enabled in settings. I have generated in a loop 30 charts in first cell and after this I run code in a new cell. It still hangs for a while after generating charts for the first run. If I run second cell code again, it executes immediately as expected. So we still have an issue when a lot of data (or visual data) was generated recently. I checked the same code in web UI of Jupyter - and it works fast. Anton. From: Peng Lyu Friday, June 30, 2023 12:33 AM To: microsoft/vscode bo44arov Mention Re: [microsoft/vscode] Jupyter over remote ssh sometimes becomes slow and/or unresponsive (Issue ) have experimental saving logic for Remote SSH, it would be great if you can give this a try and see if it improves the performance on large notebooks Install latest VS Code Insiders Remote SSH into your remote machine Add "notebook.experimental.remoteSave": true to your Remote/User settings Reload the window Then test the scenarios which used to slow or block the network Thanks in advance! Reply to this email directly, view it on GitHub, or unsubscribe You are receiving this because you were mentioned.Message ID:


Question: whenLabel.element.title = keybindingItemEntry.keybindingItem.when; } else { this.whenColumn.textContent = '—'; <ins> this.whenColumn.title = ''; </ins> } }

Issue Type: <bBug</bKeybindings GUI (Sometimes optional) Scroll down/up over empty when columns shows when contexts from some other rows VS Code version: Code - Insiders 1.31.0-insider (, 2019-02-01T18:34:04.940Z) OS version: Windows_NT x64 10.0.


Question: // In wait mode, listen to changes to the editors and wait until the files // are closed that the user wants to wait for. When this happens we delete // the wait marker file to signal to the outside that editing is done. <del> const resourcesToWaitFor = request.filesToWait.paths.map(p => URI.revive(p.fileUri)); </del> const waitMarkerFile = URI.revive(request.filesToWait.waitMarkerFileUri); <del> const unbind = this.editorService.onDidCloseEditor(() => { if (resourcesToWaitFor.every(resource => !this.editorService.isOpen({ resource }))) { unbind.dispose(); this.fileService.del(waitMarkerFile); </del> <ins> const resourcesToWaitFor = coalesce(request.filesToWait.paths.map(p => URI.revive(p.fileUri))); this.trackClosedWaitFiles(waitMarkerFile, resourcesToWaitFor); } } private trackClosedWaitFiles(waitMarkerFile: URI, resourcesToWaitFor: URI[]): IDisposable { const listener = this.editorService.onDidCloseEditor(async () => { // In wait mode, listen to changes to the editors and wait until the files // are closed that the user wants to wait for. When this happens we delete // the wait marker file to signal to the outside that editing is done. if (resourcesToWaitFor.every(resource => !this.editorService.isOpen({ resource }))) { // If auto save is configured with the default delay (1s) it is possible // to close the editor while the save still continues in the background. As such // we have to also check if the files to wait for are dirty and if so wait // for them to get saved before deleting the wait marker file. const dirtyFilesToWait = this.textFileService.getDirty(resourcesToWaitFor); if (dirtyFilesToWait.length > 0) { await Promise.all(dirtyFilesToWait.map(async dirtyFileToWait => await this.joinResourceSaved(dirtyFileToWait))); } listener.dispose(); await this.fileService.del(waitMarkerFile); } }); return listener; } private joinResourceSaved(resource: URI): Promise<void> { return new Promise(resolve => { if (!this.textFileService.isDirty(resource)) { return resolve(); // return early if resource is not dirty } // Otherwise resolve promise when resource is saved const listener = this.textFileService.models.onModelSaved(e => { if (isEqual(resource, e.resource)) { listener.dispose(); resolve(); </ins> } }); <del> } </del> <ins> }); </ins> } private openResources(resources: Array<IResourceInput | IUntitledResourceInput>, diffMode: boolean): void {

VSCode Version: 1.33.1 OS Version: 10.14.4 When editing and closing a git commit message file very quickly, the contents are not provided to git. Currently I manually save before closing any git commit file but it seems clear this should work properly - autosave should happen, then Code should inform Git that the commit file is ready. Currently it appears the two events are happening in reverse order, causing a bug. Steps to Reproduce: VS Code as editor () a git commit the commit message in Code close the commit message in Code, before autosave occurs Result: git complains about an empty commit message Expected: Autosave should happen before Code releases control back to git, resulting in a properly saved commit message Does this issue occur when all extensions are disabled?: Yes
Good catch. Extra points for using auto save in VSCode :+1:
via


Question: let lastPageIndex = this.view.indexAt(this.view.getScrollTop() + this.view.renderHeight); lastPageIndex = lastPageIndex === 0 ? 0 : lastPageIndex - 1; const lastPageElement = this.view.element(lastPageIndex); <del> const currentlyFocusedElement = this.getFocusedElements()[0]; </del> <ins> const currentlyFocusedElementIndex = this.getFocus()[0]; const currentlyFocusedElement = this.view.element(currentlyFocusedElementIndex); </ins> <del> if (currentlyFocusedElement !== lastPageElement) { </del> <ins> if (currentlyFocusedElement !== lastPageElement && lastPageIndex > currentlyFocusedElementIndex) { </ins> const lastGoodPageIndex = this.findPreviousIndex(lastPageIndex, false, filter); if (lastGoodPageIndex > -1 && currentlyFocusedElement !== this.view.element(lastGoodPageIndex)) {

Open Select the top cell and page down a few times Focus hits a cell that is longer than the viewport, which is maybe important, then the next page down moves to a higher cell
When a list item is larger than the viewport, and it's also the only element in the viewport, pressing page down will reveal to the previous element, this is because we did a here (the catch is, the last page element is also the first page element)


Question: } }; <del> type ConfigureTrustedDomainChoice = 'trustDomain' | 'trustSubdomain' | 'trustAll' | 'manage'; interface ConfigureTrustedDomainsQuickPickItem extends IQuickPickItem { id: ConfigureTrustedDomainChoice; } </del> <ins> type ConfigureTrustedDomainsQuickPickItem = IQuickPickItem & ({ id: 'manage'; } | { id: 'trust'; toTrust: string }); </ins> type ConfigureTrustedDomainsChoiceClassification = { choice: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; };

Issue Type: <bBug</bWrite http://192.168.1.7:3000/ into a text file. Command-click it to try to open the link. You will get an alert asking whether you want to open the external website. Click “Configure Trusted Domains”. <img width="1025" alt="link and dialog asking to confirm opening external website" src="https://user-"Look at the second option in the menu. It says “Trust 1.7:3000 and all its subdomains”. But 1.7:3000 is not a valid address. <img width="1024" alt="link and menu with buggy entry “Trust 1.7:3000 and all its subdomains”" src="https://user-"I can only guess that VS Code thinks that “7” is a TLD and “1.7” is a full domain name. What I actually want to do is whitelist opening all links to IP addresses like . In other words, white-list the subnet . At least, I think that makes sense. But I am not a network engineer, so if it makes more sense to recommend to the user whitelisting some other subnet such as , or whitelisting only the address but on any port, that would be fine too. VS Code version: Code 1.40.1 (, 2019-11-13T16:47:44.719Z) OS version: Darwin x64 18.7.0


Question: super({ id: 'editor.createFoldingRangeFromSelection', label: nls.localize('createManualFoldRange.label', "Create Manual Folding Range from Selection"), <del> alias: 'Create Folding Range from Selection', </del> <ins> alias: 'Create Manual Folding Range from Selection', </ins> precondition: CONTEXT_FOLDING_ENABLED, kbOpts: { kbExpr: EditorContextKeys.editorTextFocus,

Chinese (Simplified) : <img width="321" alt="image" src="https://user-"English : <img width="272" alt="image" src="https://user-""Create Manual Folding Ranges from Selection" is not in Command Palette when use Chinese (Simplified) VSCode Version: 1.71.0 (both macOS & Win10) Chinese (Simplified) Version: 1.71.
Thank you for your feedback. We are currently reviewing it (reference ).
Could you please assist here? Thank you.
The problem is this label: should accept an  but it only accepts a string. deeper: and deeper:
The workaround is to use  to find this item.