Skip to content

Commit d3f9849

Browse files
authored
fix(autofix): Invalidate setup query on consent (#101267)
Fixes customer complaints where clicking the consent button in the flyout didn't do anything until you refreshed the page
1 parent f4b6260 commit d3f9849

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

static/app/components/events/autofix/useSeerAcknowledgeMutation.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,21 @@ export function useSeerAcknowledgeMutation() {
2121
});
2222
},
2323
onSuccess: () => {
24+
// Invalidate organization-level setup check
2425
queryClient.invalidateQueries({
2526
queryKey: [setupCheckQueryKey(organization.slug)],
2627
});
28+
// Invalidate all group-level autofix setup queries
29+
queryClient.invalidateQueries({
30+
predicate: query => {
31+
const key = query.queryKey[0];
32+
return (
33+
typeof key === 'string' &&
34+
key.includes(`/organizations/${organization.slug}/issues/`) &&
35+
key.includes('/autofix/setup/')
36+
);
37+
},
38+
});
2739
},
2840
});
2941

0 commit comments

Comments
 (0)