From c52abdd2e58ad26fc71c69d9453427db03b0c66a Mon Sep 17 00:00:00 2001 From: BenStullsBets Date: Thu, 2 Jul 2026 20:14:54 -0700 Subject: [PATCH] fix: markReviewed on a never-established doc says 'coedit first', not 'git-tracked' (#71 item 1) Co-Authored-By: Claude Fable 5 --- src/diffViewController.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/diffViewController.ts b/src/diffViewController.ts index 2a7f2fd..32dac9a 100644 --- a/src/diffViewController.ts +++ b/src/diffViewController.ts @@ -145,7 +145,13 @@ export class DiffViewController implements vscode.Disposable { pin(document: vscode.TextDocument): void { if (!this.isDiffable(document)) return; const key = this.uriKey(document); - if (this.modes.get(key) !== "snapshot") { + const mode = this.modes.get(key); + if (mode === undefined) { + // never established — the document is not being coedited (#71 item 1) + void vscode.window.showWarningMessage("Run ✦ Coedit this Document with Claude first."); + return; + } + if (mode !== "snapshot") { void vscode.window.showWarningMessage( "Cowriting: this document is git-tracked — commit to advance the baseline.", );