+ {/* Heatmap grid */}
{/* Legend */}
-
+
Less
{LEVEL_FILL.map((fill, i) => (
))}
More
-
- {days.reduce((sum, d) => sum + d.count, 0).toLocaleString()} contributions across all tracked repositories in the last 12 months.
+
+ {/* Contributions summary — large violet number, readable label */}
+
+
+ {totalEvents.toLocaleString()}
+
+
+ contributions across all tracked repositories in the last 6 months
+
+
+ {/* Line contribution stats */}
+ {hasLineStats ? (
+
+
+
+ +{fmtLines(totalAdditions)}
+
+ lines added
+
+
+
+
+ -{fmtLines(totalDeletions)}
+
+ lines removed
+
+
+ ) : (
+
+ Line stats syncing with Forgejo…
+
+ )}
);
}
diff --git a/frontend/src/components/organisms/ProviderNavbarStatus.tsx b/frontend/src/components/organisms/ProviderNavbarStatus.tsx
index d328896..92c66d8 100644
--- a/frontend/src/components/organisms/ProviderNavbarStatus.tsx
+++ b/frontend/src/components/organisms/ProviderNavbarStatus.tsx
@@ -242,6 +242,12 @@ function ProviderInlineStatus({
);
}
+function fmtElapsed(since: Date, now: number): string {
+ const s = Math.round((now - since.getTime()) / 1000);
+ if (s < 60) return `${s}s ago`;
+ return `${Math.floor(s / 60)}m ago`;
+}
+
export function ProviderNavbarStatus() {
const { isSignedIn } = useAuth();
const [credentials, setCredentials] = useState
([]);
@@ -249,6 +255,13 @@ export function ProviderNavbarStatus() {
Record
>({});
const [isUsageLoading, setIsUsageLoading] = useState(false);
+ const [lastFetchedAt, setLastFetchedAt] = useState(null);
+ const [now, setNow] = useState(Date.now());
+
+ useEffect(() => {
+ const id = setInterval(() => setNow(Date.now()), 1000);
+ return () => clearInterval(id);
+ }, []);
const usageCredentials = useMemo(() => {
return credentials
@@ -321,6 +334,7 @@ export function ProviderNavbarStatus() {
);
if (!cancelled) {
setUsageByCredentialId(Object.fromEntries(pairs));
+ setLastFetchedAt(new Date());
setIsUsageLoading(false);
}
};
@@ -364,6 +378,14 @@ export function ProviderNavbarStatus() {