fix(frontend): stop MSK breaking the Console Home resource count
CI / checks (pull_request) Successful in 26m59s

Console Home counted every available service through the generic resource
list, but MSK and MSK Connect are available through their own pre-SPI pages
with no adapter behind /resources, so each answered 501 and the Resources tile
read "Resource load failed". Service descriptors now say whether the generic
list serves them (listable, true when an adapter is registered), and Console
Home counts only those; the MSK cards still link to their pages.
This commit is contained in:
Zakaria
2026-10-25 10:09:35 -04:00
parent 9f1ea32183
commit eeadeef664
7 changed files with 82 additions and 7 deletions
@@ -32,12 +32,12 @@ export function useCloudConsoleHomeData(cloud: CloudProvider) {
const status = statusQuery.data
const services = useMemo(() => servicesQuery.data ?? [], [servicesQuery.data])
// Availability is derived from adapter registration, so an available service
// always has the generic list endpoint. Route shape only decides where the
// card links, not whether it can be counted -- a legacy absolute-route page
// (AWS Secrets Manager) is still counted through its adapter.
// Only a service with a registered adapter has the generic list endpoint. Route
// shape only decides where the card links: a legacy absolute-route page (AWS
// Secrets Manager) is still counted through its adapter, while MSK, available
// through its own pre-SPI page, is not listable and is never counted.
const countable = useMemo(
() => services.filter((service) => service.availability === 'available'),
() => services.filter((service) => service.availability === 'available' && service.listable),
[services],
)
@@ -85,7 +85,7 @@ export function useCloudConsoleHomeData(cloud: CloudProvider) {
: undefined,
meta:
service.availability === 'available'
? isLegacyPage
? isLegacyPage || !service.listable
? 'open service'
: serviceMetaLabel(status, counts?.isLoading ?? false, 'resources')
: 'coming soon',