Refactor user detail page: split components, unify formatters

Break the 615-line UserDetail.tsx into focused sub-components
(header, stat cards, activity chart, request history, open alerts)
and extract shared utilities to lib/ (format, userChart,
enrichRequests). Promote storage load (GB/hr) to a stat card and
collapse the chart UX to a single metric picker. Add server-wide
average reference line alongside the user's own on every metric,
and link request titles to their Seerr pages.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-19 10:00:21 -04:00
parent b2c1642065
commit 74588e50f6
18 changed files with 994 additions and 664 deletions
+15
View File
@@ -0,0 +1,15 @@
export default function RankChip({
rank,
total,
}: {
rank: number | null;
total: number;
}) {
if (rank === null) return <span className="text-slate-700"></span>;
return (
<span className="text-xs font-mono text-slate-500">
#{rank}
<span className="text-slate-700">/{total}</span>
</span>
);
}