diff --git a/platform/src/app/[tenant]/repos/[repoName]/charts.tsx b/platform/src/app/[tenant]/repos/[repoName]/charts.tsx index 03f4600..bf24b46 100644 --- a/platform/src/app/[tenant]/repos/[repoName]/charts.tsx +++ b/platform/src/app/[tenant]/repos/[repoName]/charts.tsx @@ -881,14 +881,26 @@ export function RepoCharts({ BOT: "bg-signal-gray", }} /> - {insights.stabilizationByOrigin && ( -
-

- {t("repoCharts.origin.stabByOrigin")} -

-
- {Object.entries(insights.stabilizationByOrigin).map( - ([origin, data]) => ( + {(() => { + // The engine defaults stabilization_ratio to 1.0 when + // files_touched is 0 (nothing to destabilize — see + // iris/metrics/stabilization.py), the same 0/0 sentinel the + // report writer already guards against (writer.py skips any + // origin with a zero commit count). Showing that default + // here reads as "Bot 100%" / "Humano 100%" for origins that + // made zero commits in the window, right next to a real 23% + // for the origin that actually has data. + const stabEntries = Object.entries( + insights.stabilizationByOrigin ?? {}, + ).filter(([, data]) => data.files_touched > 0); + if (stabEntries.length === 0) return null; + return ( +
+

+ {t("repoCharts.origin.stabByOrigin")} +

+
+ {stabEntries.map(([origin, data]) => (
- ), - )} + ))} +
-
- )} + ); + })()} )}