Skip to content

The open-source app everyone uses to manage agents at work

Fix workspace form not refreshing when project accessed via URL key

Dotta81b4e4f82640
diff --git a/ui/src/components/ProjectProperties.tsx b/ui/src/components/ProjectProperties.tsx
index 7d833209e5..0901951492 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) });
}