Skip to content

fix(seer): Clear cache for /seer/onboarding-check/ api response, and iterate on seer config reminder#112643

Open
ryan953 wants to merge 1 commit intomasterfrom
ryan953/fix-seer-reminder-ui-cache-clearing
Open

fix(seer): Clear cache for /seer/onboarding-check/ api response, and iterate on seer config reminder#112643
ryan953 wants to merge 1 commit intomasterfrom
ryan953/fix-seer-reminder-ui-cache-clearing

Conversation

@ryan953
Copy link
Copy Markdown
Member

@ryan953 ryan953 commented Apr 10, 2026

This updates the conditions for showing the Seer Config Reminder. We're looking at:

  • if any SCM is configured (via /seer/onboarding-check/)
  • if any repo has code-review enabled (via /seer/onboarding-check/)
  • if any project has repo's connected to enable autofix (via 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 :(

Setup Need Img
SCM SCR-20260409-rdnc
Autofix SCR-20260409-raht
Code Review SCR-20260409-rbsq

@ryan953 ryan953 requested review from a team as code owners April 10, 2026 02:44
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 10, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c00a24f. Configure here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should these query option generators be in their own subdir?

staleTime: 60_000,
select: ({pages}) => pages.flatMap(page => page.json),
});
useFetchAllPages({result: autofixResult});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants