Fix self-service asset pagination counts#2038
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses pagination count misalignment for self-service users by ensuring asset queries filter for availableToBook = true at the database level rather than in application code. This ensures that pagination counts accurately reflect the filtered results.
Key Changes
- Adds
availableToBookOnlyparameter to asset query functions to enforce database-level filtering for self-service users - Removes client-side filtering that was causing pagination count discrepancies
- Threads the self-service role flag through the asset loading pipeline
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| app/modules/asset/service.server.ts | Adds availableToBookOnly parameter to asset query functions and applies database-level filtering |
| app/modules/asset/query.server.ts | Updates SQL generation to include availableToBook = true condition when needed |
| app/modules/asset/data.server.ts | Removes client-side filtering and passes self-service flag to query functions |
DonKoko
approved these changes
Sep 17, 2025
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
availableToBookOnlyoption to asset queries so self-service pagination uses aligned countsavailableToBook = trueTesting
https://chatgpt.com/codex/tasks/task_b_68c9a9823a208326874ba8d6363635ad