Skip to content

[release-4.21] OCPBUGS-78599: Reset pagination page when changing namespace#16158

Open
rhamilto wants to merge 1 commit intoopenshift:release-4.21from
rhamilto:OCPBUGS-78599
Open

[release-4.21] OCPBUGS-78599: Reset pagination page when changing namespace#16158
rhamilto wants to merge 1 commit intoopenshift:release-4.21from
rhamilto:OCPBUGS-78599

Conversation

@rhamilto
Copy link
Member

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:

  1. Navigation layer (formatNamespaceRoute): Removes the 'page' query parameter when building the new URL during namespace changes, while preserving 'perPage' as a user preference.

  2. 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

  • Switch between namespaces using the project picker
  • Verify pagination resets to page 1 when changing namespaces
  • Verify items-per-page preference is preserved
  • Run automated tests: yarn test

🤖 Generated with Claude Code

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>
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 17, 2026
@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-78390, which is invalid:

  • expected the bug to target either version "4.21." or "openshift-4.21.", but it targets "4.22.0" instead
  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is ON_QA instead
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-78390 to depend on a bug targeting a version in 4.22.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

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:

  1. Navigation layer (formatNamespaceRoute): Removes the 'page' query parameter when building the new URL during namespace changes, while preserving 'perPage' as a user preference.

  2. 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

  • Switch between namespaces using the project picker
  • Verify pagination resets to page 1 when changing namespaces
  • Verify items-per-page preference is preserved
  • Run automated tests: yarn test

🤖 Generated with Claude Code

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.

@rhamilto rhamilto changed the title OCPBUGS-78390: Reset pagination page when changing namespace [release-4.21] OCPBUGS-78390: Reset pagination page when changing namespace Mar 17, 2026
@openshift-ci openshift-ci bot requested review from sg00dwin and spadgett March 17, 2026 12:31
@openshift-ci openshift-ci bot added component/core Related to console core functionality approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 17, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 17, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7817ec63-04b4-4a2d-8695-3dc73897b134

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@rhamilto rhamilto changed the title [release-4.21] OCPBUGS-78390: Reset pagination page when changing namespace [release-4.21] OCPBUGS-78599: Reset pagination page when changing namespace Mar 17, 2026
@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-78599, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected dependent Jira Issue OCPBUGS-78390 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA instead
  • expected dependent Jira Issue OCPBUGS-78390 to target a version in 4.22.0, but it targets "4.21.z" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

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:

  1. Navigation layer (formatNamespaceRoute): Removes the 'page' query parameter when building the new URL during namespace changes, while preserving 'perPage' as a user preference.

  2. 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

  • Switch between namespaces using the project picker
  • Verify pagination resets to page 1 when changing namespaces
  • Verify items-per-page preference is preserved
  • Run automated tests: yarn test

🤖 Generated with Claude Code

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.

@rhamilto
Copy link
Member Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-78599, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected dependent Jira Issue OCPBUGS-78390 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA instead
  • expected dependent Jira Issue OCPBUGS-78390 to target a version in 4.22.0, but it targets "4.21.z" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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.

@rhamilto
Copy link
Member Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-78599, which is invalid:

  • expected dependent Jira Issue OCPBUGS-78390 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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.

@rhamilto
Copy link
Member Author

/approve
/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Mar 17, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 17, 2026

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rhamilto
Copy link
Member Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 18, 2026

@rhamilto: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. component/core Related to console core functionality jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants