server/backoffice: paginate files in organization detail pages#8836
Merged
frankie567 merged 4 commits intopolarsource:mainfrom Feb 2, 2026
Merged
server/backoffice: paginate files in organization detail pages#8836frankie567 merged 4 commits intopolarsource:mainfrom
frankie567 merged 4 commits intopolarsource:mainfrom
Conversation
|
@ged1182 is attempting to deploy a commit to the polar-sh Team on Vercel. A member of the Team first needs to authorize it. |
frankie567
requested changes
Jan 15, 2026
Member
frankie567
left a comment
There was a problem hiding this comment.
Thank you, that's helpful! Just asking to reuse the existing datatable.pagination helper we have, but otherwise good to go.
Add a new method to fetch files with pagination support, returning both the file list and total count. This enables efficient loading of files for organizations with many downloadable files.
Add pagination to the downloadable files section in the v1 organizations backoffice page. Files are now loaded 10 per page with Previous/Next navigation. Includes anchor fragment to maintain scroll position. Fixes polarsource#8147
Add pagination to the downloadable files section in the v2 organizations backoffice page. Files are now loaded 10 per page with Previous/Next navigation. Includes anchor fragment to maintain scroll position.
f4380bb to
70971a3
Compare
frankie567
approved these changes
Feb 2, 2026
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.
Fixes #8147
The backoffice organization detail pages were loading slowly for organizations with many downloadable files. The root cause was the files section loading all files at once and generating presigned S3 download URLs for each one.
This PR adds pagination to the files section in both v1 and v2 organization detail pages:
paginate_by_organizationmethod toFileRepositoryfor paginated file queries/organizations/{id}endpoint withfiles_pageandfiles_limitquery parameters/organizations-v2/{id}endpoint with the same pagination parameters#files) to maintain scroll position when navigating pagesFiles are now paginated at 10 per page, significantly reducing the number of presigned URLs generated per request.