Skip to content

Commit 4343bee

Browse files
authored
[CRCR] Show Healthy/Degraded health status on CRCR summary page (#8366)
## Summary Replaces raw pass-rate percentages with semantic health labels on the CRCR summary page (`/crcr`): - **Healthy**: displayed when pass rate = 100% - **Degraded**: displayed when pass rate < 100% ### Changes - **CRCR Relay Health card**: Shows "Healthy" or "Degraded" prominently, with the actual percentage and job counts as sub-labels. Border color uses green (healthy) or orange (degraded) instead of the previous green/red threshold. - **Per-repo tables**: Added a dedicated "Health" column with Healthy/Degraded chips alongside the existing numeric "Pass Rate" column. - Health threshold simplified: 100% = Healthy, anything below = Degraded (per sync meeting action item). ### Mockup Live mockup: https://subinz1.github.io/CRCR/mockups/oot-hud-mockup-crcr-summary.html Fixes #8306 ## Test plan - [ ] Verify CRCR summary page loads without errors - [ ] Verify the health card shows "Healthy" when crcr-test pass rate is 100% - [ ] Verify the health card shows "Degraded" with orange border when < 100% - [ ] Verify per-repo table "Health" column shows correct Healthy/Degraded chips - [ ] Verify numeric "Pass Rate" column still shows accurate percentages
1 parent ad6627e commit 4343bee

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

torchci/pages/crcr/index.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,10 @@ function CrcrTestHealthCard({
309309
metrics: CiMetricsRow | undefined;
310310
}) {
311311
if (!metrics) return null;
312-
const rate = (metrics.pass_rate * 100).toFixed(1) + "%";
313-
const isHealthy = metrics.pass_rate >= 0.95;
314-
const borderColor = isHealthy ? "#2e7d32" : "#d32f2f";
312+
const pct = (metrics.pass_rate * 100).toFixed(1) + "%";
313+
const isHealthy = metrics.pass_rate >= 1.0;
314+
const borderColor = isHealthy ? "#2e7d32" : "#ed6c02";
315+
const label = isHealthy ? "Healthy" : "Degraded";
315316
return (
316317
<NextLink href="/crcr/pytorch/crcr-test" passHref legacyBehavior>
317318
<Paper
@@ -330,13 +331,13 @@ function CrcrTestHealthCard({
330331
}}
331332
>
332333
<Typography variant="caption" color="text.secondary">
333-
CRCR-test Pass Rate
334+
CRCR Relay Health
334335
</Typography>
335336
<Typography variant="h5" sx={{ fontWeight: 600, color: borderColor }}>
336-
{rate}
337+
{label}
337338
</Typography>
338339
<Typography variant="caption" color="text.secondary">
339-
{metrics.successes}/{metrics.total} jobs passed &middot;
340+
{pct} · {metrics.successes}/{metrics.total} jobs passed ·
340341
pytorch/crcr-test
341342
</Typography>
342343
</Paper>

0 commit comments

Comments
 (0)