fix(seer): Clear cache for /seer/onboarding-check/ api response, and iterate on seer config reminder#112643
fix(seer): Clear cache for /seer/onboarding-check/ api response, and iterate on seer config reminder#112643
Conversation
…iterate on seer config reminder
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c00a24f. Configure here.
| staleTime: 60_000, | ||
| select: ({pages}) => pages.flatMap(page => page.json), | ||
| }); | ||
| useFetchAllPages({result: autofixResult}); |
There was a problem hiding this comment.
Expensive paginated query fires for all organizations unconditionally
Medium Severity
useReminderCopywriting unconditionally fires useInfiniteQuery with bulkAutofixAutomationSettingsInfiniteOptions plus useFetchAllPages, which fetches all pages of autofix automation settings for every project. Since PrimaryNavSeerConfigReminder renders in the navigation sidebar for every organization, this paginated fetch fires for all users — even those without seat-based-seer-enabled, where the results are immediately discarded (line 150). The old code only called useSeerOnboardingStep (a single API call). Adding enabled: hasSeatBasedSeer to the useInfiniteQuery and useFetchAllPages calls would prevent unnecessary requests.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c00a24f. Configure here.
There was a problem hiding this comment.
going to point out again that we should re-think the UI irt pagination, otherwise it'll be painfully slow for large orgs.
can we add some instrumentation for useFetchAllPages -- I'd be interested in # of pages we fetch and total time it takes
There was a problem hiding this comment.
should these query option generators be in their own subdir?
| staleTime: 60_000, | ||
| select: ({pages}) => pages.flatMap(page => page.json), | ||
| }); | ||
| useFetchAllPages({result: autofixResult}); |
There was a problem hiding this comment.
going to point out again that we should re-think the UI irt pagination, otherwise it'll be painfully slow for large orgs.
can we add some instrumentation for useFetchAllPages -- I'd be interested in # of pages we fetch and total time it takes


This updates the conditions for showing the Seer Config Reminder. We're looking at:
/seer/onboarding-check/)/seer/onboarding-check/)bulkAutofixAutomationSettingsInfiniteOptions())The conditions for the beta cohort are removed.
I've also updated the styles of the reminder, it was really chunky before for some reason.
Finally, I've added a couple calls to
invalidateQueries()so that/seer/onboarding-check/can be refreshed whenever someone toggle code-review. I need to followup on that in one more spot: on the seer repo details page. I'll also go back and look at SCM providers too, which will be slightly more annoying i think :(