diff --git a/packages/studio/src/components/WorkspaceDetailsSheet.tsx b/packages/studio/src/components/WorkspaceDetailsSheet.tsx index e1ccddf5..584981e9 100644 --- a/packages/studio/src/components/WorkspaceDetailsSheet.tsx +++ b/packages/studio/src/components/WorkspaceDetailsSheet.tsx @@ -866,8 +866,12 @@ function MembersSection({ workspaceId }: { workspaceId: string }) { const policy = useWorkspacePolicy(workspaceId) const canManageMembers = policy.can('workspace.manage') + // Admitting everyone edits the workspace itself and backfills the list, + // so one such save leaves both of them stale, + // and the toggle below reads its own state from the workspace rather than here. function invalidate() { queryClient.invalidateQueries({ queryKey: queryKeys.workspaceMembers(workspaceId) }) + queryClient.invalidateQueries({ queryKey: queryKeys.workspaces() }) } if (isLoading) { @@ -945,20 +949,24 @@ function AutoJoinControl({ workspaceId, onChanged }: { }) return ( -