Skip to content
Merged
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
4 changes: 3 additions & 1 deletion apps/web/src/pages/workbench-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,16 @@ 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, () => {
void queryClient.invalidateQueries({ queryKey: workbenchKeys.scope(workbenchTenantId) });
void queryClient.invalidateQueries({
queryKey: tenantKeys.pendingApprovals(workbenchTenantId),
});
void queryClient.invalidateQueries({ queryKey: tenantKeys.artifacts(workbenchTenantId) });
}),
[workbenchTenantId, queryClient],
);
Expand Down
Loading