MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / worstHealthStatus

Function worstHealthStatus

packages/react/src/lib/health-display.ts:63–70  ·  view source on GitHub ↗
(statuses: readonly HealthStatus[])

Source from the content-addressed store, hash-verified

61 * nothing else remains (empty input or all unknown) there is no verdict and
62 * the caller renders nothing. */
63export const worstHealthStatus = (statuses: readonly HealthStatus[]): HealthStatus | null => {
64 let worst: Exclude<HealthStatus, "unknown"> | null = null;
65 for (const status of statuses) {
66 if (status === "unknown") continue;
67 if (worst === null || HEALTH_SEVERITY[status] > HEALTH_SEVERITY[worst]) worst = status;
68 }
69 return worst;
70};
71
72/** Badge variant per status: semantic color via the Badge component. */
73export const HEALTH_BADGE_VARIANT: Record<

Callers 2

IntegrationHealthSummaryFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected