Skip to content

Update dependencies for upcoming Console 4.22 release#371

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
vojtechszocs:update-deps-for-console-4.22
Apr 25, 2026
Merged

Update dependencies for upcoming Console 4.22 release#371
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
vojtechszocs:update-deps-for-console-4.22

Conversation

@vojtechszocs
Copy link
Copy Markdown
Contributor

@vojtechszocs vojtechszocs commented Apr 17, 2026

Plugin SDK and shared modules

  • Console plugin SDK packages - bump to 4.22 latest prerelease
  • React - bump to Console compatible 18.x version
  • React i18next - bump to Console compatible 16.x version
  • React Router - bump to Console compatible 7.x version
  • Remove react-router-dom and react-router-dom-v5-compat
  • TypeScript - bump to 5.9.x to satisfy peer dependency in @openshift-console/dynamic-plugin-sdk-webpack
  • Remove react-helmet - replaced by Console DocumentTitle
  • Modify getCreationTimestamp - adapt to Console TimestampProps change

PatternFly

Follow-up improvements

  • ESLint / TypeScript support - npm run lint works but warns about unsupported TypeScript version
  • i18next-parser needs update - old version may cause issues and pulls in older TypeScript 4.x

Summary by CodeRabbit

Release Notes

  • Improvements

    • Upgraded React from v17 to v18, providing improved performance and concurrent rendering capabilities.
    • Migrated routing from React Router v5 to v7 with enhanced navigation APIs.
    • Updated PatternFly component library and icon packages to latest compatible versions.
    • Upgraded TypeScript to v5.9.3 for improved type safety.
  • New Features

    • Added optional children prop support to DetailsItem component.
  • Bug Fixes

    • Fixed creation timestamp output formatting in resource metadata.

@vojtechszocs vojtechszocs changed the title Update dependencies for upcoming Console 4.22 release WiP Update dependencies for upcoming Console 4.22 release Apr 17, 2026
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 17, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 17, 2026

Walkthrough

Updated dependencies (React → 18.3.1, react-dom added, TypeScript → 5.9.3, SDK and PatternFly bumps), migrated routing imports from react-router-dom-v5-compat to react-router, consolidated dynamic-plugin-sdk imports, switched some lodash/icons imports, replaced Helmet with DocumentTitle, and changed a resource timestamp return to string.

Changes

