fix(discovery): show availability probe suggestion card for undiscovered guests
Some checks are pending
Build and Test / Secret Scan (push) Waiting to run
Build and Test / Frontend & Backend (push) Waiting to run

hasMeaningfulDiscoveryContext returned false for records without deep
scan data (empty service_type, no facts, no ports), which prevented the
GuestDrawerOverview from rendering the availability probe suggestion
card — even when suggested_availability_probe was populated.

Add hasSuggestedProbe to the meaningful context check so the suggestion
card renders for guests that have a backfilled probe suggestion but
haven't been deep-scanned yet.

Verified via Playwright: bazarr (no existing probe, no deep scan data)
now shows the suggestion card with HTTP :6767 at 192.168.0.78.
This commit is contained in:
rcourtman 2026-06-27 00:08:32 +01:00
parent bd0220ca58
commit 5c2e465cde

View file

@ -109,16 +109,18 @@ export function hasMeaningfulDiscoveryContext(
discovery.facts.some((fact) => isMeaningfulDiscoveryFact(fact));
const hasPaths = configPathCount + dataPathCount + logPathCount > 0;
const hasSuggestedUrl = Boolean(normalizeDiscoverySuggestedUrl(discovery.suggested_url));
const hasSuggestedProbe = Boolean(discovery.suggested_availability_probe);
return Boolean(
isMeaningfulDiscoveryText(discovery.service_name) ||
isMeaningfulDiscoveryText(discovery.service_type) ||
isMeaningfulDiscoveryText(discovery.service_version) ||
isMeaningfulDiscoveryText(discovery.category) ||
portCount > 0 ||
hasFacts ||
hasPaths ||
hasSuggestedUrl,
isMeaningfulDiscoveryText(discovery.service_type) ||
isMeaningfulDiscoveryText(discovery.service_version) ||
isMeaningfulDiscoveryText(discovery.category) ||
portCount > 0 ||
hasFacts ||
hasPaths ||
hasSuggestedUrl ||
hasSuggestedProbe,
);
}