From 02e2993897c884ae9234fefa16746be2abd97922 Mon Sep 17 00:00:00 2001 From: Harshal Patil <12152047+harche@users.noreply.github.com> Date: Wed, 25 Feb 2026 18:29:33 -0500 Subject: [PATCH 1/2] OCPBUGS-77349: Show "No description available" instead of "Not available" for CRD cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The generic "Not available" fallback on CRD cards is misleading — it reads as if the CRD itself is unavailable, not that its description is missing. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../__tests__/clusterserviceversion.spec.tsx | 17 ++++++++++++++++- .../src/components/clusterserviceversion.tsx | 7 ++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/frontend/packages/operator-lifecycle-manager/src/components/__tests__/clusterserviceversion.spec.tsx b/frontend/packages/operator-lifecycle-manager/src/components/__tests__/clusterserviceversion.spec.tsx index ede5d70cc4..6211dc1945 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/__tests__/clusterserviceversion.spec.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/__tests__/clusterserviceversion.spec.tsx @@ -58,7 +58,7 @@ jest.mock('../../utils/useClusterServiceVersionPath', () => ({ jest.mock('@console/internal/components/utils', () => ({ ...jest.requireActual('@console/internal/components/utils'), - AsyncComponent: ({ children }) => children || null, + AsyncComponent: ({ content, emptyMsg }) => {content || emptyMsg || null}, })); jest.mock('@console/internal/components/conditions', () => ({ @@ -276,6 +276,21 @@ describe('CRDCard', () => { expect(screen.queryByRole('link', { name: 'Create instance' })).not.toBeInTheDocument(); }); + + it('renders crd description when provided', () => { + const crdWithDescription = { ...crd, description: 'This is a test CRD description' }; + renderWithProviders(); + + expect(screen.getByText('This is a test CRD description')).toBeVisible(); + }); + + it('renders "No description available" when crd description is missing', () => { + const crdWithoutDescription = { ...crd }; + delete crdWithoutDescription.description; + renderWithProviders(); + + expect(screen.getByText('No description available')).toBeVisible(); + }); }); describe('CSVSubscription', () => { diff --git a/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx b/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx index 8429d635d4..f55164463b 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx @@ -825,6 +825,7 @@ export const MarkdownView = (props: { styles?: string; exactHeight?: boolean; truncateContent?: boolean; + emptyMsg?: string; }) => { return ( = ({ csv, crd, required, ...rest }) => { - + {canCreate && createRoute && ( From acda9df697b280ffc320c0820db54b198fac35c6 Mon Sep 17 00:00:00 2001 From: Harshal Patil <12152047+harche@users.noreply.github.com> Date: Wed, 25 Feb 2026 18:58:58 -0500 Subject: [PATCH 2/2] OCPBUGS-77349: Add i18n locale entry for "No description available" Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/packages/operator-lifecycle-manager/locales/en/olm.json | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/packages/operator-lifecycle-manager/locales/en/olm.json b/frontend/packages/operator-lifecycle-manager/locales/en/olm.json index 817402c0c5..03f220218c 100644 --- a/frontend/packages/operator-lifecycle-manager/locales/en/olm.json +++ b/frontend/packages/operator-lifecycle-manager/locales/en/olm.json @@ -80,6 +80,7 @@ "Installed Operators are represented by ClusterServiceVersions within this Namespace.": "Installed Operators are represented by ClusterServiceVersions within this Namespace.", " For more information, see the <3>Understanding Operators documentation. Or create an Operator and ClusterServiceVersion using the <6>Operator SDK.": " For more information, see the <3>Understanding Operators documentation. Or create an Operator and ClusterServiceVersion using the <6>Operator SDK.", "Required": "Required", + "No description available": "No description available", "Create instance": "Create instance", "No Kubernetes APIs are being provided by this Operator.": "No Kubernetes APIs are being provided by this Operator.", "{{initializationResourceKind}} required": "{{initializationResourceKind}} required",