Skip to content

Conversation

@vikram-raj
Copy link
Member

@vikram-raj vikram-raj commented Dec 5, 2025

Before:

before-ocpbugs-62713.mov

After:

after-ocpbugs-62713.mov

@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 Dec 5, 2025
@openshift-ci-robot
Copy link
Contributor

@vikram-raj: This pull request references Jira Issue OCPBUGS-62713, which is invalid:

  • expected the bug to target the "4.21.0" version, but no target version was set

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.

In response to this:

Before:

After:

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.

@coderabbitai
Copy link

coderabbitai bot commented Dec 5, 2025

Walkthrough

This change refactors how the active application state is reset when a namespace changes. Previously, the reducer automatically reset the active application during namespace selection; now it's handled explicitly via a conditional action dispatch in the namespace-bar component.

Changes

Cohort / File(s) Summary
Namespace bar component logic
frontend/public/components/namespace-bar.tsx
Imports ALL_APPLICATIONS_KEY constant and setActiveApplication action. Adds conditional dispatch of setActiveApplication(ALL_APPLICATIONS_KEY) when namespace selection changes and differs from the previous namespace.
UI state management
frontend/public/reducers/ui.ts, frontend/actions/ui
Removes automatic activeApplication reset logic from SetActiveNamespace reducer, which now only updates the activeNamespace. Introduces new public action method setActiveApplication(applicationKey: string).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify conditional dispatch logic: Ensure the activeNamespace !== newNamespace check correctly triggers the application reset and doesn't create race conditions or double-dispatch scenarios.
  • Test reducer behavior: Confirm that removing the automatic reset from the reducer doesn't break other namespace-switching flows or dependent features.
  • Action integration: Validate that the new setActiveApplication action is properly wired to update state in the reducer and that all call sites are accounted for.
✨ 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 8455ef9 and 344212c.

📒 Files selected for processing (2)
  • frontend/public/components/namespace-bar.tsx (3 hunks)
  • frontend/public/reducers/ui.ts (1 hunks)
🧰 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/namespace-bar.tsx
  • frontend/public/reducers/ui.ts
🧬 Code graph analysis (1)
frontend/public/components/namespace-bar.tsx (3)
frontend/public/components/namespace.jsx (3)
  • dispatch (348-348)
  • dispatch (659-659)
  • dispatch (722-722)
frontend/public/actions/ui.ts (1)
  • setActiveApplication (172-174)
frontend/packages/console-shared/src/constants/common.ts (1)
  • ALL_APPLICATIONS_KEY (28-28)
🔇 Additional comments (3)
frontend/public/reducers/ui.ts (1)

66-66: Refactoring looks correct - application reset logic moved to component.

The removal of automatic activeApplication reset from this reducer is part of the refactoring to make the reset behavior more explicit and conditional. The responsibility is now handled in namespace-bar.tsx (line 85).

frontend/public/components/namespace-bar.tsx (2)

8-12: LGTM - imports correctly added for new functionality.

The new imports support the explicit application reset logic and are properly utilized in the component.

Also applies to: 25-25


85-85: Verify consistency: Application reset behavior across namespace changes.

The application filter is reset on line 85 when the namespace changes via dropdown selection. Verify whether other namespace changes in this component also reset the application or if this selective reset is intentional:

  • Line 67: Error recovery redirect to ALL_NAMESPACES_KEY
  • Line 90: Creating a new project and switching to it
  • SetCurrentLocation reducer action: Setting namespace from URL navigation

If inconsistent resets are by design (to address the "unexpected reset" issue), add a comment explaining why only dropdown selection triggers an application reset. Otherwise, ensure all namespace changes reset the application consistently.


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

@openshift-ci openshift-ci bot requested review from jhadvig and sg00dwin December 5, 2025 15:11
@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 Dec 5, 2025
@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Dec 5, 2025
@openshift-ci-robot
Copy link
Contributor

@vikram-raj: This pull request references Jira Issue OCPBUGS-62713, 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

In response to this:

Before:

before-ocpbugs-62713.mov

After:

after-ocpbugs-62713.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 December 5, 2025 15:22
@vikram-raj
Copy link
Member Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@vikram-raj: This pull request references Jira Issue OCPBUGS-62713, 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:

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

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
Copy link
Contributor

openshift-ci bot commented Dec 5, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: logonoff, vikram-raj

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

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 5, 2025
@vikram-raj
Copy link
Member Author

/label acknowledge-critical-fixes-only

/verified later @yapei

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Dec 8, 2025
@openshift-ci-robot openshift-ci-robot added verified-later verified Signifies that the PR passed pre-merge verification criteria labels Dec 8, 2025
@openshift-ci-robot
Copy link
Contributor

@vikram-raj: This PR has been marked to be verified later by @yapei.

In response to this:

/label acknowledge-critical-fixes-only

/verified later @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.

@vikram-raj
Copy link
Member Author

/retest

@vikram-raj vikram-raj closed this Dec 8, 2025
@openshift-ci-robot
Copy link
Contributor

@vikram-raj: This pull request references Jira Issue OCPBUGS-62713. The bug has been updated to no longer refer to the pull request using the external bug tracker. All external bug links have been closed. The bug has been moved to the NEW state.

In response to this:

Before:

before-ocpbugs-62713.mov

After:

after-ocpbugs-62713.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.

@vikram-raj
Copy link
Member Author

/reopen

@openshift-ci openshift-ci bot reopened this Dec 8, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 8, 2025

@vikram-raj: Reopened this PR.

In response to this:

/reopen

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.

@openshift-ci-robot
Copy link
Contributor

@vikram-raj: This pull request references Jira Issue OCPBUGS-62713, 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 New, 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:

Before:

before-ocpbugs-62713.mov

After:

after-ocpbugs-62713.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-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 370e6b0 and 2 for PR HEAD 344212c in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 2db4d62 and 1 for PR HEAD 344212c in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD d93076f and 0 for PR HEAD 344212c in total

@openshift-ci-robot
Copy link
Contributor

/hold

Revision 344212c was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 10, 2025
@vikram-raj
Copy link
Member Author

/unhold

/retest

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 10, 2025
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 335ed77 and 2 for PR HEAD 344212c in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 11, 2025

@vikram-raj: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-console 344212c link true /test e2e-gcp-console

Full PR test history. Your PR dashboard.

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

acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality 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 verified-later

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants