Change:
When updating cell metadata for a cell, users call which provides a function to alter the metadata of a cell. This uses defined in . When is called, the CellEditType is marked as , resulting in the metadata of the cell only being updated with the passed in data, rather than fully replaced. This makes it difficult to determine how to remove fields from a cell's metadata, a change needed for fixing . This can be worked around in this situation by setting the field to null. However, if a user calls , it appears that the functionality is a full replacement of initial metadata. There is a slight inconsistency here between the functionality of the two functions. Couple initial ideas: better document to reflect the behavior of . Add in a line stating that this is an iterative change, only altering the fields passed into this function - revise the functionality of either updateCell or updateNotebook metadata functions to align their behavior. This seems dangerous as it could likely break features leveraging this api. deprecate these functions, and rewrite two new ones with clearer functionality and documentation, based on updated needs from the notebook and jupyter teams
Analyzed all extensions using this API and most of them are already doing the right thing: clone the existing metadata, apply the change, and then call the API to update. However there are a few extensions didn't do so: there is one place where the metadata is not updated properly: PR . cc
<!-- 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!
what is the best way to verify this?
It's a bit complex I would love either or to help verify.

Discussion:
import { FileSystemProviderErrorCode, markAsFileSystemProviderError } from 'vs/platform/files/common/files'; import { RemoteAuthorityResolverErrorCode } from 'vs/platform/remote/common/remoteAuthorityResolver'; import { IRelativePatternDto } from 'vs/workbench/api/common/extHost.protocol'; <del> import { CellEditType, ICellPartialMetadataEdit, IDocumentMetadataEdit, isTextStreamMime } from 'vs/workbench/contrib/notebook/common/notebookCommon'; </del> <ins> import { CellEditType, ICellMetadataEdit, IDocumentMetadataEdit, isTextStreamMime } from 'vs/workbench/contrib/notebook/common/notebookCommon'; </ins> import { checkProposedApiEnabled } from 'vs/workbench/services/extensions/common/extensions'; import type * as vscode from 'vscode';

export interface IFileCellEdit { readonly _type: FileEditType.Cell; readonly uri: URI; <del> readonly edit?: ICellPartialMetadataEdit | IDocumentMetadataEdit; </del> <ins> readonly edit?: ICellMetadataEdit | IDocumentMetadataEdit; </ins> readonly notebookMetadata?: Record<string, any>; readonly metadata?: vscode.WorkspaceEditEntryMetadata; }

} private replaceNotebookCellMetadata(uri: URI, index: number, cellMetadata: Record<string, any>, metadata?: vscode.WorkspaceEditEntryMetadata): void { <del> this._edits.push({ _type: FileEditType.Cell, metadata, uri, edit: { editType: CellEditType.PartialMetadata, index, metadata: cellMetadata } }); </del> <ins> this._edits.push({ _type: FileEditType.Cell, metadata, uri, edit: { editType: CellEditType.Metadata, index, metadata: cellMetadata } }); </ins> } // --- text