From 8605737b4241d988d42addeb069f63494103c3a8 Mon Sep 17 00:00:00 2001 From: Jiahao Zhu Date: Fri, 23 Jan 2026 07:31:49 +0800 Subject: [PATCH] fix: load workspace templates on initial connect (#2) Previously, workspace templates were only loaded when connecting to remote workspaces due to a `workspaceType === "remote"` condition. This caused templates in local workspaces to not appear until a new template was created, which triggered a reload via saveTemplate(). Removed the restriction so loadWorkspaceTemplates() is called for all workspace types when a valid targetRoot exists. --- packages/app/src/app/context/workspace.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/app/src/app/context/workspace.ts b/packages/app/src/app/context/workspace.ts index 98ed9cf4d..02a354aa2 100644 --- a/packages/app/src/app/context/workspace.ts +++ b/packages/app/src/app/context/workspace.ts @@ -396,7 +396,8 @@ export function createWorkspaceStore(options: { options.setPendingPermissions([]); options.setSessionStatusById({}); - if (context?.workspaceType === "remote" && targetRoot) { + // Load workspace templates for all workspace types (local and remote) + if (targetRoot) { await options .loadWorkspaceTemplates({ workspaceRoot: targetRoot, quiet: true }) .catch(() => undefined);