Skip to content

fix(select-org): show all of a user's orgs#103

Open
masnwilliams wants to merge 1 commit into
mainfrom
hypeship/select-org-show-all
Open

fix(select-org): show all of a user's orgs#103
masnwilliams wants to merge 1 commit into
mainfrom
hypeship/select-org-show-all

Conversation

@masnwilliams
Copy link
Copy Markdown
Collaborator

@masnwilliams masnwilliams commented May 24, 2026

Summary

  • The select-org page was only showing 10 organizations because Clerk's useOrganizationList defaults pageSize to 10. infinite: true only enables pagination — nothing in the page ever called fetchNext().
  • Bumped pageSize to 100 and added an effect that calls fetchNext() while hasNextPage is true, so users with more memberships still see everything.

Test plan

  • Sign in as a user with >10 org memberships and confirm all orgs appear in the list.
  • Sign in as a user with <10 org memberships and confirm behavior is unchanged.
  • Confirm scroll fade indicators still render correctly when the list overflows.

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.

useOrganizationList now requests pageSize: 100 (Clerk’s default is 10). A useEffect keeps calling fetchNext() while hasNextPage is 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.

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.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mcp Ready Ready Preview, Comment May 24, 2026 7:23pm

@masnwilliams masnwilliams marked this pull request as ready for review May 24, 2026 19:25
@firetiger-agent
Copy link
Copy Markdown

Firetiger deploy monitoring skipped

This PR didn't match the auto-monitor filter configured on your GitHub connection:

Any PR that changes the kernel API. Monitor changes to API endpoints (packages/api/cmd/api/) and Temporal workflows (packages/api/lib/temporal) in the kernel repo

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 @firetiger monitor this.

@masnwilliams masnwilliams requested a review from dcruzeneil2 May 24, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant