Problem
Context: RHIDP-15167 (Entity Page Extensions), task 3.1
The SummaryCard entity card extension (plugins/boost/src/components/catalog/entity/SummaryCard.tsx) currently only renders the entity's metadata.description and spec.rationale fields. The entity-extensions spec requires it to show category badge, current version, source connector, and lifecycle state — the key metadata a developer needs at a glance when landing on an AI asset's entity page.
Expected behavior
The SummaryCard renders a structured summary for any AI asset entity. The card shows:
- Category badge — the asset's
spec.type rendered as a colored badge using getCategoryMeta() from utils/categoryMeta.ts (label + icon + color already defined for all 7 asset types).
- Current version — the
rhdh.io/ai-asset-version annotation value, if present. Render as a small badge or chip next to the category.
- Source connector — the
rhdh.io/ai-asset-source annotation value (e.g. github, model-registry, kagenti). Render as secondary text.
- Lifecycle state —
spec.lifecycle (e.g. production, experimental). Render as a colored badge — production green, experimental amber, all others neutral.
- Description — keep existing
metadata.description rendering below the metadata row.
- Rationale — keep existing
spec.rationale rendering as secondary text.
If none of the fields above have values, the card returns null (same as current behavior).
Scope
- Workspace:
workspaces/boost
- Package:
@red-hat-developer-hub/backstage-plugin-boost (plugins/boost)
Files to modify
| File |
Change |
plugins/boost/src/components/catalog/entity/SummaryCard.tsx |
Add category badge using getCategoryMeta(), version badge from rhdh.io/ai-asset-version, source text from rhdh.io/ai-asset-source, lifecycle badge from spec.lifecycle. Keep existing description and rationale rendering. Use BUI Badge, Flex, and Text components. |
plugins/boost/src/translations/ref.ts |
Add i18n keys: catalog.card.summaryCategory, catalog.card.summaryVersion, catalog.card.summarySource, catalog.card.summaryLifecycle, and lifecycle state labels if needed. |
New file
| File |
Content |
plugins/boost/src/components/catalog/entity/SummaryCard.test.tsx |
Unit tests (see below). |
Implementation details
Reading entity metadata
Use existing utilities — do not create new helpers:
getCategoryMeta(specType) from utils/categoryMeta.ts — returns { label, icon, color } for any spec.type. Already handles .toLowerCase() normalization and fallback.
getSpecField(entity, 'type') and getSpecField(entity, 'lifecycle') from utils/entityHelpers.ts.
entity.metadata.annotations?.['rhdh.io/ai-asset-version'] and entity.metadata.annotations?.['rhdh.io/ai-asset-source'] for annotation values.
Rendering
- Use BUI
Badge with style={{ backgroundColor: meta.color }} for the category badge. Render the category icon from getCategoryMeta() alongside the label.
- Use BUI
Badge size="small" for version (same pattern as current VersionListCard).
- Lifecycle badge: use
Badge with a color variant — green for production, amber/yellow for experimental, neutral/gray for everything else.
- Source: render as
Text variant="body-x-small" color="secondary".
- All text labels must use i18n keys via
useTranslation().
- Preserve the existing
Card / CardHeader / CardBody structure.
Fixture entities for testing
| Entity |
spec.type |
rhdh.io/ai-asset-version |
rhdh.io/ai-asset-source |
spec.lifecycle |
code-review-skill |
skill |
1.2.0 |
github |
production |
granite-3-code |
ai-model |
3.0.1 |
model-registry |
production |
github-mcp-server |
mcp-server |
— |
— |
experimental |
web-search-tool |
ai-tool |
— |
— |
— |
Tests
Add SummaryCard.test.tsx following the pattern in AdoptionCard.test.tsx (uses renderInTestApp, EntityProvider, @testing-library/react).
- Full metadata — renders category badge, version, source, lifecycle, and description for an entity with all fields populated.
- Missing version and source — renders category badge and lifecycle; omits version and source sections.
- Category badge uses getCategoryMeta — the badge label and color match the category meta for the entity's
spec.type.
- Lifecycle badge color —
production renders green, experimental renders amber.
- Empty entity — returns null when description, rationale, and all metadata fields are absent.
- Description and rationale preserved — both still render when present (regression check).
Notes
- The
getCategoryMeta utility and CategoryMeta interface already exist and handle all 7 asset types plus a fallback. Do not duplicate this logic.
- The icon library for category icons is
@remixicon/react. Use the icon property from getCategoryMeta() — do not import MUI icons.
- This card is registered as
entity-card:boost/summary in plugin.tsx with the isAiAsset filter. No registration changes needed.
Problem
Context: RHIDP-15167 (Entity Page Extensions), task 3.1
The
SummaryCardentity card extension (plugins/boost/src/components/catalog/entity/SummaryCard.tsx) currently only renders the entity'smetadata.descriptionandspec.rationalefields. The entity-extensions spec requires it to show category badge, current version, source connector, and lifecycle state — the key metadata a developer needs at a glance when landing on an AI asset's entity page.Expected behavior
The
SummaryCardrenders a structured summary for any AI asset entity. The card shows:spec.typerendered as a colored badge usinggetCategoryMeta()fromutils/categoryMeta.ts(label + icon + color already defined for all 7 asset types).rhdh.io/ai-asset-versionannotation value, if present. Render as a small badge or chip next to the category.rhdh.io/ai-asset-sourceannotation value (e.g.github,model-registry,kagenti). Render as secondary text.spec.lifecycle(e.g.production,experimental). Render as a colored badge —productiongreen,experimentalamber, all others neutral.metadata.descriptionrendering below the metadata row.spec.rationalerendering as secondary text.If none of the fields above have values, the card returns
null(same as current behavior).Scope
workspaces/boost@red-hat-developer-hub/backstage-plugin-boost(plugins/boost)Files to modify
plugins/boost/src/components/catalog/entity/SummaryCard.tsxgetCategoryMeta(), version badge fromrhdh.io/ai-asset-version, source text fromrhdh.io/ai-asset-source, lifecycle badge fromspec.lifecycle. Keep existing description and rationale rendering. Use BUIBadge,Flex, andTextcomponents.plugins/boost/src/translations/ref.tscatalog.card.summaryCategory,catalog.card.summaryVersion,catalog.card.summarySource,catalog.card.summaryLifecycle, and lifecycle state labels if needed.New file
plugins/boost/src/components/catalog/entity/SummaryCard.test.tsxImplementation details
Reading entity metadata
Use existing utilities — do not create new helpers:
getCategoryMeta(specType)fromutils/categoryMeta.ts— returns{ label, icon, color }for anyspec.type. Already handles.toLowerCase()normalization and fallback.getSpecField(entity, 'type')andgetSpecField(entity, 'lifecycle')fromutils/entityHelpers.ts.entity.metadata.annotations?.['rhdh.io/ai-asset-version']andentity.metadata.annotations?.['rhdh.io/ai-asset-source']for annotation values.Rendering
Badgewithstyle={{ backgroundColor: meta.color }}for the category badge. Render the category icon fromgetCategoryMeta()alongside the label.Badge size="small"for version (same pattern as currentVersionListCard).Badgewith a color variant — green forproduction, amber/yellow forexperimental, neutral/gray for everything else.Text variant="body-x-small" color="secondary".useTranslation().Card/CardHeader/CardBodystructure.Fixture entities for testing
spec.typerhdh.io/ai-asset-versionrhdh.io/ai-asset-sourcespec.lifecyclecode-review-skillskill1.2.0githubproductiongranite-3-codeai-model3.0.1model-registryproductiongithub-mcp-servermcp-serverexperimentalweb-search-toolai-toolTests
Add
SummaryCard.test.tsxfollowing the pattern inAdoptionCard.test.tsx(usesrenderInTestApp,EntityProvider,@testing-library/react).spec.type.productionrenders green,experimentalrenders amber.Notes
getCategoryMetautility andCategoryMetainterface already exist and handle all 7 asset types plus a fallback. Do not duplicate this logic.@remixicon/react. Use theiconproperty fromgetCategoryMeta()— do not import MUI icons.entity-card:boost/summaryinplugin.tsxwith theisAiAssetfilter. No registration changes needed.