Cohort / File(s) Summary
Dependency changes
package.json
Bumped react 17.0.2 → 18.3.1, added react-dom@18.3.1, upgraded TypeScript to 5.9.3, updated OpenShift dynamic plugin SDK packages to 4.22.0-prerelease.3, updated PatternFly packages, moved React types to @types/react@^18.3.27 / added @types/react-dom, removed unused @types/*, adjusted react-i18next and react-router ranges, and trimmed lint script whitespace.
Plugin manifest imports
plugin-manifest.ts, src/views/.../manifest.ts, src/utils/flags/manifest.ts
Consolidated imports to import ConsolePluginBuildMetadata and EncodedExtension from @openshift-console/dynamic-plugin-sdk-webpack root instead of deep/separate paths.
Router migration (Link/hooks)
src/utils/components/..., src/utils/hooks/useQueryParams.ts, src/views/.../* (many files)
Replaced imports of Link, useNavigate, useLocation, useParams from react-router-dom-v5-compat with react-router across many components and hooks; usages unchanged.
PatternFly icon imports
src/utils/components/MatchExpression/..., src/utils/components/Selector/Selector.tsx, src/views/.../NetworkPolicy*.tsx, src/views/.../PodTraffic.tsx, src/views/nads/list/...
Replaced deep ESM icon imports (e.g. @patternfly/react-icons/dist/esm/icons/...) with package-level imports from @patternfly/react-icons.
Lodash import changes
src/utils/components/DetailsItem/DetailsItem.tsx, src/utils/components/OwnerReference/owner-references.tsx, src/utils/components/Selector/Selector.tsx
Switched from lodash-es to lodash imports (callsites unchanged).
Document title change
src/utils/components/ErrorPage/ErrorPage.tsx
Removed react-helmet usage and now uses DocumentTitle from @openshift-console/dynamic-plugin-sdk to set the document title.
DetailsItem API change
src/utils/components/DetailsItem/DetailsItem.tsx
Added optional children?: ReactNode to DetailsItemProps (and EditButtonProps), replaced SFC with FC for EditButton; component uses children when present, otherwise falls back to _.get(obj, path, defaultValue).
Resource timestamp return type
src/utils/resources/shared.ts
getCreationTimestamp() now returns a string via new Date(...).toString() instead of a Date object.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed This pull request is for a TypeScript/React console plugin for OpenShift, not a Go project. The repository contains no Ginkgo tests.
Test Structure And Quality ✅ Passed The custom check for Ginkgo test code review is not applicable to this pull request, which contains only TypeScript/JavaScript files and no Go code or Ginkgo tests.
Microshift Test Compatibility ✅ Passed This pull request updates dependencies and refactors imports for an OpenShift Console plugin written in TypeScript/React with no Ginkgo e2e tests being added or modified.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This pull request does not add any Ginkgo e2e tests. The repository is a TypeScript/React frontend plugin for OpenShift Console, and all changes are limited to dependency updates and import path modifications.
Topology-Aware Scheduling Compatibility ✅ Passed This PR is a dependency and code modernization update with no changes to Kubernetes deployment manifests or scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The OTE Binary Stdout Contract check is not applicable to this TypeScript/JavaScript console plugin repository with Cypress tests, as it lacks Go source code or test binaries.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed IPv6 and disconnected network test compatibility check is not applicable to this TypeScript/JavaScript OpenShift console plugin repository. No Ginkgo e2e tests are being added.
Title check ✅ Passed The title 'Update dependencies for upcoming Console 4.22 release' accurately and concisely summarizes the main change—a comprehensive dependency upgrade targeting the Console 4.22 release.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot requested review from lkladnit and upalatucci April 17, 2026 19:42
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 17, 2026
Copy link
Copy Markdown

@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: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/utils/components/ListEmptyState/ListEmptyState.tsx (1)

68-77: ⚠️ Potential issue | 🟡 Minor

Relative paths in createButtonlink will not resolve correctly with navigate().

Lines 74-75 handle absolute and relative paths inconsistently. When params?.ns is truthy, callers like MultiNetworkPolicyList and IngressesList pass relative paths ('~new/form', '~new') directly into navigate(). React Router resolves relative paths against the current location, not as path segments to append. These should be normalized to absolute paths before navigating, similar to how the fallback branch constructs them explicitly:

  • SHARED_DEFAULT_PATH_NEW_RESOURCE_FORM and SHARED_DEFAULT_PATH_NEW_RESOURCE_YAML are relative strings
  • serviceCreateFormLink and routeCreateFormLink are already absolute and work correctly
  • Consider normalizing relative paths to absolute in ListEmptyState or in the calling components before passing them as createButtonlink
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/utils/components/ListEmptyState/ListEmptyState.tsx` around lines 68 - 77,
The onClick branch in ListEmptyState uses navigate(...) with createButtonlink
directly when params?.ns is truthy, which fails for relative values like
SHARED_DEFAULT_PATH_NEW_RESOURCE_FORM/SHARED_DEFAULT_PATH_NEW_RESOURCE_YAML
passed by MultiNetworkPolicyList/IngressesList; update ListEmptyState.tsx to
normalize createButtonlink to an absolute path before calling navigate (e.g.,
detect if createButtonlink is a relative token like startsWith('~') or not
starting with '/' and build `/k8s/ns/${params.plural}/${createButtonlink}`), or
introduce a small helper (ensureAbsolutePath) used in the onClick branch so
serviceCreateFormLink/routeCreateFormLink keep working and relative shared
constants are converted to absolute URLs prior to navigate.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Around line 49-50: Update package.json to bump `@typescript-eslint/parser` and
`@typescript-eslint/eslint-plugin` to v8.39.0 (or later) so they support
TypeScript 5.9.3; locate the dependency entries for "@typescript-eslint/parser"
and "@typescript-eslint/eslint-plugin" and replace their version pins with
">=8.39.0" (or a specific 8.39.0+ semver), then run the package manager to
regenerate the lockfile and run the linter/TypeScript build to verify
compatibility with the bumped "typescript" version.

In `@src/utils/components/DetailsItem/DetailsItem.tsx`:
- Line 141: The component's fallback logic treats valid children values (0, '',
false) as absent because it uses `children || ...` and still computes `hide`
from `obj/path` even when `children` is supplied; update the rendering logic in
DetailsItem (the component/function handling `children`, `hideEmpty`, and the
`hide` boolean) to: 1) compute displayed content using a strict check (e.g. use
`children !== undefined` or `children !== null`) so falsy but valid values are
preserved, and 2) when `children` is provided, skip deriving `hide` from the
`obj/path` logic (i.e. only apply the `obj/path` emptiness check when `children`
is not provided) so `hideEmpty` cannot hide explicit children. Use the
component's `children`, `hideEmpty`, and `hide` variables/logic to find the
exact lines to change.

In `@src/utils/resources/shared.ts`:
- Around line 60-62: getCreationTimestamp currently calls new
Date(...).toString(), which can produce "Invalid Date" or locale-dependent
output; change getCreationTimestamp to first check
resource?.metadata?.creationTimestamp and if absent return null, otherwise
construct a Date from it and return a stable ISO string using toISOString() only
after validating the Date is valid (isNaN(date.getTime()) -> return null).
Update the function getCreationTimestamp (and its generic K8sResourceCommon
usage) to implement this guard and return either a normalized ISO string or
null.

---

Outside diff comments:
In `@src/utils/components/ListEmptyState/ListEmptyState.tsx`:
- Around line 68-77: The onClick branch in ListEmptyState uses navigate(...)
with createButtonlink directly when params?.ns is truthy, which fails for
relative values like
SHARED_DEFAULT_PATH_NEW_RESOURCE_FORM/SHARED_DEFAULT_PATH_NEW_RESOURCE_YAML
passed by MultiNetworkPolicyList/IngressesList; update ListEmptyState.tsx to
normalize createButtonlink to an absolute path before calling navigate (e.g.,
detect if createButtonlink is a relative token like startsWith('~') or not
starting with '/' and build `/k8s/ns/${params.plural}/${createButtonlink}`), or
introduce a small helper (ensureAbsolutePath) used in the onClick branch so
serviceCreateFormLink/routeCreateFormLink keep working and relative shared
constants are converted to absolute URLs prior to navigate.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8e85afc5-140f-4f82-8cca-7fc016049946

📥 Commits

Reviewing files that changed from the base of the PR and between 5422f79 and 359fde9.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (60)
  • package.json
  • plugin-manifest.ts
  • src/utils/components/Area/components/PrometheusGraphLink.tsx
  • src/utils/components/Breadcrumbs/Breadcrumbs.tsx
  • src/utils/components/DetailsItem/DetailsItem.tsx
  • src/utils/components/ErrorAlert.tsx
  • src/utils/components/ErrorPage/ErrorPage.tsx
  • src/utils/components/ListEmptyState/ListEmptyState.tsx
  • src/utils/components/MatchExpression/Expression.tsx
  • src/utils/components/MatchExpression/MatchExpression.tsx
  • src/utils/components/OwnerReference/owner-references.tsx
  • src/utils/components/ProjectsPrimaryUDNAlerts/NoProjectReadyForPrimaryUDNAlert.tsx
  • src/utils/components/Selector/Selector.tsx
  • src/utils/flags/manifest.ts
  • src/utils/hooks/useQueryParams.ts
  • src/utils/resources/shared.ts
  • src/views/createprojectmodal/CreateProjectModal.tsx
  • src/views/createprojectmodal/manifest.ts
  • src/views/ingresses/actions/hooks/useIngressActions.ts
  • src/views/ingresses/list/IngressesList.tsx
  • src/views/ingresses/manifest.ts
  • src/views/nads/actions/hooks/useNADsActions.tsx
  • src/views/nads/form/NetworkAttachmentDefinitionForm.tsx
  • src/views/nads/list/NetworkAttachmentDefinitionList.tsx
  • src/views/nads/list/components/NADListEmpty/NADListEmpty.tsx
  • src/views/nads/manifest.ts
  • src/views/networkpolicies/actions/hooks/useNetworkPolicyActions.tsx
  • src/views/networkpolicies/details/tabs/details/components/NetworkPolicyDetailsRow/NetworkPolicyDetailsRowPodSelector.tsx
  • src/views/networkpolicies/list/EnableMultiPage.tsx
  • src/views/networkpolicies/list/NetworkPolicyPage.tsx
  • src/views/networkpolicies/list/components/NetworkPolicyEmptyState.tsx
  • src/views/networkpolicies/list/components/NetworkPolicyRow.tsx
  • src/views/networkpolicies/manifest.ts
  • src/views/networkpolicies/new/NetworkPolicyConditionalSelector.tsx
  • src/views/networkpolicies/new/NetworkPolicyForm.tsx
  • src/views/networkpolicies/new/NetworkPolicyFormSections.tsx
  • src/views/networkpolicies/new/NetworkPolicyPeerIPBlock.tsx
  • src/views/networkpolicies/new/components/NetworkPolicyFormActionButtons.tsx
  • src/views/networkpolicies/new/components/NetworkPolicyFormPorts.tsx
  • src/views/networkpolicies/new/hooks/useIsMultiNetworkPolicy.tsx
  • src/views/routes/actions/hooks/useRouteActions.ts
  • src/views/routes/details/EditRoute.tsx
  • src/views/routes/form/RouteForm.tsx
  • src/views/routes/form/RouteFormActions.tsx
  • src/views/routes/form/useIsCreationForm.tsx
  • src/views/routes/list/RoutesList.tsx
  • src/views/routes/manifest.ts
  • src/views/services/actions/hooks/useServiceActions.tsx
  • src/views/services/details/tabs/pods/components/PodStatus.tsx
  • src/views/services/details/tabs/pods/components/PodTraffic.tsx
  • src/views/services/list/ServiceList.tsx
  • src/views/services/list/components/ServiceRow.tsx
  • src/views/services/manifest.ts
  • src/views/udns/actions/hooks/useUDNActions.tsx
  • src/views/udns/form/UserDefinedNetworkForm.tsx
  • src/views/udns/form/UserDefinedNetworkFormPage.tsx
  • src/views/udns/list/UserDefinedNetworksList.tsx
  • src/views/udns/list/components/UserDefinedNetworkCreateForm.tsx
  • src/views/udns/list/components/UserDefinedNetworkCreateModal.tsx
  • src/views/udns/manifest.ts

Comment thread package.json

export type DetailsItemProps = {
canEdit?: boolean;
children?: ReactNode;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix children fallback semantics to avoid dropping valid values.

Line [85] uses children || ..., so valid values like 0, '', or false are treated as absent. Also, Line [83] still derives hide from obj/path even when children is provided, which can hide explicit content when hideEmpty is true.

💡 Proposed fix
-  const hide = hideEmpty && _.isEmpty(_.get(obj, path));
+  const objectValue = _.get(obj, path);
+  const hasChildrenProp = children !== undefined;
+  const valueSource = hasChildrenProp ? children : objectValue;
+  const hide = hideEmpty && _.isEmpty(valueSource);
   const popoverContent: string = description ?? getPropertyDescription(model, path);
-  const value: ReactNode = children || _.get(obj, path, defaultValue);
+  const value: ReactNode = hasChildrenProp ? children : _.get(obj, path, defaultValue);

Also applies to: 83-85

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/utils/components/DetailsItem/DetailsItem.tsx` at line 141, The
component's fallback logic treats valid children values (0, '', false) as absent
because it uses `children || ...` and still computes `hide` from `obj/path` even
when `children` is supplied; update the rendering logic in DetailsItem (the
component/function handling `children`, `hideEmpty`, and the `hide` boolean) to:
1) compute displayed content using a strict check (e.g. use `children !==
undefined` or `children !== null`) so falsy but valid values are preserved, and
2) when `children` is provided, skip deriving `hide` from the `obj/path` logic
(i.e. only apply the `obj/path` emptiness check when `children` is not provided)
so `hideEmpty` cannot hide explicit children. Use the component's `children`,
`hideEmpty`, and `hide` variables/logic to find the exact lines to change.

Comment on lines 60 to +62
export const getCreationTimestamp = <A extends K8sResourceCommon = K8sResourceCommon>(
resource: A,
) => new Date(resource?.metadata?.creationTimestamp);
) => new Date(resource?.metadata?.creationTimestamp).toString();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Avoid Date#toString() for Kubernetes creation timestamps.

On Line 62, this can emit "Invalid Date" for missing values and rewrites valid ISO timestamps into locale-dependent strings, which is brittle for downstream formatting/sorting.

✅ Suggested fix
 /**
  * Get creation timestamp
  * `@param` resource - resource from which to retrieve creation timestamp
- * `@returns` Date - creation timestamp as a Date object
+ * `@returns` string | undefined - creation timestamp in original ISO format
  */
 export const getCreationTimestamp = <A extends K8sResourceCommon = K8sResourceCommon>(
   resource: A,
-) => new Date(resource?.metadata?.creationTimestamp).toString();
+): string | undefined => resource?.metadata?.creationTimestamp;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export const getCreationTimestamp = <A extends K8sResourceCommon = K8sResourceCommon>(
resource: A,
) => new Date(resource?.metadata?.creationTimestamp);
) => new Date(resource?.metadata?.creationTimestamp).toString();
/**
* Get creation timestamp
* `@param` resource - resource from which to retrieve creation timestamp
* `@returns` string | undefined - creation timestamp in original ISO format
*/
export const getCreationTimestamp = <A extends K8sResourceCommon = K8sResourceCommon>(
resource: A,
): string | undefined => resource?.metadata?.creationTimestamp;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/utils/resources/shared.ts` around lines 60 - 62, getCreationTimestamp
currently calls new Date(...).toString(), which can produce "Invalid Date" or
locale-dependent output; change getCreationTimestamp to first check
resource?.metadata?.creationTimestamp and if absent return null, otherwise
construct a Date from it and return a stable ISO string using toISOString() only
after validating the Date is valid (isNaN(date.getTime()) -> return null).
Update the function getCreationTimestamp (and its generic K8sResourceCommon
usage) to implement this guard and return either a normalized ISO string or
null.

export const getCreationTimestamp = <A extends K8sResourceCommon = K8sResourceCommon>(
resource: A,
) => new Date(resource?.metadata?.creationTimestamp);
) => new Date(resource?.metadata?.creationTimestamp).toString();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why adding the .toString() here?

Copy link
Copy Markdown
Contributor Author

@vojtechszocs vojtechszocs Apr 23, 2026

Choose a reason for hiding this comment

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

@adamviktora

Modify getCreationTimestamp - adapt to Console TimestampProps change

This change modifies getCreationTimestamp return type from Date to string to accomodate the above mentioned change in Console Timestamp props.

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 23, 2026
@vojtechszocs vojtechszocs force-pushed the update-deps-for-console-4.22 branch from 359fde9 to 77e630d Compare April 24, 2026 17:30
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 24, 2026
@vojtechszocs
Copy link
Copy Markdown
Contributor Author

Rebased and bumped Console plugin SDK dependencies to 4.22.0-prerelease.3

@vojtechszocs vojtechszocs changed the title WiP Update dependencies for upcoming Console 4.22 release Update dependencies for upcoming Console 4.22 release Apr 24, 2026
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 24, 2026
@vojtechszocs
Copy link
Copy Markdown
Contributor Author

/hold cancel

Copy link
Copy Markdown

@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

♻️ Duplicate comments (1)
src/utils/components/DetailsItem/DetailsItem.tsx (1)

141-141: ⚠️ Potential issue | 🟠 Major

children prop contract is still broken for falsy values and hideEmpty.

Even with children?: ReactNode, Line [85] still uses children || ... and Line [83] still computes hide from obj/path. This drops valid explicit children (0, '', false) and can hide provided content when hideEmpty is true.

💡 Proposed fix
-  const hide = hideEmpty && _.isEmpty(_.get(obj, path));
+  const objectValue = _.get(obj, path);
+  const hasChildrenProp = children !== undefined;
+  const valueSource = hasChildrenProp ? children : objectValue;
+  const hide = hideEmpty && _.isEmpty(valueSource);
   const popoverContent: string = description ?? getPropertyDescription(model, path);
-  const value: ReactNode = children || _.get(obj, path, defaultValue);
+  const value: ReactNode = hasChildrenProp ? children : _.get(obj, path, defaultValue);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/utils/components/DetailsItem/DetailsItem.tsx` at line 141, The
DetailsItem component incorrectly treats falsy but valid children as absent by
using truthy checks; update the logic in DetailsItem so you determine
"childProvided" with explicit null/undefined checks (e.g., children !==
undefined && children !== null) instead of using children || ... and compute
"hide" by combining hideEmpty with whether the resolved value (from obj/path or
"value" variable) is truly empty (null or undefined, or optionally strictly ===
'') only when no child was explicitly provided; replace any fallback expressions
like children || fallback with a conditional that uses childProvided ? children
: fallback so values 0, '', and false render correctly while hideEmpty still
hides genuinely empty values.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@plugin-manifest.ts`:
- Around line 1-4: The named imports in the import statement are out of
alphabetical order and fail the perfectionist/sort-named-imports rule; reorder
the named imports so ConsolePluginBuildMetadata comes before EncodedExtension in
the import from '@openshift-console/dynamic-plugin-sdk-webpack' (update the
import that currently lists EncodedExtension, ConsolePluginBuildMetadata to
ConsolePluginBuildMetadata, EncodedExtension).

---

Duplicate comments:
In `@src/utils/components/DetailsItem/DetailsItem.tsx`:
- Line 141: The DetailsItem component incorrectly treats falsy but valid
children as absent by using truthy checks; update the logic in DetailsItem so
you determine "childProvided" with explicit null/undefined checks (e.g.,
children !== undefined && children !== null) instead of using children || ...
and compute "hide" by combining hideEmpty with whether the resolved value (from
obj/path or "value" variable) is truly empty (null or undefined, or optionally
strictly === '') only when no child was explicitly provided; replace any
fallback expressions like children || fallback with a conditional that uses
childProvided ? children : fallback so values 0, '', and false render correctly
while hideEmpty still hides genuinely empty values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c9f701ff-4773-4279-b55b-46048aaff45a

📥 Commits

Reviewing files that changed from the base of the PR and between 359fde9 and 77e630d.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (60)
  • package.json
  • plugin-manifest.ts
  • src/utils/components/Area/components/PrometheusGraphLink.tsx
  • src/utils/components/Breadcrumbs/Breadcrumbs.tsx
  • src/utils/components/DetailsItem/DetailsItem.tsx
  • src/utils/components/ErrorAlert.tsx
  • src/utils/components/ErrorPage/ErrorPage.tsx
  • src/utils/components/ListEmptyState/ListEmptyState.tsx
  • src/utils/components/MatchExpression/Expression.tsx
  • src/utils/components/MatchExpression/MatchExpression.tsx
  • src/utils/components/OwnerReference/owner-references.tsx
  • src/utils/components/ProjectsPrimaryUDNAlerts/NoProjectReadyForPrimaryUDNAlert.tsx
  • src/utils/components/Selector/Selector.tsx
  • src/utils/flags/manifest.ts
  • src/utils/hooks/useQueryParams.ts
  • src/utils/resources/shared.ts
  • src/views/createprojectmodal/CreateProjectModal.tsx
  • src/views/createprojectmodal/manifest.ts
  • src/views/ingresses/actions/hooks/useIngressActions.ts
  • src/views/ingresses/list/IngressesList.tsx
  • src/views/ingresses/manifest.ts
  • src/views/nads/actions/hooks/useNADsActions.tsx
  • src/views/nads/form/NetworkAttachmentDefinitionForm.tsx
  • src/views/nads/list/NetworkAttachmentDefinitionList.tsx
  • src/views/nads/list/components/NADListEmpty/NADListEmpty.tsx
  • src/views/nads/manifest.ts
  • src/views/networkpolicies/actions/hooks/useNetworkPolicyActions.tsx
  • src/views/networkpolicies/details/tabs/details/components/NetworkPolicyDetailsRow/NetworkPolicyDetailsRowPodSelector.tsx
  • src/views/networkpolicies/list/EnableMultiPage.tsx
  • src/views/networkpolicies/list/NetworkPolicyPage.tsx
  • src/views/networkpolicies/list/components/NetworkPolicyEmptyState.tsx
  • src/views/networkpolicies/list/components/NetworkPolicyRow.tsx
  • src/views/networkpolicies/manifest.ts
  • src/views/networkpolicies/new/NetworkPolicyConditionalSelector.tsx
  • src/views/networkpolicies/new/NetworkPolicyForm.tsx
  • src/views/networkpolicies/new/NetworkPolicyFormSections.tsx
  • src/views/networkpolicies/new/NetworkPolicyPeerIPBlock.tsx
  • src/views/networkpolicies/new/components/NetworkPolicyFormActionButtons.tsx
  • src/views/networkpolicies/new/components/NetworkPolicyFormPorts.tsx
  • src/views/networkpolicies/new/hooks/useIsMultiNetworkPolicy.tsx
  • src/views/routes/actions/hooks/useRouteActions.ts
  • src/views/routes/details/EditRoute.tsx
  • src/views/routes/form/RouteForm.tsx
  • src/views/routes/form/RouteFormActions.tsx
  • src/views/routes/form/useIsCreationForm.tsx
  • src/views/routes/list/RoutesList.tsx
  • src/views/routes/manifest.ts
  • src/views/services/actions/hooks/useServiceActions.tsx
  • src/views/services/details/tabs/pods/components/PodStatus.tsx
  • src/views/services/details/tabs/pods/components/PodTraffic.tsx
  • src/views/services/list/ServiceList.tsx
  • src/views/services/list/components/ServiceRow.tsx
  • src/views/services/manifest.ts
  • src/views/udns/actions/hooks/useUDNActions.tsx
  • src/views/udns/form/UserDefinedNetworkForm.tsx
  • src/views/udns/form/UserDefinedNetworkFormPage.tsx
  • src/views/udns/list/UserDefinedNetworksList.tsx
  • src/views/udns/list/components/UserDefinedNetworkCreateForm.tsx
  • src/views/udns/list/components/UserDefinedNetworkCreateModal.tsx
  • src/views/udns/manifest.ts
✅ Files skipped from review due to trivial changes (46)
  • src/views/createprojectmodal/CreateProjectModal.tsx
  • src/views/networkpolicies/actions/hooks/useNetworkPolicyActions.tsx
  • src/views/networkpolicies/list/EnableMultiPage.tsx
  • src/views/services/list/components/ServiceRow.tsx
  • src/views/routes/form/useIsCreationForm.tsx
  • src/views/networkpolicies/details/tabs/details/components/NetworkPolicyDetailsRow/NetworkPolicyDetailsRowPodSelector.tsx
  • src/utils/flags/manifest.ts
  • src/utils/components/Area/components/PrometheusGraphLink.tsx
  • src/views/routes/list/RoutesList.tsx
  • src/utils/components/MatchExpression/Expression.tsx
  • src/views/services/actions/hooks/useServiceActions.tsx
  • src/views/ingresses/list/IngressesList.tsx
  • src/views/routes/form/RouteFormActions.tsx
  • src/utils/components/ProjectsPrimaryUDNAlerts/NoProjectReadyForPrimaryUDNAlert.tsx
  • src/utils/components/MatchExpression/MatchExpression.tsx
  • src/views/ingresses/actions/hooks/useIngressActions.ts
  • src/views/udns/list/UserDefinedNetworksList.tsx
  • src/views/networkpolicies/new/NetworkPolicyConditionalSelector.tsx
  • src/views/networkpolicies/new/NetworkPolicyPeerIPBlock.tsx
  • src/utils/components/Breadcrumbs/Breadcrumbs.tsx
  • src/utils/components/OwnerReference/owner-references.tsx
  • src/views/udns/list/components/UserDefinedNetworkCreateForm.tsx
  • src/views/networkpolicies/new/hooks/useIsMultiNetworkPolicy.tsx
  • src/utils/hooks/useQueryParams.ts
  • src/views/networkpolicies/list/components/NetworkPolicyEmptyState.tsx
  • src/views/nads/form/NetworkAttachmentDefinitionForm.tsx
  • src/views/networkpolicies/new/components/NetworkPolicyFormActionButtons.tsx
  • src/views/nads/actions/hooks/useNADsActions.tsx
  • src/views/udns/form/UserDefinedNetworkForm.tsx
  • src/views/routes/details/EditRoute.tsx
  • src/views/services/list/ServiceList.tsx
  • src/views/services/details/tabs/pods/components/PodTraffic.tsx
  • src/views/services/manifest.ts
  • src/utils/components/ListEmptyState/ListEmptyState.tsx
  • src/views/networkpolicies/new/components/NetworkPolicyFormPorts.tsx
  • src/views/networkpolicies/manifest.ts
  • src/views/nads/list/NetworkAttachmentDefinitionList.tsx
  • src/views/udns/actions/hooks/useUDNActions.tsx
  • src/views/nads/manifest.ts
  • src/utils/components/ErrorAlert.tsx
  • src/views/routes/manifest.ts
  • src/views/networkpolicies/new/NetworkPolicyFormSections.tsx
  • src/views/udns/manifest.ts
  • src/utils/components/Selector/Selector.tsx
  • src/views/udns/form/UserDefinedNetworkFormPage.tsx
  • src/views/networkpolicies/list/components/NetworkPolicyRow.tsx
🚧 Files skipped from review as they are similar to previous changes (10)
  • src/views/udns/list/components/UserDefinedNetworkCreateModal.tsx
  • src/views/routes/actions/hooks/useRouteActions.ts
  • src/views/routes/form/RouteForm.tsx
  • src/views/networkpolicies/list/NetworkPolicyPage.tsx
  • src/views/networkpolicies/new/NetworkPolicyForm.tsx
  • src/views/nads/list/components/NADListEmpty/NADListEmpty.tsx
  • src/utils/resources/shared.ts
  • src/utils/components/ErrorPage/ErrorPage.tsx
  • src/views/createprojectmodal/manifest.ts
  • package.json

Comment thread plugin-manifest.ts
Comment on lines +1 to +4
import {
EncodedExtension,
ConsolePluginBuildMetadata,
} from '@openshift-console/dynamic-plugin-sdk-webpack';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix named import order to satisfy ESLint rule.

Line 3 currently places ConsolePluginBuildMetadata after EncodedExtension, which violates perfectionist/sort-named-imports.

Suggested change
 import {
-  EncodedExtension,
   ConsolePluginBuildMetadata,
+  EncodedExtension,
 } from '@openshift-console/dynamic-plugin-sdk-webpack';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import {
EncodedExtension,
ConsolePluginBuildMetadata,
} from '@openshift-console/dynamic-plugin-sdk-webpack';
import {
ConsolePluginBuildMetadata,
EncodedExtension,
} from '@openshift-console/dynamic-plugin-sdk-webpack';
🧰 Tools
🪛 ESLint

[error] 3-3: Expected "ConsolePluginBuildMetadata" to come before "EncodedExtension"

(perfectionist/sort-named-imports)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugin-manifest.ts` around lines 1 - 4, The named imports in the import
statement are out of alphabetical order and fail the
perfectionist/sort-named-imports rule; reorder the named imports so
ConsolePluginBuildMetadata comes before EncodedExtension in the import from
'@openshift-console/dynamic-plugin-sdk-webpack' (update the import that
currently lists EncodedExtension, ConsolePluginBuildMetadata to
ConsolePluginBuildMetadata, EncodedExtension).

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 24, 2026

@vojtechszocs: 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.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 25, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 25, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: upalatucci, vojtechszocs

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 [upalatucci,vojtechszocs]

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 3c14efd into openshift:main Apr 25, 2026
6 checks passed
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants