Skip to content

Conversation

@adamviktora
Copy link
Member

@adamviktora adamviktora commented Jan 5, 2026

📝 Description

  • In Settings -> Virtualization features, when the "Load balance" fetaure (Kube Descheduler Operator) is not installed yet, then we will show a tooltip for the "Select threshold" to install the Load balance feature first

🎥 Demo

After:

Screen.Recording.2026-01-05.at.13.41.13.mov

Summary by CodeRabbit

  • New Features
    • Descheduler option now reflects operator installation status and shows contextual guidance when prerequisites aren't met.
    • New user-facing message "Install load balance feature first to select a threshold." added to English, Spanish, French, Japanese, Korean, and Chinese locales to guide setup.

✏️ Tip: You can customize this high-level summary in your review settings.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Jan 5, 2026

@adamviktora: This pull request references CNV-74672 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.22.0" version, but no target version was set.

Details

In response to this:

📝 Description

  • In Settings -> Virtualization features, when the "Load balance" fetaure (Kube Descheduler Operator) is not installed yet, then we will show a tooltip for the "Select threshold" to install the Load balance feature first

🎥 Demo

After:

Screen.Recording.2026-01-05.at.13.41.13.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 review from aviavissar and gouyang January 5, 2026 12:45
@openshift-ci openshift-ci bot added the approved This issue is something we want to fix label Jan 5, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 5, 2026

📝 Walkthrough

Walkthrough

Added a new localization key "Install load balance feature first to select a threshold." to six locale files and updated DeschedulerSection to accept an isOperatorInstalled prop; that prop is computed and passed from LoadBalanceSection and LoadBalanceConfigurationSection to control select disabled state and tooltip content.

Changes

Cohort / File(s) Summary
Localization entries
locales/{en,es,fr,ja,ko,zh}/plugin__kubevirt-plugin.json
Added localization key "Install load balance feature first to select a threshold." (value mirrors key) in each listed locale file.
DeschedulerSection component
src/.../LoadBalanceSection/components/DeschedulerSection.tsx
Converted to FC<DeschedulerSectionProps> accepting isOperatorInstalled: boolean; added isSelectDisabled derived state and memoized tooltipContent; unified Tooltip usage and disabled logic for the SimpleSelect.
LoadBalanceSection component
src/.../LoadBalanceSection/LoadBalanceSection.tsx
Now passes isOperatorInstalled prop to DeschedulerSection.
LoadBalanceConfigurationSection component
src/.../LoadBalanceConfigurationSection/LoadBalanceConfigurationSection.tsx
Computes isOperatorInstalled from virtualization features context (operator installState) and passes it to DeschedulerSection.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • upalatucci
  • avivtur

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly references the main change: improving the tooltip of 'Select threshold' in the Load balance feature, which aligns with the changeset's focus on adding operator installation awareness to the DeschedulerSection and updating related tooltip messaging.
Description check ✅ Passed The description provides a clear explanation of the feature change with a demo video, but lacks some details about how the tooltip behavior changes and doesn't explicitly describe the technical implementation approach.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f70a39f and a8356ec.

📒 Files selected for processing (9)
  • locales/en/plugin__kubevirt-plugin.json
  • locales/es/plugin__kubevirt-plugin.json
  • locales/fr/plugin__kubevirt-plugin.json
  • locales/ja/plugin__kubevirt-plugin.json
  • locales/ko/plugin__kubevirt-plugin.json
  • locales/zh/plugin__kubevirt-plugin.json
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesWizard/components/ConfigurationStep/components/LoadBalanceConfigurationSection/LoadBalanceConfigurationSection.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
  • locales/zh/plugin__kubevirt-plugin.json
  • locales/ja/plugin__kubevirt-plugin.json
  • locales/ko/plugin__kubevirt-plugin.json
  • locales/en/plugin__kubevirt-plugin.json
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesWizard/components/ConfigurationStep/components/LoadBalanceConfigurationSection/LoadBalanceConfigurationSection.tsx
🧰 Additional context used
📓 Path-based instructions (6)
**/*.tsx

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.tsx: Use .tsx file extension for all React components. One component per file with no nested components.
Use PascalCase for all React component names (e.g., HeaderTop.tsx)
Use functional components by default. Only use class components for specific lifecycle methods unavailable in functional components (e.g., componentDidCatch)
Use default exports for all React components
Use React.lazy and Suspense for lazy loading components

Files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
**/*.{tsx,scss}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

Use project-based class names on components as anchors for styling rules rather than relying on PatternFly class names

Files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
**/*.{tsx,ts}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.{tsx,ts}: Extract logic from components into custom hooks or utility files to improve testability and component maintainability
Use React memoization tools (React.memo, useMemo, useCallback) to avoid unnecessary re-renders
Always specify dependencies in useEffect to avoid unnecessary re-renders or missed updates. Use an empty array [] if no dependencies are required

Files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.{ts,tsx,js,jsx}: Keep files under 150 lines whenever possible
Use descriptive names for variables, functions, and components. Avoid abbreviations unless widely recognized
Keep functions short and focused on one action. Apply Red → Green → Refactor methodology
Avoid hardcoded values (magic numbers) and define them as constants for easy adjustments and readability

Files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

Define constants in utility files with uppercase and underscore-separated naming (e.g., API_URL)

Files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.{ts,tsx}: Prefer using type instead of interface for defining the shapes of objects or functions in TypeScript
If a type is exported, add it to a utility file
Avoid using any type in TypeScript. Use unknown instead and narrow the type as needed
Always explicitly define return types for functions rather than relying on TypeScript type inference

Files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
🧠 Learnings (7)
📓 Common learnings
Learnt from: CR
Repo: kubevirt-ui/kubevirt-plugin PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-24T13:50:10.254Z
Learning: Add a main PR comment that explains referenced links, Jira, docs, use cases, and current/required state. Include videos and/or screenshots for visual changes
📚 Learning: 2025-11-06T13:11:11.791Z
Learnt from: rszwajko
Repo: kubevirt-ui/kubevirt-plugin PR: 3089
File: locales/es/plugin__kubevirt-plugin.json:102-102
Timestamp: 2025-11-06T13:11:11.791Z
Learning: For the kubevirt-ui/kubevirt-plugin repository: Do not flag or comment on missing translations (English values) in locale files for languages other than English (e.g., locales/es/, locales/fr/, locales/ja/, locales/ko/, locales/zh/). Only review English locale files (locales/en/) for translation keys.

Applied to files:

  • locales/fr/plugin__kubevirt-plugin.json
  • locales/es/plugin__kubevirt-plugin.json
📚 Learning: 2025-11-20T20:28:17.043Z
Learnt from: galkremer1
Repo: kubevirt-ui/kubevirt-plugin PR: 3118
File: src/views/checkups/self-validation/utils/constants.ts:62-68
Timestamp: 2025-11-20T20:28:17.043Z
Learning: For the kubevirt-ui/kubevirt-plugin repository: The test suite labels in TEST_SUITE_OPTIONS (Compute, Network, Storage, SSP, Tier2) in src/views/checkups/self-validation/utils/constants.ts should not be internationalized, even though they are displayed in the UI.

Applied to files:

  • locales/fr/plugin__kubevirt-plugin.json
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
📚 Learning: 2025-12-09T17:30:56.131Z
Learnt from: rszwajko
Repo: kubevirt-ui/kubevirt-plugin PR: 3235
File: src/views/checkups/self-validation/details/tabs/details/components/CheckupsSelfValidationDetailsDescriptionList.tsx:26-93
Timestamp: 2025-12-09T17:30:56.131Z
Learning: When using the Timestamp component from openshift-console/dynamic-plugin-sdk, you can pass sentinel values like NO_DATA_DASH directly to the timestamp prop without wrapping in conditional rendering. The component handles invalid/missing values gracefully. This applies to all TSX files that render the Timestamp component; ensure you do not add extra conditional logic for such values and rely on the component's internal handling. Reference: OpenShift Console Timestamp.tsx implementation.

Applied to files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
📚 Learning: 2025-12-24T13:50:10.254Z
Learnt from: CR
Repo: kubevirt-ui/kubevirt-plugin PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-24T13:50:10.254Z
Learning: Applies to **/*.{tsx,ts} : Always specify dependencies in `useEffect` to avoid unnecessary re-renders or missed updates. Use an empty array `[]` if no dependencies are required

Applied to files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
📚 Learning: 2025-12-24T13:50:10.254Z
Learnt from: CR
Repo: kubevirt-ui/kubevirt-plugin PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-24T13:50:10.254Z
Learning: Applies to **/*.{tsx,ts} : Use React memoization tools (`React.memo`, `useMemo`, `useCallback`) to avoid unnecessary re-renders

Applied to files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
📚 Learning: 2025-12-12T17:26:25.615Z
Learnt from: galkremer1
Repo: kubevirt-ui/kubevirt-plugin PR: 3165
File: src/views/checkups/storage/components/hooks/useCheckupsStorageListColumns.ts:25-27
Timestamp: 2025-12-12T17:26:25.615Z
Learning: In the kubevirt-ui/kubevirt-plugin repository: The `useActiveNamespace` hook has two different implementations with different return types:
1. When imported from `'openshift-console/dynamic-plugin-sdk'`, it returns a tuple and should be destructured: `const [namespace] = useActiveNamespace()`
2. When imported from `'kubevirt-utils/hooks/useActiveNamespace'`, it returns a single value: `const namespace = useActiveNamespace()`

Applied to files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (6)
locales/es/plugin__kubevirt-plugin.json (1)

813-813: LGTM! Translation key added correctly.

The new localization entry has been added successfully. The key uses lowercase "load balance" which aligns with the previous review feedback. The English placeholder value is standard practice for non-English locale files awaiting translation.

locales/fr/plugin__kubevirt-plugin.json (1)

813-813: LGTM! New localization key added correctly.

The new translation key has been added with proper JSON formatting and placement. As per repository practices, the French translation will be provided by the localization team in a subsequent update.

src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx (1)

52-52: LGTM! Clean prop pass-through.

The isOperatorInstalled prop is correctly sourced from the operator state (line 26) and passed to DeschedulerSection to enable installation-aware tooltip messaging.

src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx (3)

22-24: LGTM! Correct type definition.

The type definition correctly uses type instead of interface per coding guidelines and is appropriately scoped to this file.


46-53: LGTM! Tooltip logic is correct and previous concern addressed.

The memoized tooltipContent correctly handles three distinct states with appropriate messaging. The dependency array now includes t, addressing the previous review comment about missing translation function dependency.


44-44: LGTM! Clean disabled state and conditional tooltip rendering.

The isSelectDisabled logic comprehensively checks all required conditions (operator installation, descheduler presence, and profile configuration). The tooltip correctly renders only when the select is disabled, providing clear guidance to users.

Also applies to: 81-81, 86-86


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Jan 5, 2026

@adamviktora: This pull request references CNV-74672 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.22.0" version, but no target version was set.

Details

In response to this:

📝 Description

  • In Settings -> Virtualization features, when the "Load balance" fetaure (Kube Descheduler Operator) is not installed yet, then we will show a tooltip for the "Select threshold" to install the Load balance feature first

🎥 Demo

After:

Screen.Recording.2026-01-05.at.13.41.13.mov

Summary by CodeRabbit

  • New Features
  • Enhanced load balancer configuration to validate operator installation status and provide contextual guidance when prerequisites aren't met. Localized messages added across multiple languages to guide users through the setup process.

✏️ Tip: You can customize this high-level summary in your review settings.

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

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Fix all issues with AI Agents 🤖
In
@src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx:
- Around line 46-53: The useMemo creating tooltipContent references the
translation function t but doesn’t include it in the dependency array; update
the useMemo call (tooltipContent = useMemo(..., [isOperatorInstalled,
hasDescheduler])) to include t so the memo recalculates when the active
translation function changes (i.e., use [isOperatorInstalled, hasDescheduler,
t]).
🧹 Nitpick comments (1)
locales/en/plugin__kubevirt-plugin.json (1)

803-803: Tooltip copy is clear; consider a small grammar tweak

The new key is well‑scoped and matches the Load balance / “Select threshold” interaction. For slightly smoother English, you might consider:

  • “Install the Load balance feature first to select a threshold.” or
  • “Install the Load balance feature before selecting a threshold.”

Here’s a minimal diff using the first option:

Proposed wording tweak (optional)
-  "Install Load balance feature first to select a threshold.": "Install Load balance feature first to select a threshold.",
+  "Install the Load balance feature first to select a threshold.": "Install the Load balance feature first to select a threshold.",
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3681b7e and f70a39f.

📒 Files selected for processing (9)
  • locales/en/plugin__kubevirt-plugin.json
  • locales/es/plugin__kubevirt-plugin.json
  • locales/fr/plugin__kubevirt-plugin.json
  • locales/ja/plugin__kubevirt-plugin.json
  • locales/ko/plugin__kubevirt-plugin.json
  • locales/zh/plugin__kubevirt-plugin.json
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesWizard/components/ConfigurationStep/components/LoadBalanceConfigurationSection/LoadBalanceConfigurationSection.tsx
🧰 Additional context used
📓 Path-based instructions (6)
**/*.tsx

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.tsx: Use .tsx file extension for all React components. One component per file with no nested components.
Use PascalCase for all React component names (e.g., HeaderTop.tsx)
Use functional components by default. Only use class components for specific lifecycle methods unavailable in functional components (e.g., componentDidCatch)
Use default exports for all React components
Use React.lazy and Suspense for lazy loading components

Files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesWizard/components/ConfigurationStep/components/LoadBalanceConfigurationSection/LoadBalanceConfigurationSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx
**/*.{tsx,scss}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

Use project-based class names on components as anchors for styling rules rather than relying on PatternFly class names

Files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesWizard/components/ConfigurationStep/components/LoadBalanceConfigurationSection/LoadBalanceConfigurationSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx
**/*.{tsx,ts}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.{tsx,ts}: Extract logic from components into custom hooks or utility files to improve testability and component maintainability
Use React memoization tools (React.memo, useMemo, useCallback) to avoid unnecessary re-renders
Always specify dependencies in useEffect to avoid unnecessary re-renders or missed updates. Use an empty array [] if no dependencies are required

Files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesWizard/components/ConfigurationStep/components/LoadBalanceConfigurationSection/LoadBalanceConfigurationSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.{ts,tsx,js,jsx}: Keep files under 150 lines whenever possible
Use descriptive names for variables, functions, and components. Avoid abbreviations unless widely recognized
Keep functions short and focused on one action. Apply Red → Green → Refactor methodology
Avoid hardcoded values (magic numbers) and define them as constants for easy adjustments and readability

Files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesWizard/components/ConfigurationStep/components/LoadBalanceConfigurationSection/LoadBalanceConfigurationSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

Define constants in utility files with uppercase and underscore-separated naming (e.g., API_URL)

Files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesWizard/components/ConfigurationStep/components/LoadBalanceConfigurationSection/LoadBalanceConfigurationSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.{ts,tsx}: Prefer using type instead of interface for defining the shapes of objects or functions in TypeScript
If a type is exported, add it to a utility file
Avoid using any type in TypeScript. Use unknown instead and narrow the type as needed
Always explicitly define return types for functions rather than relying on TypeScript type inference

Files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesWizard/components/ConfigurationStep/components/LoadBalanceConfigurationSection/LoadBalanceConfigurationSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx
🧠 Learnings (5)
📚 Learning: 2025-11-06T13:11:11.791Z
Learnt from: rszwajko
Repo: kubevirt-ui/kubevirt-plugin PR: 3089
File: locales/es/plugin__kubevirt-plugin.json:102-102
Timestamp: 2025-11-06T13:11:11.791Z
Learning: For the kubevirt-ui/kubevirt-plugin repository: Do not flag or comment on missing translations (English values) in locale files for languages other than English (e.g., locales/es/, locales/fr/, locales/ja/, locales/ko/, locales/zh/). Only review English locale files (locales/en/) for translation keys.

Applied to files:

  • locales/en/plugin__kubevirt-plugin.json
  • locales/zh/plugin__kubevirt-plugin.json
  • locales/ko/plugin__kubevirt-plugin.json
  • locales/ja/plugin__kubevirt-plugin.json
  • locales/fr/plugin__kubevirt-plugin.json
  • locales/es/plugin__kubevirt-plugin.json
📚 Learning: 2025-11-20T20:28:17.043Z
Learnt from: galkremer1
Repo: kubevirt-ui/kubevirt-plugin PR: 3118
File: src/views/checkups/self-validation/utils/constants.ts:62-68
Timestamp: 2025-11-20T20:28:17.043Z
Learning: For the kubevirt-ui/kubevirt-plugin repository: The test suite labels in TEST_SUITE_OPTIONS (Compute, Network, Storage, SSP, Tier2) in src/views/checkups/self-validation/utils/constants.ts should not be internationalized, even though they are displayed in the UI.

Applied to files:

  • locales/en/plugin__kubevirt-plugin.json
  • locales/zh/plugin__kubevirt-plugin.json
  • locales/ja/plugin__kubevirt-plugin.json
📚 Learning: 2025-12-09T17:30:56.131Z
Learnt from: rszwajko
Repo: kubevirt-ui/kubevirt-plugin PR: 3235
File: src/views/checkups/self-validation/details/tabs/details/components/CheckupsSelfValidationDetailsDescriptionList.tsx:26-93
Timestamp: 2025-12-09T17:30:56.131Z
Learning: When using the Timestamp component from openshift-console/dynamic-plugin-sdk, you can pass sentinel values like NO_DATA_DASH directly to the timestamp prop without wrapping in conditional rendering. The component handles invalid/missing values gracefully. This applies to all TSX files that render the Timestamp component; ensure you do not add extra conditional logic for such values and rely on the component's internal handling. Reference: OpenShift Console Timestamp.tsx implementation.

