From 5071208398c4ea14ce76ffba2f9d88dcf5c72b08 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 11:39:12 +0000 Subject: [PATCH] Prevent console warning spam by logging only once Co-authored-by: Rugvip <4984472+Rugvip@users.noreply.github.com> --- plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx b/plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx index fa753e7e4a..f18ce1b193 100644 --- a/plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx +++ b/plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx @@ -32,6 +32,9 @@ import { } from '../components/EntityProcessingErrorsPanel'; import { HorizontalScrollGrid } from '@backstage/core-components'; +// Module-level flag to ensure deprecation warning is only logged once +let hasLoggedSummaryWarning = false; + const useStyles = makeStyles< Theme, { infoCards: boolean; summaryCards: boolean; contentCards: boolean } @@ -144,7 +147,8 @@ export function DefaultEntityContentLayout(props: EntityContentLayoutProps) { card => !card.type || card.type === 'content', ); - if (summaryCards.length > 0) { + if (summaryCards.length > 0 && !hasLoggedSummaryWarning) { + hasLoggedSummaryWarning = true; // eslint-disable-next-line no-console console.warn( "The 'summary' entity card type has been removed. Please update your cards to use 'content' or 'info' types instead.",