From 3f544bf76a25245737d5de016cc0651b2c97fb20 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Jan 2026 16:43:41 +0000 Subject: [PATCH 1/2] Initial plan From 4039b4fbe5375eacb414797726339890182f3758 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Jan 2026 16:47:30 +0000 Subject: [PATCH 2/2] Fix race condition in notifyVisibilityChange Add isRunning() check before sending notifications to the language client to prevent "Client is not running" errors in test environments where the client may not have fully started yet. Co-authored-by: cklin <1418580+cklin@users.noreply.github.com> --- extensions/ql-vscode/src/language-support/language-client.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/ql-vscode/src/language-support/language-client.ts b/extensions/ql-vscode/src/language-support/language-client.ts index 07a3296b1af..df060c21944 100644 --- a/extensions/ql-vscode/src/language-support/language-client.ts +++ b/extensions/ql-vscode/src/language-support/language-client.ts @@ -45,6 +45,10 @@ export class CodeQLLanguageClient extends LanguageClient { } notifyVisibilityChange(editors: readonly TextEditor[]) { + // Only send notification if the language client is running to avoid race conditions + if (!this.isRunning()) { + return; + } const files = editors .filter((e) => e.document.uri.scheme === "file") .map((e) => e.document.uri.toString());