Applied to files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesWizard/components/ConfigurationStep/components/LoadBalanceConfigurationSection/LoadBalanceConfigurationSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx
📚 Learning: 2025-12-24T13:50:10.254Z
Learnt from: CR
Repo: kubevirt-ui/kubevirt-plugin PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-24T13:50:10.254Z
Learning: Applies to **/*.{tsx,ts} : Use React memoization tools (`React.memo`, `useMemo`, `useCallback`) to avoid unnecessary re-renders

Applied to files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
📚 Learning: 2025-12-12T17:26:25.615Z
Learnt from: galkremer1
Repo: kubevirt-ui/kubevirt-plugin PR: 3165
File: src/views/checkups/storage/components/hooks/useCheckupsStorageListColumns.ts:25-27
Timestamp: 2025-12-12T17:26:25.615Z
Learning: In the kubevirt-ui/kubevirt-plugin repository: The `useActiveNamespace` hook has two different implementations with different return types:
1. When imported from `'openshift-console/dynamic-plugin-sdk'`, it returns a tuple and should be destructured: `const [namespace] = useActiveNamespace()`
2. When imported from `'kubevirt-utils/hooks/useActiveNamespace'`, it returns a single value: `const namespace = useActiveNamespace()`

Applied to files:

  • src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx
🧬 Code graph analysis (1)
src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesWizard/components/ConfigurationStep/components/LoadBalanceConfigurationSection/LoadBalanceConfigurationSection.tsx (3)
src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/utils/VirtualizationFeaturesContext/VirtualizationFeaturesContext.tsx (1)
  • useVirtualizationFeaturesContext (19-19)
src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/utils/constants.ts (1)
  • DESCHEDULER_OPERATOR_NAME (5-5)
src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/utils/utils.ts (1)
  • isInstalled (5-6)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (11)
locales/ja/plugin__kubevirt-plugin.json (1)

799-799: Non‑English locale change acknowledged (no review per repo guidelines)

The new key matches the English locale entry. Per kubevirt‑plugin review guidelines, I’m not reviewing or suggesting changes to non‑English translations in this file.

locales/zh/plugin__kubevirt-plugin.json (1)

799-799: New Load balance tooltip string looks correct and consistent

Key and value match the intended tooltip text and align with surrounding feature-related entries. No structural or naming issues from an i18n-key perspective. Based on learnings, leaving the English value in this non-English locale is acceptable.

locales/es/plugin__kubevirt-plugin.json (1)

813-813: Tooltip key for Load balance added correctly

The new key mirrors other locales and keeps the i18n key set consistent; text matches the intended UI tooltip semantics. English value in this non-English locale is acceptable per repository conventions. Based on learnings, no changes needed.

locales/ko/plugin__kubevirt-plugin.json (1)

799-799: Non-English locale key acknowledged (no translation review)

Change is limited to adding a new key; per repo guidelines we intentionally do not review or comment on non-English locale content.
Based on learnings, non-English locale files are not reviewed for translation quality.

locales/fr/plugin__kubevirt-plugin.json (1)

813-813: Non-English locale key acknowledged (no translation review)

This addition just introduces a new i18n key; in line with repo guidance, non-English locale strings are not reviewed for translation content.
Based on learnings, only locales/en is reviewed for wording.

src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/LoadBalanceSection.tsx (1)

52-52: Correctly threading isOperatorInstalled into DeschedulerSection

Reusing the locally derived isOperatorInstalled here is clean and keeps responsibility for install-state checks in one place. No issues from this change.

src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesWizard/components/ConfigurationStep/components/LoadBalanceConfigurationSection/LoadBalanceConfigurationSection.tsx (1)

7-9: Consistent use of virtualization context to derive isOperatorInstalled

Using useVirtualizationFeaturesContext + DESCHEDULER_OPERATOR_NAME + isInstalled mirrors the list view logic and cleanly passes isOperatorInstalled into DeschedulerSection. Optional chaining on operatorDetailsMap is safe, and a missing entry simply treats the operator as not installed, which matches the intended UX. All DeschedulerSection usages across both the list and wizard views have been properly updated with the new prop.

src/views/clusteroverview/SettingsTab/ClusterTab/components/VirtualizationFeaturesSection/VirtualizationFeaturesList/components/LoadBalanceSection/components/DeschedulerSection.tsx (4)

22-26: LGTM!

The type definition correctly uses type over interface per project guidelines, and the component signature is properly typed with the new prop.


44-45: LGTM!

Clean derivation of the disabled state. Memoization would be overkill for this simple boolean expression.


81-81: LGTM!

Clean usage of the derived isSelectDisabled variable.


78-86: LGTM!

Good use of the triggerRef pattern for the tooltip on a potentially disabled element, and conditional rendering ensures the tooltip only appears when the select is disabled.

Copy link
Member

@galkremer1 galkremer1 left a comment

Choose a reason for hiding this comment

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

Looking good - one small nit.

@adamviktora adamviktora force-pushed the descheduler-configure-features-info branch from f70a39f to a8356ec Compare January 6, 2026 08:50
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Jan 6, 2026

@adamviktora: This pull request references CNV-74672 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.22.0" version, but no target version was set.

Details

In response to this:

📝 Description

  • In Settings -> Virtualization features, when the "Load balance" fetaure (Kube Descheduler Operator) is not installed yet, then we will show a tooltip for the "Select threshold" to install the Load balance feature first

🎥 Demo

After:

Screen.Recording.2026-01-05.at.13.41.13.mov

Summary by CodeRabbit

  • New Features
  • Descheduler option now reflects operator installation status and shows contextual guidance when prerequisites aren't met.
  • New user-facing message "Install load balance feature first to select a threshold." added to English, Spanish, French, Japanese, Korean, and Chinese locales to guide setup.

✏️ Tip: You can customize this high-level summary in your review settings.

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

@galkremer1 galkremer1 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 Passed code review, ready for merge label Jan 6, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 6, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adamviktora, galkremer1

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:
  • OWNERS [adamviktora,galkremer1]

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

@openshift-merge-bot openshift-merge-bot bot merged commit 5e5cb0f into kubevirt-ui:main Jan 6, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved This issue is something we want to fix jira/valid-reference lgtm Passed code review, ready for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants