Skip to content

BI-2929: Fix issues with requesting later pages with larger pages sizes - #502

Merged
jloux-brapi merged 1 commit into
epic/BI-2862from
bug/BI-2929
Oct 23, 2026
Merged

jloux-brapi merged 1 commit into
epic/BI-2862from
bug/BI-2929

Conversation

@humsika

@humsika humsika commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

Story: BI-2929

When a user changes the page size while viewing a later page, that page might not exist with the new page size. This change resets the table to the first page whenever the page size changes, preventing an invalid page request.

Dependencies

bi-web: bug/BI-2929
bi-api: epic/BI-2862
brapi-Java-prodServer: epic/BI-2862

Testing

  1. Open the Germplasm table for a program containing enough records for multiple pages.
  2. Select 10 per page.
  3. Navigate to a later page, such as the last page.
  4. Open the browser Developer Tools and select the Network tab.
  5. Change the page size from 10 to 200.
  6. Verify that:
    • The table resets to UI page 1.
    • The Germplasm request contains page=0&pageSize=200.
    • The first 200 records are displayed.
    • The pagination controls show the correct number of pages.
    • Existing sorting and filtering remain applied.
    • No pagination error notification appears.

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have commented my code, particularly in hard-to-understand areas
  • I have either updated the source of truth or arranged for update with product owner if needed https://breedinginsight.atlassian.net/wiki/spaces/BI/pages/1559953409/Source+of+Truth
  • I have run SiteImprove on pages impacted by changes

@github-actions github-actions Bot added the bug Something isn't working label Oct 23, 2026
@humsika
humsika requested a review from jloux-brapi October 23, 2026 15:24

@jloux-brapi jloux-brapi 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.

Approved, I do think it would be a good idea to have Nick look at this too just as a sanity check.

@humsika
humsika requested review from nickpalladino and removed request for nickpalladino October 23, 2026 16:44

@nickpalladino nickpalladino left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked all active tables to make sure they were using the paginationController. Only one that wasn't was the one in GermplasmGenotypeView and that's a bi-api based one that we don't show anymore in develop so not an issue. Shawn and I are good with the change in behavior when a page size is changed vs what it was before.

* limitations under the License.
*/

import {PaginationController} from "@/breeding-insight/model/view_models/PaginationController";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't typically been adding frontend tests but fine to add

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for confirming! I added the test to cover the pagination reset and prevent regression.

@jloux-brapi
jloux-brapi merged commit e85fd70 into epic/BI-2862 Oct 23, 2026
2 checks passed
@jloux-brapi
jloux-brapi deleted the bug/BI-2929 branch October 23, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants