Change:
Testing 1) I started with 2) I ran the first two cells and then committed 3) I reran cell 1 4) I changed cell 3 to use different file names 5) I opened the notebook diff from the SCM view -(a) cell metadata changes were shown -(b) changes to cell 3 where hidden -(c) toggling the "Toggle Collapse Unchanged Regions" didn't do anything !
I was unable to reproduce (b) reliably.
Verifier: Make the workbench small enough so when opening only the first cells show up Run the first two cells Commit/stage the file Scroll to the last cell, make changes, save (if you don't have auto save) Open the diff view, the change in the last cell should be rendered.
cannot test this due to

Discussion:
const cellHandlers = new Set<NotebookCellTextModel>(); const addCellContentChangeHandler = (cell: NotebookCellTextModel) => { <del> if (!cellHandlers.has(cell) && cell.textModel) { cellHandlers.add(cell); toDispose.add(cell.textModel.onDidChangeContent((e) => this._proxy.$acceptCellModelChanged(modelUrl, cell.handle, e))); } </del> <ins> cellHandlers.add(cell); toDispose.add(cell.onDidChangeContent((e) => { if (typeof e === 'object' && e.type === 'model') { this._proxy.$acceptCellModelChanged(modelUrl, cell.handle, e.event); } })); </ins> }; model.cells.forEach(cell => addCellContentChangeHandler(cell));

kind: e.kind, changes: e.changes.map(diff => [diff[0], diff[1], diff[2].map(cell => cellToDto(cell as NotebookCellTextModel))] as [number, number, IMainCellDto[]]) }); <ins> for (const change of e.changes) { for (const cell of change[2]) { addCellContentChangeHandler(cell as NotebookCellTextModel); } } </ins> break; } case NotebookCellsChangeType.Move: {

import { ThrottledDelayer } from '../../../../../base/common/async.js'; import { ILanguageDetectionService } from '../../../../services/languageDetection/common/languageDetectionWorkerService.js'; import { toFormattedString } from '../../../../../base/common/jsonFormatter.js'; <ins> import { IModelContentChangedEvent } from '../../../../../editor/common/textModelEvents.js'; </ins> export class NotebookCellTextModel extends Disposable implements ICell { private readonly _onDidChangeOutputs = this._register(new Emitter<NotebookCellOutputsSplice>());

private readonly _onDidChangeOutputItems = this._register(new Emitter<void>()); readonly onDidChangeOutputItems: Event<void> = this._onDidChangeOutputItems.event; <del> private readonly _onDidChangeContent = this._register(new Emitter<'content' | 'language' | 'mime'>()); readonly onDidChangeContent: Event<'content' | 'language' | 'mime'> = this._onDidChangeContent.event; </del> <ins> private readonly _onDidChangeContent = this._register(new Emitter<'content' | 'language' | 'mime' | { type: 'model'; event: IModelContentChangedEvent }>()); readonly onDidChangeContent: Event<'content' | 'language' | 'mime' | { type: 'model'; event: IModelContentChangedEvent }> = this._onDidChangeContent.event; </ins> private readonly _onDidChangeMetadata = this._register(new Emitter<void>()); readonly onDidChangeMetadata: Event<void> = this._onDidChangeMetadata.event;

// Listen to language changes on the model this._textModelDisposables.add(this._textModel.onDidChangeLanguage((e) => this.setRegisteredLanguage(this._languageService, e.newLanguage, this.language))); this._textModelDisposables.add(this._textModel.onWillDispose(() => this.textModel = undefined)); <del> this._textModelDisposables.add(this._textModel.onDidChangeContent(() => { </del> <ins> this._textModelDisposables.add(this._textModel.onDidChangeContent((e) => { </ins> if (this._textModel) { this._versionId = this._textModel.getVersionId(); this._alternativeId = this._textModel.getAlternativeVersionId(); } this._textBufferHash = null; <del> this._onDidChangeContent.fire('content'); </del> <ins> this._onDidChangeContent.fire({ type: 'model', event: e }); </ins> })); this._textModel._overwriteVersionId(this._versionId);

import { IPosition } from '../../../../../editor/common/core/position.js'; import { Range } from '../../../../../editor/common/core/range.js'; import { SearchParams } from '../../../../../editor/common/model/textModelSearch.js'; <ins> import { IModelContentChangedEvent } from '../../../../../editor/common/textModelEvents.js'; </ins> class StackOperation implements IWorkspaceUndoRedoElement { type: UndoRedoElementType.Workspace;

} } <del> private _bindCellContentHandler(cell: NotebookCellTextModel, e: 'content' | 'language' | 'mime') { </del> <ins> private _bindCellContentHandler(cell: NotebookCellTextModel, e: 'content' | 'language' | 'mime' | { type: 'model'; event: IModelContentChangedEvent }) { </ins> this._increaseVersionId(e === 'content'); switch (e) { case 'content':