From e8dcb5fcaf73a361b3115ef035b97793a467f3dc Mon Sep 17 00:00:00 2001
From: rob thijssen
Date: Mon, 11 May 2026 15:41:22 +0300
Subject: [PATCH] feat(ui): show private activity count on timeline when no
public events
When viewing a date range with zero public activities, the status line
now shows the count of private contributions (derived from daily counts
which include private repos). Helps explain gaps in the public timeline.
Co-Authored-By: Claude Opus 4.6 (1M context)
---
ui/src/pages/TimelineHome.tsx | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/ui/src/pages/TimelineHome.tsx b/ui/src/pages/TimelineHome.tsx
index 119b411..4d3bae9 100644
--- a/ui/src/pages/TimelineHome.tsx
+++ b/ui/src/pages/TimelineHome.tsx
@@ -5,7 +5,7 @@ import Col from 'react-bootstrap/Col';
import Row from 'react-bootstrap/Row';
import { VerticalTimeline } from 'react-vertical-timeline-component';
-import { fetchEvents, fetchSources, type Source } from '../api/client';
+import { fetchDailyCounts, fetchEvents, fetchSources, type Source } from '../api/client';
import { Filters } from '../components/Filters';
import { TimelineEntry } from '../components/TimelineEntry';
@@ -82,6 +82,19 @@ export function TimelineHome() {
const events = eventsQ.data ?? [];
+ const fromStr = new Date(rangeValue[0]).toISOString().slice(0, 10);
+ const toStr = new Date(rangeValue[1]).toISOString().slice(0, 10);
+ const dailyQ = useQuery({
+ queryKey: ['daily-counts', fromStr, toStr],
+ queryFn: () => fetchDailyCounts(fromStr, toStr),
+ staleTime: 5 * 60_000,
+ });
+ const totalCount = useMemo(
+ () => (dailyQ.data ?? []).reduce((sum, d) => sum + d.count, 0),
+ [dailyQ.data],
+ );
+ const privateCount = totalCount - events.length;
+
return (
<>
0 ? `, ${privateCount} private` : ''}`}
{events.map((item) => (