Apply consistent, presentation-focused code style to UI components:
flex, flex-col, h-full, min-h-0, and the intended overflow-* behavior).className="block truncate ..." on the text node used by the tooltip trigger.ui/lib/utils/numbers.ts) rather than being reimplemented in components.useMemo, precompute display strings and tooltip strings separately (e.g., rounded display, full-precision tooltip) instead of mixing formatting logic inline.Example pattern:
const statCards = useMemo(() => {
const display = stats
? stats.success_rate.toFixed(2) + "%"
: undefined;
const tooltip = stats
? stats.success_rate.toLocaleString(undefined, { maximumFractionDigits: 6 })
: undefined;
return [{
title: "Success Rate",
value: fetchingStats ? <Skeleton /> : display ?? "-",
tooltip: fetchingStats ? undefined : tooltip,
testId: "logs-stat-value-success-rate",
}];
}, [fetchingStats, stats]);
This keeps UI layout stable, prevents truncation/tooltip bugs, improves readability, and ensures consistent formatting across the app.
Enter the URL of a public GitHub repository