Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@
}
],
"coderTasks": [
{
"id": "coder.tasksLogin",
"name": "Coder Tasks",
"icon": "media/tasks-logo.svg",
"when": "!coder.authenticated"
},
{
"type": "webview",
"id": "coder.tasksPanel",
Expand All @@ -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": [
Expand Down
12 changes: 12 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,18 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
// 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,
Expand Down