From 44ab2c5112c16cfb94744797826076469806853c Mon Sep 17 00:00:00 2001 From: Sawyer Date: Fri, 18 Sep 2026 15:50:33 -0700 Subject: [PATCH] fix(web): the workbench's Artifacts panel refreshes when an agent saves an artifact (CL-8604) --- apps/web/src/pages/workbench-page.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/web/src/pages/workbench-page.tsx b/apps/web/src/pages/workbench-page.tsx index e6c956fca..23d598c00 100644 --- a/apps/web/src/pages/workbench-page.tsx +++ b/apps/web/src/pages/workbench-page.tsx @@ -264,7 +264,8 @@ function Workbench({ workbenchTenantId }: { readonly workbenchTenantId: string } // Invalidates rather than patches: the stream carries no thread // identity. Also invalidates approvals, since a parked ask sends no - // mail but still ticks the stream. + // mail but still ticks the stream. An agent reply may have saved an + // artifact too, so the panel and library counts stay in sync. useEffect( () => subscribeToInbox(workbenchTenantId, () => { @@ -272,6 +273,7 @@ function Workbench({ workbenchTenantId }: { readonly workbenchTenantId: string } void queryClient.invalidateQueries({ queryKey: tenantKeys.pendingApprovals(workbenchTenantId), }); + void queryClient.invalidateQueries({ queryKey: tenantKeys.artifacts(workbenchTenantId) }); }), [workbenchTenantId, queryClient], );