File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -359,11 +359,15 @@ export class DeepnoteFileChangeWatcher implements IExtensionSyncActivationServic
359359 } catch ( writeError ) {
360360 this . consumeSelfWrite ( fileUri ) ;
361361 logger . warn ( `[FileChangeWatcher] Failed to write synced file: ${ fileUri . path } ` , writeError ) ;
362+
363+ // Bail out — without a successful write, workspace.save() would hit
364+ // the stale mtime and show a "content is newer" conflict dialog.
365+ // The notebook stays dirty but cells are already up-to-date from applyEdit.
366+ return ;
362367 }
363368
364- // Now save — VS Code serializes (same bytes), sees the mtime is from our
365- // recent write (which its internal watcher has picked up), and writes
366- // successfully without a "content is newer" conflict.
369+ // Save to clear dirty state. VS Code serializes (same bytes) and sees the
370+ // mtime from our recent write, so no "content is newer" conflict.
367371 this . markSelfWrite ( fileUri ) ;
368372 try {
369373 await workspace . save ( notebook . uri ) ;
You can’t perform that action at this time.
0 commit comments