From 9d013340a1a4b3a7e60d8ce636fe0115a9ec0470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Fri, 22 May 2026 12:21:26 +0200 Subject: [PATCH] Derive defaultKind from displayed entities, not filter state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When stale rows are kept visible during a kind filter change, the name column's defaultKind should match the entities being displayed, not the pending filter. Otherwise entity names flash with a kind prefix (e.g. "api:foo") until new data arrives. The column layout switch still uses the filter's kind so the table shape updates immediately. Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Fredrik Adelöw --- .../CatalogTable/defaultCatalogTableColumnsFunc.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/catalog/src/components/CatalogTable/defaultCatalogTableColumnsFunc.tsx b/plugins/catalog/src/components/CatalogTable/defaultCatalogTableColumnsFunc.tsx index 54dd701770..ac4a8b1b69 100644 --- a/plugins/catalog/src/components/CatalogTable/defaultCatalogTableColumnsFunc.tsx +++ b/plugins/catalog/src/components/CatalogTable/defaultCatalogTableColumnsFunc.tsx @@ -25,11 +25,18 @@ export const defaultCatalogTableColumnsFunc: CatalogTableColumnsFunc = ({ filters, entities, }) => { + // Derive the name column's defaultKind from the displayed entities so + // that the entity ref prefix stays consistent with the rows during + // filter transitions (when stale rows are kept visible while new data + // loads). The column layout switch still uses the filter's kind so the + // table shape updates immediately. + const defaultKind = + entities[0]?.kind?.toLocaleLowerCase('en-US') ?? filters.kind?.value; const showTypeColumn = filters.type === undefined; return [ columnFactories.createTitleColumn({ hidden: true }), - columnFactories.createNameColumn({ defaultKind: filters.kind?.value }), + columnFactories.createNameColumn({ defaultKind }), ...createEntitySpecificColumns(), ];