CNV-62016: add description to ResourceQuota page title#16086
CNV-62016: add description to ResourceQuota page title#16086adamviktora wants to merge 1 commit intoopenshift:mainfrom
Conversation
- part of the description is rendered based on the presence of kubevirt-plugin
|
@adamviktora: This pull request references CNV-62016 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 story to target the "4.22.0" version, but no target version was set. 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: adamviktora The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@adamviktora: This pull request references CNV-62016 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 story to target the "4.22.0" version, but no target version was set. 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. |
|
@adamviktora: This pull request references CNV-62016 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 story to target the "4.22.0" version, but no target version was set. 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. |
|
@adamviktora: This pull request references CNV-62016 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 story to target the "4.22.0" version, but no target version was set. 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. |
📝 WalkthroughWalkthroughThis change augments the ResourceQuotas page component with contextual help text by introducing feature-flag-dependent rendering logic. The modifications add imports for translation ( 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@frontend/public/components/resource-quota.jsx`:
- Around line 700-704: The code reads window.SERVER_FLAGS.consolePlugins without
ensuring window.SERVER_FLAGS exists, causing render-time crashes; update the
isKubevirtPluginActive computation (referencing useFlag, kubevirtFeature, and
isKubevirtPluginActive) to first guard that window.SERVER_FLAGS is defined and
that consolePlugins is an array (e.g. check window.SERVER_FLAGS &&
Array.isArray(window.SERVER_FLAGS.consolePlugins) or use optional chaining)
before calling .includes('kubevirt-plugin') and keep the kubevirtFeature check
intact.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (2)
frontend/public/components/resource-quota.jsxfrontend/public/locales/en/public.json
| const kubevirtFeature = useFlag('KUBEVIRT_DYNAMIC'); | ||
| const isKubevirtPluginActive = | ||
| Array.isArray(window.SERVER_FLAGS.consolePlugins) && | ||
| window.SERVER_FLAGS.consolePlugins.includes('kubevirt-plugin') && | ||
| kubevirtFeature; |
There was a problem hiding this comment.
Guard global flag access to prevent pre-render crashes.
Line 702 dereferences window.SERVER_FLAGS.consolePlugins before validating window.SERVER_FLAGS. If that global is missing, this page can throw during render.
💡 Proposed fix
const kubevirtFeature = useFlag('KUBEVIRT_DYNAMIC');
- const isKubevirtPluginActive =
- Array.isArray(window.SERVER_FLAGS.consolePlugins) &&
- window.SERVER_FLAGS.consolePlugins.includes('kubevirt-plugin') &&
+ const consolePlugins = window.SERVER_FLAGS?.consolePlugins;
+ const isKubevirtPluginActive =
+ Array.isArray(consolePlugins) &&
+ consolePlugins.includes('kubevirt-plugin') &&
kubevirtFeature;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@frontend/public/components/resource-quota.jsx` around lines 700 - 704, The
code reads window.SERVER_FLAGS.consolePlugins without ensuring
window.SERVER_FLAGS exists, causing render-time crashes; update the
isKubevirtPluginActive computation (referencing useFlag, kubevirtFeature, and
isKubevirtPluginActive) to first guard that window.SERVER_FLAGS is defined and
that consolePlugins is an array (e.g. check window.SERVER_FLAGS &&
Array.isArray(window.SERVER_FLAGS.consolePlugins) or use optional chaining)
before calling .includes('kubevirt-plugin') and keep the kubevirtFeature check
intact.
|
@adamviktora: 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. |

This PR adds description to ResourceQuota page title
kubevirt-pluginDesign document link for the AAQ feature
Demo
No kubevirt-plugin:

With kubevirt-plugin:
Screen.Recording.2026-03-02.at.11.31.06.mp4
Summary by CodeRabbit
Release Notes