Skip to content

fix: broken user group table infinite query - #9793

Merged
AdityaHegde merged 2 commits into
mainfrom
fix/user-group-table-infinite-query
Aug 7, 2026
Merged

fix: broken user group table infinite query#9793
AdityaHegde merged 2 commits into
mainfrom
fix/user-group-table-infinite-query

Conversation

@AdityaHegde

@AdityaHegde AdityaHegde commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

User group table queried a new page each time replacing the old one. Updated to use infinite queries so that all pages are retained.

Closes APP-923

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@AdityaHegde
AdityaHegde force-pushed the fix/user-group-table-infinite-query branch from 50cdc4f to 64c4218 Compare August 6, 2026 05:08

Copilot AI left a comment

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.

Pull request overview

This PR fixes pagination behavior in the organization User Groups page by switching the underlying data fetch from a single-page query (that replaced results) to an infinite query that retains all previously loaded pages.

Changes:

  • Update the user groups route to consume an infinite query and aggregate pages[] into one list for filtering/rendering.
  • Add a getOrgUsergroupsInfinite selector to centralize the infinite-query configuration and next-page token handling.
  • Update Orval-generated client/query helpers and Orval config to support an infinite query variant for listing org member usergroups.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
web-admin/src/routes/[organization]/-/users/groups/+page.svelte Switch groups page to infinite query, flatten paged results, and trigger fetchNextPage() on load-more.
web-admin/src/features/organizations/user-management/selectors.ts Add getOrgUsergroupsInfinite selector wrapping the new Orval infinite query helper.
web-admin/src/client/gen/default/default.ts Generated: add infinite-query key/options + createAdminServiceListOrganizationMemberUsergroupsInfinite.
web-admin/orval.config.ts Enable useInfinite generation for AdminService_ListOrganizationMemberUsergroups.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web-admin/src/routes/[organization]/-/users/groups/+page.svelte Outdated
Comment thread web-admin/src/features/organizations/user-management/selectors.ts Outdated
@AdityaHegde
AdityaHegde merged commit 31886b6 into main Aug 7, 2026
13 of 14 checks passed
@AdityaHegde
AdityaHegde deleted the fix/user-group-table-infinite-query branch August 7, 2026 11:49
AdityaHegde added a commit that referenced this pull request Aug 7, 2026
* fix: broken user group table infinite query

* PR comments
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.

3 participants