From e4982102469fc7b53a502aede2157e4c033f2d55 Mon Sep 17 00:00:00 2001 From: Ehab Younes Date: Fri, 13 Mar 2026 15:59:04 +0300 Subject: [PATCH 1/2] fix: show Tasks view container in Cursor when not authenticated Cursor has a bug where view containers whose views are all hidden via `when` clauses never re-appear after the context changes. Add a placeholder login tree view so the coderTasks container always has at least one visible view. Fixes #838 --- package.json | 11 +++++++++++ src/extension.ts | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/package.json b/package.json index a07093c4..031f43a2 100644 --- a/package.json +++ b/package.json @@ -211,6 +211,12 @@ } ], "coderTasks": [ + { + "id": "coder.tasksLogin", + "name": "Coder Tasks", + "icon": "media/tasks-logo.svg", + "when": "!coder.authenticated" + }, { "type": "webview", "id": "coder.tasksPanel", @@ -225,6 +231,11 @@ "view": "myWorkspaces", "contents": "Coder is a platform that provisions remote development environments. \n[Login](command:coder.login)", "when": "!coder.authenticated && coder.loaded" + }, + { + "view": "coder.tasksLogin", + "contents": "Sign in to view and manage Coder tasks.\n[Login](command:coder.login)", + "when": "!coder.authenticated && coder.loaded" } ], "commands": [ diff --git a/src/extension.ts b/src/extension.ts index 4a0db0ad..4ef8a2b7 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -188,6 +188,18 @@ export async function activate(ctx: vscode.ExtensionContext): Promise { // controlled by contexts, see `when` in the package.json. const commands = new Commands(serviceContainer, client, deploymentManager); + // Placeholder tree view for the coderTasks container when not authenticated. + // Works around a Cursor bug where containers with all views hidden via `when` + // clauses never re-appear after the context changes. + ctx.subscriptions.push( + vscode.window.createTreeView("coder.tasksLogin", { + treeDataProvider: { + getTreeItem: () => new vscode.TreeItem(""), + getChildren: () => [], + }, + }), + ); + // Register Tasks webview panel with dependencies const tasksPanelProvider = new TasksPanelProvider( ctx.extensionUri, From 6873dc0edf833d7988cb363c39a9d4f5cfcf7420 Mon Sep 17 00:00:00 2001 From: Ehab Younes Date: Mon, 16 Mar 2026 14:58:23 +0300 Subject: [PATCH 2/2] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4154886..dc5fc7c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - Fixed SSH config writes failing on Windows when antivirus, cloud sync software, or another process briefly locks the file. +- Fixed Tasks view container not showing in Cursor when not authenticated. ### Changed