From 17d34d66c20e6c39949c60a03b506b93eff63b53 Mon Sep 17 00:00:00 2001 From: "blink-so[bot]" <211532188+blink-so[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 18:42:23 +0000 Subject: [PATCH 1/4] Add configuration option to disable workspace update notifications Adds coder.disableUpdateNotifications setting to allow users to disable the popup notifications when workspace template updates are available. Co-authored-by: kylecarbs <7122116+kylecarbs@users.noreply.github.com> --- package.json | 5 +++++ src/workspaceMonitor.ts | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/package.json b/package.json index e3e7556a..7896243e 100644 --- a/package.json +++ b/package.json @@ -109,6 +109,11 @@ "markdownDescription": "Automatically log into the default URL when the extension is activated. coder.defaultUrl is preferred, otherwise the CODER_URL environment variable will be used. This setting has no effect if neither is set.", "type": "boolean", "default": false + }, + "coder.disableUpdateNotifications": { + "markdownDescription": "Disable notifications when workspace template updates are available.", + "type": "boolean", + "default": false } } }, diff --git a/src/workspaceMonitor.ts b/src/workspaceMonitor.ts index 18df50b2..34ca022e 100644 --- a/src/workspaceMonitor.ts +++ b/src/workspaceMonitor.ts @@ -172,6 +172,13 @@ export class WorkspaceMonitor implements vscode.Disposable { private maybeNotifyOutdated(workspace: Workspace) { if (!this.notifiedOutdated && workspace.outdated) { this.notifiedOutdated = true; + + // Check if update notifications are disabled + const disableNotifications = vscode.workspace.getConfiguration("coder").get("disableUpdateNotifications", false); + if (disableNotifications) { + return; + } + this.restClient .getTemplate(workspace.template_id) .then((template) => { From 4fd85a0b4b3cb70a00c0aeb672ee40ca2dc0a1db Mon Sep 17 00:00:00 2001 From: "blink-so[bot]" <211532188+blink-so[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 18:44:34 +0000 Subject: [PATCH 2/4] Fix Prettier formatting issues Co-authored-by: kylecarbs <7122116+kylecarbs@users.noreply.github.com> --- src/workspaceMonitor.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/workspaceMonitor.ts b/src/workspaceMonitor.ts index 34ca022e..4c896674 100644 --- a/src/workspaceMonitor.ts +++ b/src/workspaceMonitor.ts @@ -172,13 +172,15 @@ export class WorkspaceMonitor implements vscode.Disposable { private maybeNotifyOutdated(workspace: Workspace) { if (!this.notifiedOutdated && workspace.outdated) { this.notifiedOutdated = true; - + // Check if update notifications are disabled - const disableNotifications = vscode.workspace.getConfiguration("coder").get("disableUpdateNotifications", false); + const disableNotifications = vscode.workspace + .getConfiguration("coder") + .get("disableUpdateNotifications", false); if (disableNotifications) { return; } - + this.restClient .getTemplate(workspace.template_id) .then((template) => { From d82b47b4b139d09caf7769ec487d0f8059ff8d01 Mon Sep 17 00:00:00 2001 From: "blink-so[bot]" <211532188+blink-so[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 19:12:36 +0000 Subject: [PATCH 3/4] Move notifiedOutdated assignment after disableNotifications check Only set notifiedOutdated to true if we actually notify the user about the outdated workspace, not when notifications are disabled. Co-authored-by: kylecarbs <7122116+kylecarbs@users.noreply.github.com> --- src/workspaceMonitor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/workspaceMonitor.ts b/src/workspaceMonitor.ts index 4c896674..189d444a 100644 --- a/src/workspaceMonitor.ts +++ b/src/workspaceMonitor.ts @@ -171,8 +171,6 @@ export class WorkspaceMonitor implements vscode.Disposable { private maybeNotifyOutdated(workspace: Workspace) { if (!this.notifiedOutdated && workspace.outdated) { - this.notifiedOutdated = true; - // Check if update notifications are disabled const disableNotifications = vscode.workspace .getConfiguration("coder") @@ -181,6 +179,8 @@ export class WorkspaceMonitor implements vscode.Disposable { return; } + this.notifiedOutdated = true; + this.restClient .getTemplate(workspace.template_id) .then((template) => { From 4d59afa499b7c5bbb3d7c9698aaacb2538ae481b Mon Sep 17 00:00:00 2001 From: "blink-so[bot]" <211532188+blink-so[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 19:16:34 +0000 Subject: [PATCH 4/4] Add changelog entry for disableUpdateNotifications setting Co-authored-by: kylecarbs <7122116+kylecarbs@users.noreply.github.com> --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f07f13fb..8725a127 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ - Update `/openDevContainer` to support all dev container features when hostPath and configFile are provided. +- Add `coder.disableUpdateNotifications` setting to disable workspace template + update notifications. ## [v1.9.2](https://github.com/coder/vscode-coder/releases/tag/v1.9.2) 2025-06-25