From 81b4e4f82640df043528d91d5fd59a2ec22adea8 Mon Sep 17 00:00:00 2001 From: Dotta Date: Mon, 16 Mar 2026 19:34:46 -0500 Subject: [PATCH] Fix workspace form not refreshing when project accessed via URL key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The invalidateProject() in ProjectProperties only invalidated queryKeys.projects.detail(project.id) (UUID), but the parent ProjectDetail query uses routeProjectRef which is typically the URL key (e.g. "openclaw-testing"). This meant mutations succeeded but the parent query was never refetched — the UI only updated on page refresh. Now also invalidates via project.urlKey so both UUID and URL-key based query caches are cleared. Co-Authored-By: Paperclip Co-Authored-By: Claude Opus 4.6 --- ui/src/components/ProjectProperties.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/src/components/ProjectProperties.tsx b/ui/src/components/ProjectProperties.tsx index 7d833209..09019514 100644 --- a/ui/src/components/ProjectProperties.tsx +++ b/ui/src/components/ProjectProperties.tsx @@ -205,6 +205,9 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa const invalidateProject = () => { queryClient.invalidateQueries({ queryKey: queryKeys.projects.detail(project.id) }); + if (project.urlKey !== project.id) { + queryClient.invalidateQueries({ queryKey: queryKeys.projects.detail(project.urlKey) }); + } if (selectedCompanyId) { queryClient.invalidateQueries({ queryKey: queryKeys.projects.list(selectedCompanyId) }); }