fix(select-org): show all of a user's orgs#103
Open
masnwilliams wants to merge 1 commit into
Open
Conversation
Clerk's useOrganizationList defaults pageSize to 10 and infinite: true only enables pagination — it doesn't auto-load. Bump pageSize to 100 and call fetchNext until all pages are loaded so the list reflects every membership.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Firetiger deploy monitoring skipped This PR didn't match the auto-monitor filter configured on your GitHub connection:
Reason: This PR modifies the select-org page (frontend/UI logic) and does not change any API endpoints in packages/api/cmd/api/ or Temporal workflows in packages/api/lib/temporal. To monitor this PR anyway, reply with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
useOrganizationListdefaultspageSizeto 10.infinite: trueonly enables pagination — nothing in the page ever calledfetchNext().pageSizeto 100 and added an effect that callsfetchNext()whilehasNextPageis true, so users with more memberships still see everything.Test plan
Note
Low Risk
UI-only change to org list loading on the select-org page; no auth, data, or payment logic touched.
Overview
Fixes the select-org screen so users with many Clerk memberships see the full list instead of only the first page.
useOrganizationListnow requestspageSize: 100(Clerk’s default is 10). AuseEffectkeeps callingfetchNext()whilehasNextPageis true and a fetch isn’t already in flight, so pagination actually loads remaining memberships when someone has more than one page.Reviewed by Cursor Bugbot for commit 6a663cb. Bugbot is set up for automated code reviews on this repo. Configure here.