From c88331dec6e1da308d84c4f81088dda35e6ccc76 Mon Sep 17 00:00:00 2001 From: Jon Jackson Date: Thu, 23 Jul 2026 15:34:21 -0400 Subject: [PATCH] OCPBUGS-99491: Add columnID and columns props to Installed Operators table rows Row cells on the Installed Operators page were not responding to column management selections because TableData components were rendered without columnID or columns props. Without these, isColumnVisible() always returns true, so all cells stayed visible regardless of user column selections. Headers worked correctly because getActiveColumns() filters at the Table component level. Co-Authored-By: Claude Opus 4.6 --- .../src/components/clusterserviceversion.tsx | 104 +++++++++++++++--- 1 file changed, 86 insertions(+), 18 deletions(-) diff --git a/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx b/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx index d7a5de3124e..2637ad71aee 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx @@ -361,7 +361,14 @@ const ConsolePluginStatus: FC = ({ csv, csvPlugins }) }; export const ClusterServiceVersionTableRow = withFallback( - ({ activeNamespace, obj, subscription, catalogSourceMissing, lifecycleEnabled }) => { + ({ + activeNamespace, + obj, + subscription, + catalogSourceMissing, + lifecycleEnabled, + activeColumnIDs, + }) => { const { displayName, provider, version } = obj.spec ?? {}; const { t } = useTranslation('olm'); const olmOperatorNamespace = operatorNamespaceFor(obj) ?? ''; @@ -386,7 +393,7 @@ export const ClusterServiceVersionTableRow = withFallback {/* Name */} - + + + {/* Status */} - +
{catalogSourceMissing ? ( @@ -436,7 +451,11 @@ export const ClusterServiceVersionTableRow = withFallback {/* Provided APIs */} - + {!_.isEmpty(providedAPIs) ? _.take(providedAPIs, 4).map((desc) => (
@@ -458,20 +477,32 @@ export const ClusterServiceVersionTableRow = withFallback + ) : null} {/* Support Phase */} {lifecycleEnabled ? ( - + ) : null} {/* Last Updated */} - + {obj.status == null ? '-' : } @@ -492,6 +523,7 @@ const SubscriptionTableRow: FC = ({ catalogSourceMissing, obj, lifecycleEnabled, + activeColumnIDs, }) => { const { t } = useTranslation('olm'); const csvName = obj?.spec?.name; @@ -501,7 +533,7 @@ const SubscriptionTableRow: FC = ({ return ( <> {/* Name */} - + = ({ {/* Operator Namespace */} {activeNamespace === ALL_NAMESPACES_KEY ? ( - + ) : null} {/* Managed Namespaces */} - + {t('None')} {/* Status */} - + {catalogSourceMissing ? : } {/* Provided APIs */} - + {t('None')} {/* Cluster Compatibility */} {lifecycleEnabled ? ( - - + + - + ) : null} {/* Support Phase */} - {lifecycleEnabled ? - : null} + {lifecycleEnabled ? ( + + - + + ) : null} {/* Last Updated */} - + {obj.status == null ? '-' : } @@ -558,7 +616,11 @@ const SubscriptionTableRow: FC = ({ ); }; -const InstalledOperatorTableRow: FC = ({ obj, customData }) => { +const InstalledOperatorTableRow: FC = ({ + obj, + columns, + customData, +}) => { const { catalogSources, subscriptions, activeNamespace, lifecycleEnabled } = customData; const subscription = isCSV(obj) ? subscriptionForCSV(subscriptions, obj as ClusterServiceVersionKind) @@ -571,6 +633,8 @@ const InstalledOperatorTableRow: FC = ({ obj, cu !catalogSourceForSubscription(catalogSources, subscription) && !isPackageServer(obj); + const activeColumnIDs = useMemo(() => new Set(columns?.map((c) => c.id)), [columns]); + return isCSV(obj) ? ( = ({ obj, cu obj={obj as ClusterServiceVersionKind} subscription={subscription} lifecycleEnabled={lifecycleEnabled} + activeColumnIDs={activeColumnIDs} /> ) : ( = ({ obj, cu catalogSourceMissing={catalogSourceMissing} obj={subscription as SubscriptionKind} lifecycleEnabled={lifecycleEnabled} + activeColumnIDs={activeColumnIDs} /> ); }; @@ -1549,6 +1615,7 @@ export type ClusterServiceVersionTableRowProps = { subscription: SubscriptionKind; activeNamespace?: string; lifecycleEnabled?: boolean; + activeColumnIDs?: Set; }; type SubscriptionTableRowProps = { @@ -1556,6 +1623,7 @@ type SubscriptionTableRowProps = { catalogSourceMissing: boolean; activeNamespace?: string; lifecycleEnabled?: boolean; + activeColumnIDs?: Set; }; type ManagedNamespacesProps = {