From 5a3a4f7bf1cc1eff26eb24c9c6c3437caaee79ae Mon Sep 17 00:00:00 2001 From: Kokila-chandrakar Date: Wed, 3 Jun 2026 19:28:42 +0000 Subject: [PATCH 1/3] feat: add empty states for dashboard widgets --- src/components/CIAnalytics.tsx | 27 ++++++++++++++++- src/components/DiscussionsWidget.tsx | 27 +++++++++++++++++ src/components/TopRepos.tsx | 45 +++++++++++++--------------- 3 files changed, 74 insertions(+), 25 deletions(-) diff --git a/src/components/CIAnalytics.tsx b/src/components/CIAnalytics.tsx index 6b9084010..1a169143f 100644 --- a/src/components/CIAnalytics.tsx +++ b/src/components/CIAnalytics.tsx @@ -103,6 +103,8 @@ export default function CIAnalytics() { : "Rate limited" : "Refresh"; + const hasNoCIData = !!data && data.totalRuns === 0; + return (
@@ -163,8 +165,30 @@ export default function CIAnalytics() { )}
+ ) : hasNoCIData ? ( +
+
⚙️
+ +

+ No CI runs detected +

+ +

+ Set up GitHub Actions to see workflow and build analytics here. +

+ + + Learn GitHub Actions + +
) : data ? (
+
{stats.map((stat) => (
))}
- +

Flakiest workflow @@ -192,6 +216,7 @@ export default function CIAnalytics() { {data.flakiestWorkflow ?? "No failing workflows in this window"}

+
) : null}
diff --git a/src/components/DiscussionsWidget.tsx b/src/components/DiscussionsWidget.tsx index b017632b7..a6745c136 100644 --- a/src/components/DiscussionsWidget.tsx +++ b/src/components/DiscussionsWidget.tsx @@ -52,6 +52,12 @@ export default function DiscussionsWidget() { ] : []; + const hasNoDiscussionData = + !!data && + data.discussionsStarted === 0 && + data.commentsGiven === 0 && + data.markedAsAnswer === 0; + return (

@@ -78,6 +84,27 @@ export default function DiscussionsWidget() { Try again

+ ) : hasNoDiscussionData ? ( +
+
💬
+ +

+ No discussion activity yet +

+ +

+ Participate in GitHub Discussions to see your activity metrics here. +

+ + + Explore Discussions + +
) : (
{stats.map((stat) => ( diff --git a/src/components/TopRepos.tsx b/src/components/TopRepos.tsx index fdcd0d50b..20785cfd1 100644 --- a/src/components/TopRepos.tsx +++ b/src/components/TopRepos.tsx @@ -456,32 +456,29 @@ export default function TopRepos() {
) : repos.length === 0 ? ( -

No commits in the last {days} days.

+
+
📦
+ +

+ No repositories found +

+ +

+ Push your first commit on GitHub to get started and see repository activity here. +

+ + + Create Repository + +
) : ( <> - {repos.length > 10 && ( -
- setSearchQuery(e.target.value)} - placeholder="Search repositories…" - aria-label="Search repositories" - className="w-full rounded-lg border border-[var(--border)] bg-[var(--control)] px-3 py-1.5 pr-10 text-sm text-[var(--card-foreground)] placeholder:text-[var(--muted-foreground)] focus:outline-none focus:border-[var(--accent)]" - /> - - {searchQuery.length > 0 && ( - - )} -
-)} +
) : data ? (
-
{stats.map((stat) => (
-
) : null}
From 8178c2eaa4fb6cfc831c169f3cdecd0ee55afdb1 Mon Sep 17 00:00:00 2001 From: Kokila-chandrakar Date: Wed, 3 Jun 2026 20:05:41 +0000 Subject: [PATCH 3/3] feat: add empty state for CI analytics widget --- src/components/CIAnalytics.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/CIAnalytics.tsx b/src/components/CIAnalytics.tsx index 93a48a060..5eff43d64 100644 --- a/src/components/CIAnalytics.tsx +++ b/src/components/CIAnalytics.tsx @@ -188,7 +188,6 @@ export default function CIAnalytics() {
) : data ? (
-
{stats.map((stat) => (
-
-

Flakiest workflow