Skip to content

Conversation

@rhamilto
Copy link
Member

@rhamilto rhamilto commented Nov 24, 2025

After:

  • Links that include query parameters such as OpenShift AI correctly redirect
  • The Ecosystem > Software Catalog nav link is unchanged
  • /catalog/all-namespaces redirects to /catalog/ns/default as it did before
  • /catalog/instantiate-template is unchanged
Screen.Recording.2025-11-24.at.1.22.24.PM.mov
  • /operatorhub is unchanged and redirects to /catalog/ns/default as it did before
Screen.Recording.2025-11-24.at.1.33.10.PM.mov

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Nov 24, 2025
@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-65890, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

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

In response to this:

After:

  • Links that include query parameters such as OpenShift AI correctly redirect
  • The Ecosystem > Software Catalog nav link is unchanged
  • /catalog/all-namespaces redirects to /catalog/ns/default as it did before
  • /catalog/instantiate-template is unchanged
Screen.Recording.2025-11-24.at.1.22.24.PM.mov

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.

@openshift-ci openshift-ci bot requested a review from yapei November 24, 2025 18:26
@coderabbitai
Copy link

coderabbitai bot commented Nov 24, 2025

Walkthrough

Moved the catalog redirect component from the dev-console plugin into core app routing: removed its plugin route and exposed module, imported the component into core app-contents, added /catalog and /catalog/all-namespaces routes; component comment/type annotation changed, redirect logic unchanged.

Changes

Cohort / File(s) Summary
Redirect component update
frontend/packages/console-shared/src/components/catalog/CatalogDefaultNamespaceRedirect.tsx
Removed explicit React import, adjusted in-file comment and component type annotation (from React.FC to React.FCC); redirect logic still navigates to /catalog/ns/default preserving query params and replace behavior.
Plugin route removal
frontend/packages/dev-console/console-extensions.json
Removed console.page/route entry for "/catalog/all-namespaces" that referenced CatalogDefaultNamespaceRedirect.
Plugin exposed module removal
frontend/packages/dev-console/package.json
Removed CatalogDefaultNamespaceRedirect from consolePlugin.exposedModules.
Core routing addition
frontend/public/components/app-contents.tsx
Imported CatalogDefaultNamespaceRedirect from shared package and added routes for "/catalog" and "/catalog/all-namespaces" that render the redirect component.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Verify no external consumers rely on the removed exposed module.
  • Confirm route ordering in app-contents.tsx doesn't conflict with existing routes.
  • Ensure the redirected URL, query-param preservation, and replace behavior are identical after migration.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between ab45f93 and 7ba80c2.

📒 Files selected for processing (4)
  • frontend/packages/console-shared/src/components/catalog/CatalogDefaultNamespaceRedirect.tsx (1 hunks)
  • frontend/packages/dev-console/console-extensions.json (0 hunks)
  • frontend/packages/dev-console/package.json (0 hunks)
  • frontend/public/components/app-contents.tsx (2 hunks)
💤 Files with no reviewable changes (2)
  • frontend/packages/dev-console/console-extensions.json
  • frontend/packages/dev-console/package.json
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • frontend/public/components/app-contents.tsx
  • frontend/packages/console-shared/src/components/catalog/CatalogDefaultNamespaceRedirect.tsx
🔇 Additional comments (3)
frontend/public/components/app-contents.tsx (2)

20-20: LGTM!

The import correctly references the component from the console-shared package, aligning with the PR objective to move this redirect logic to core routing.


261-263: LGTM!

Both routes correctly use the redirect component to send catalog traffic to the default namespace. The component implementation preserves query parameters, which satisfies the PR requirement for OpenShift AI links with query params.

frontend/packages/console-shared/src/components/catalog/CatalogDefaultNamespaceRedirect.tsx (1)

4-4: The type annotation is correct and intentional—no changes needed.

FCC is defined in the codebase as a custom type for "a childless FunctionComponent". Since CatalogDefaultNamespaceRedirect doesn't accept or render children, using React.FCC is more semantically accurate than React.FC. This is a codebase convention applied consistently across the project, not an error.


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

@openshift-ci openshift-ci bot requested review from Leo6Leo and sg00dwin November 24, 2025 18:27
@openshift-ci openshift-ci bot added component/core Related to console core functionality component/dev-console Related to dev-console approved Indicates a PR has been approved by an approver from all required OWNERS files. component/shared Related to console-shared labels Nov 24, 2025
}
/>

<Route path="/catalog" element={<CatalogDefaultNamespaceRedirect />} />
Copy link
Member Author

Choose a reason for hiding this comment

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

Since we need <CatalogDefaultNamespaceRedirect> for both routes, I elected to move it to console-shared to ease reuse here.

@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-65890, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

In response to this:

After:

  • Links that include query parameters such as OpenShift AI correctly redirect
  • The Ecosystem > Software Catalog nav link is unchanged
  • /catalog/all-namespaces redirects to /catalog/ns/default as it did before
  • /catalog/instantiate-template is unchanged
Screen.Recording.2025-11-24.at.1.22.24.PM.mov
  • /operatorhub is unchanged
Screen.Recording.2025-11-24.at.1.33.10.PM.mov

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

/retest

Copy link
Member

@logonoff logonoff left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 25, 2025
@sg00dwin
Copy link
Member

/lgtm

@sg00dwin
Copy link
Member

/test e2e-gcp-console

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 25, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: logonoff, rhamilto, sg00dwin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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

2 similar comments
@rhamilto
Copy link
Member Author

/retest

@rhamilto
Copy link
Member Author

/retest

@rhamilto
Copy link
Member Author

rhamilto commented Dec 1, 2025

@yapei, can you please verify?

@yapei
Copy link
Contributor

yapei commented Dec 2, 2025

  • OpenShift AI now links to /catalog/ns/default?catalogType=operator&keyword=openshift+ai&selectedId=rhods-operator-redhat-operators-openshift-marketplace
  • click Ecosystem -> Software Catalog -> All Projects still redirects to /catalog/ns/default

/verified by @yapei

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Dec 2, 2025
@openshift-ci-robot
Copy link
Contributor

@yapei: This PR has been marked as verified by @yapei.

In response to this:

  • OpenShift AI now links to /catalog/ns/default?catalogType=operator&keyword=openshift+ai&selectedId=rhods-operator-redhat-operators-openshift-marketplace
  • click Ecosystem -> Software Catalog -> All Projects still redirects to /catalog/ns/default

/verified by @yapei

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.

@openshift-merge-bot openshift-merge-bot bot merged commit e643fa3 into openshift:main Dec 2, 2025
7 of 8 checks passed
@openshift-ci-robot
Copy link
Contributor

@rhamilto: Jira Issue Verification Checks: Jira Issue OCPBUGS-65890
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-65890 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

In response to this:

After:

  • Links that include query parameters such as OpenShift AI correctly redirect
  • The Ecosystem > Software Catalog nav link is unchanged
  • /catalog/all-namespaces redirects to /catalog/ns/default as it did before
  • /catalog/instantiate-template is unchanged
Screen.Recording.2025-11-24.at.1.22.24.PM.mov
  • /operatorhub is unchanged and redirects to /catalog/ns/default as it did before
Screen.Recording.2025-11-24.at.1.33.10.PM.mov

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 deleted the OCPBUGS-65890 branch December 2, 2025 15:24
@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.21.0-0.nightly-2025-12-08-112148

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. component/core Related to console core functionality component/dev-console Related to dev-console component/shared Related to console-shared jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants