[release-4.21] OCPBUGS-78599: Reset pagination page when changing namespace#16158
[release-4.21] OCPBUGS-78599: Reset pagination page when changing namespace#16158rhamilto wants to merge 1 commit intoopenshift:release-4.21from
Conversation
This commit adds namespace change detection to reset pagination, ensuring users see page 1 when switching namespaces. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
@rhamilto: This pull request references Jira Issue OCPBUGS-78390, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
|
@rhamilto: This pull request references Jira Issue OCPBUGS-78599, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@rhamilto: This pull request references Jira Issue OCPBUGS-78599, which is invalid:
Comment DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@rhamilto: This pull request references Jira Issue OCPBUGS-78599, which is invalid:
Comment DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhamilto The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
@rhamilto: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
Fixes pagination issue when switching namespaces/projects via the project picker. Previously, the page query parameter persisted from the previous namespace, causing incorrect display (e.g., "51-3 of 3" with no data rows when navigating from page 2 of one project to another with fewer items).
This fix addresses the issue at two layers:
Navigation layer (formatNamespaceRoute): Removes the 'page' query parameter when building the new URL during namespace changes, while preserving 'perPage' as a user preference.
Component layer (useConsoleDataViewData): Tracks namespace changes and resets pagination to page 1 when the namespace changes, similar to how it already resets when filters change.
Together, these changes ensure pagination properly resets to page 1 when switching namespaces while preserving the user's items-per-page preference.
Changes
Test plan
yarn test🤖 Generated with Claude Code