Surface polish: batched Minor findings from the native-surfaces final review (#71) (#75)

This commit was merged in pull request #75.
This commit is contained in:
2026-07-03 03:20:23 +00:00
parent a90cc06dfa
commit 3e7ad58247
6 changed files with 372 additions and 22 deletions
+7 -1
View File
@@ -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.",
);
+6 -1
View File
@@ -119,7 +119,12 @@ export class GitBaselineAdapter implements vscode.Disposable {
if (pending) clearTimeout(pending);
pending = setTimeout(() => void repo.status().catch(() => {}), 150);
});
this.disposables.push({ dispose: () => watcher.close() });
this.disposables.push({
dispose: () => {
watcher.close();
if (pending) clearTimeout(pending);
},
});
} catch {
// best-effort only — the passive repo.state.onDidChange listener still applies.
}