Skip to content

Conversation

@RachelElysia
Copy link
Member

@RachelElysia RachelElysia commented Aug 12, 2025

Issue

Closes #31805
Unreleased bug pushed fixing #31632

Note

  • Need to re-QA self-service pagination on this branch, which was the original fix

    • Clicking on install/uninstall and ensuring pages doesn't change with various sorts already applied
    • But also that pagination works as intended in general (goes to page 0 when switching category/searching/applying different sort, can paginate, etc)
    • Ensure this is not broken: /** For clientside pagination only:
    • Whenever defaultPageIndex (the value from props, e.g. queryParams.page) changes,
    • ensure we call gotoPage so react-table reflects the correct visible page.
      */
  • Need to re-QA pagination of clientside tables on this branch, specifically any table that has isClientsidePagination was affected and should be fixed with the fix
    Examples that could be tested:

    • Team management
    • User page
    • Host policies
    • Query reports page
    • Live query/policy results
    • Software vulns table
    • Title versions table

Testing

  • QA'd all new/changed functionality manually

@RachelElysia RachelElysia requested a review from a team as a code owner August 12, 2025 14:39
@RachelElysia RachelElysia marked this pull request as draft August 12, 2025 14:40
@codecov
Copy link

codecov bot commented Aug 12, 2025

Codecov Report

❌ Patch coverage is 53.84615% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.58%. Comparing base (98954e8) to head (211cf84).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../components/TableContainer/DataTable/DataTable.tsx 53.84% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #31823   +/-   ##
=======================================
  Coverage   63.58%   63.58%           
=======================================
  Files        1964     1964           
  Lines      192345   192352    +7     
  Branches     6276     6285    +9     
=======================================
+ Hits       122293   122300    +7     
  Misses      60456    60456           
  Partials     9596     9596           
Flag Coverage Δ
frontend 50.51% <53.84%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@RachelElysia RachelElysia marked this pull request as ready for review August 12, 2025 16:12
Comment on lines +663 to +665
onClientSidePaginationChange
? onClientSidePaginationChange(pageIndex - 1)
: previousPage();
Copy link
Member

Choose a reason for hiding this comment

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

Why did this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

They both shouldn't be called because previousPage() and nextPage() is internal control, onClientSidePaginationChange is external control that's suppose to be in lieu

Copy link
Member

Choose a reason for hiding this comment

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

Perfect. That's what I thought was happening here but wanted to be 100% sure :)

@RachelElysia RachelElysia merged commit 4ff53b9 into main Aug 12, 2025
13 of 15 checks passed
@RachelElysia RachelElysia deleted the 4.72-clientside-pagination-bug branch August 12, 2025 17:13
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.

Pagination "Next" button on Live Policy results not correctly switching pages

2 participants