Change:
Testing Before reverting metadata ! After reverting ! language remains . If I try to revert, nothing happens.
I was expecting the revert will revert the content to the version on the left side if the diff editor is opened from the timeline view, but it seems reverting to something different.
I think this can be fixed next month.
Thats a duplicate of Marking as as metadta gets reverted
Yes, the plan is to fix next month, I have a PR, but do not want to merge it just yet Its a slightly convoluted issue,

Discussion:
language, ...filteredMetadata }; <ins> // Give preference to the language we have been given. // Metadata can contain `language` due to round-tripping of cell metadata. // I.e. we add it here, and then from SCM when we revert the cell, we get this same metadata back with the `language` property. if (language) { obj.language = language; } </ins> const metadataSource = toFormattedString(obj, {}); return metadataSource;

import { DEFAULT_EDITOR_ASSOCIATION } from 'vs/workbench/common/editor'; import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; <del> import { CellEditType, NOTEBOOK_DIFF_EDITOR_ID } from 'vs/workbench/contrib/notebook/common/notebookCommon'; </del> <ins> import { CellEditType, ICellEditOperation, NOTEBOOK_DIFF_EDITOR_ID } from 'vs/workbench/contrib/notebook/common/notebookCommon'; </ins> import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfiguration'; import { NotebookMultiTextDiffEditor } from 'vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor'; import { Codicon } from 'vs/base/common/codicons';

return; } <ins> if (!(context.cell instanceof SideBySideDiffElementViewModel)) { return; } </ins> const original = context.cell.original; const modified = context.cell.modified; <del> if (!original || !modified) { </del> <ins> const modifiedCellIndex = context.cell.mainDocumentTextModel.cells.indexOf(modified.textModel); if (modifiedCellIndex === -1) { </ins> return; } <del> modified.textModel.metadata = original.metadata; </del> <ins> const rawEdits: ICellEditOperation[] = [{ editType: CellEditType.Metadata, index: modifiedCellIndex, metadata: original.metadata }]; if (context.cell.original.language && context.cell.modified.language !== context.cell.original.language) { rawEdits.push({ editType: CellEditType.CellLanguage, index: modifiedCellIndex, language: context.cell.original.language }); } context.cell.modifiedDocument.applyEdits(rawEdits, true, undefined, () => undefined, undefined, true); </ins> } });

resource ); this._disposables.push(disposables.add(ref.object.notebook.onDidChangeContent(e => { <del> if (result && e.rawEvents.some(event => event.kind === NotebookCellsChangeType.ChangeCellMetadata && event.index === cellIndex)) { </del> <ins> if (result && e.rawEvents.some(event => (event.kind === NotebookCellsChangeType.ChangeCellMetadata || event.kind === NotebookCellsChangeType.ChangeCellLanguage) && event.index === cellIndex)) { </ins> const value = getFormattedMetadataJSON(ref.object.notebook, cell.metadata, cell.language); if (result.getValue() !== value) { result.setValue(getFormattedMetadataJSON(ref.object.notebook, cell.metadata, cell.language));