 	}
 	
 	func previewUpdateStarted(response: SessionResponse.PreviewUpdateStartedData) {
-		guard let doc = parsedDocument else {
-			Log.warn("preview update witout a document", .app)
-			return
-		}
-		guard var preview = previewData[response.previewId] else { return }
-		
+//		guard let doc = parsedDocument else {
+//			Log.warn("preview update witout a document", .app)
+//			return
+//		}
+//		guard var preview = previewData[response.previewId] else { return }
+		guard let fileId = editorContext.value?.currentDocument.value?.file.fileId
+		else { fatalError("preview started with no editor context") }
+		NotificationCenter.default.postNotificationNameOnMainThread(.previewUpdateStarted, object: session, userInfo: ["fileId": fileId])
 	}
 }

	}

	private func requestUpdate(previewId: Int, chunkId: Int, includePrevious: Bool = false) -> SignalProducer<Void, Rc2Error> {
		guard var preview = previewData[previewId] else {
			let rerr = Rc2Error(type: .application, nested: PrecviewError.failedToUpdate, severity: .warning)
			Log.info("Failed to find preview \(previewId)", .app)
			return SignalProducer<Void, Rc2Error>(error: rerr)
		}
		let handler = SignalProducer<Void, Rc2Error> { [weak self] observer, _ in
			guard let me = self else { return }
			preview.updateObserver = observer
			// chunkIds will include previous
			let producer = me.session.updatePreviewChunks(previewId: previewId, chunkId: chunkId, includePrevious: includePrevious, updateId: "preview \(previewId)")
			producer.startWithCompleted {
				preview.updateObserver = nil
			}
			
		}

		if docHtmlLoaded || newDocument == parsedDocument  {
			Log.info("document changed with possible duplicate", .app)
		}
		guard let fileId = editorContext.value?.currentDocument.value?.file.fileId else {
			// no file
			currentPreview = nil
			return
