refactor(telemetry): text-only list empty states, distinct p50/p95 series

- paginated-list empty prop is a plain string, no icon block
- second sparkline series drawn in dimmed color; area disabled on dual charts
- duration legend shows latest p50/p95 values
This commit is contained in:
2026-08-25 22:38:45 -07:00
parent fd0489a22f
commit 5d7747839c
9 changed files with 145 additions and 142 deletions
@@ -77,6 +77,8 @@ const FnDurationDetail = ({ fn, from, to }: { fn: string; from: string; to: stri
const days = listDays({ from, to });
const p50 = fillDailySeries(rows, "server_fn.duration.p50", fn, days);
const p95 = fillDailySeries(rows, "server_fn.duration.p95", fn, days);
const lastNonZero = (series: number[]) =>
[...series].reverse().find((value) => value > 0) ?? 0;
return (
<Stack gap="xs">
@@ -84,7 +86,6 @@ const FnDurationDetail = ({ fn, from, to }: { fn: string; from: string; to: stri
data={p50}
series2={p95}
height={64}
showArea
scale={{
start: dayLabel(i18n, from),
end: dayLabel(i18n, to),
@@ -97,7 +98,7 @@ const FnDurationDetail = ({ fn, from, to }: { fn: string; from: string; to: stri
<line x1={0} y1={4} x2={18} y2={4} stroke="var(--mantine-color-anchor)" strokeWidth={2} />
</svg>
<Text size="xs" c="dimmed">
<Trans>p50</Trans>
<Trans>p50</Trans> · {Math.round(lastNonZero(p50))}ms
</Text>
</Group>
<Group gap={6}>
@@ -107,13 +108,13 @@ const FnDurationDetail = ({ fn, from, to }: { fn: string; from: string; to: stri
y1={4}
x2={18}
y2={4}
stroke="var(--mantine-color-anchor)"
stroke="var(--mantine-color-dimmed)"
strokeWidth={2}
strokeDasharray="4 3"
/>
</svg>
<Text size="xs" c="dimmed">
<Trans>p95</Trans>
<Trans>p95</Trans> · {Math.round(lastNonZero(p95))}ms
</Text>
</Group>
</Group>