From 57ca7f9cd9244c0ec19a65e3c7422312856466a2 Mon Sep 17 00:00:00 2001 From: AliMahmoudDev <123aliactionx5@gmail.com> Date: Tue, 14 Jul 2026 05:47:49 +0000 Subject: [PATCH] feat: add loading skeleton states for Repository Dashboard Add loading.tsx files for the dashboard overview and repository detail pages. The skeletons mirror the actual page layout so users see a content-aware placeholder instead of a blank screen during data fetching. - dashboard/loading.tsx: metric cards + repository grid skeleton - dashboard/repository/[id]/loading.tsx: header, stats, evidence panels and timeline skeleton Closes #3 --- apps/web/src/app/dashboard/loading.tsx | 41 ++++++++ .../app/dashboard/repository/[id]/loading.tsx | 99 +++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 apps/web/src/app/dashboard/loading.tsx create mode 100644 apps/web/src/app/dashboard/repository/[id]/loading.tsx diff --git a/apps/web/src/app/dashboard/loading.tsx b/apps/web/src/app/dashboard/loading.tsx new file mode 100644 index 0000000..1c01283 --- /dev/null +++ b/apps/web/src/app/dashboard/loading.tsx @@ -0,0 +1,41 @@ +export default function DashboardLoading() { + return ( +
+ {/* Metrics Section Skeleton */} +
+

Engineering Overview

+
+ {Array.from({ length: 4 }).map((_, i) => ( +
+
+
+
+ ))} +
+
+ + {/* Repositories Section Skeleton */} +
+
+

Your Repositories

+
+
+ +
+ {Array.from({ length: 3 }).map((_, i) => ( +
+
+
+
+
+
+
+
+
+
+ ))} +
+
+
+ ); +} diff --git a/apps/web/src/app/dashboard/repository/[id]/loading.tsx b/apps/web/src/app/dashboard/repository/[id]/loading.tsx new file mode 100644 index 0000000..0c05f34 --- /dev/null +++ b/apps/web/src/app/dashboard/repository/[id]/loading.tsx @@ -0,0 +1,99 @@ +export default function RepositoryLoading() { + return ( +
+ {/* Header Skeleton */} +
+
+
+
+
+
+
+
+
+
+
+ + {/* Health Score Skeleton */} +
+
+
+
+
+ + {/* Bus Factor Skeleton */} +
+
+
+
+
+ + {/* Resilience Skeleton */} +
+
+
+
+
+
+ + {/* Stats Grid Skeleton */} +
+ {Array.from({ length: 2 }).map((_, i) => ( +
+
+
+
+ ))} +
+
+
+
+
+
+
+
+
+
+
+ + {/* Evidence Panels Skeleton */} +
+
+
+ {Array.from({ length: 4 }).map((_, i) => ( +
+
+
+
+
+
+
+
+
+
+
+
+ ))} +
+
+ + {/* Timeline Skeleton */} +
+
+
+
+
    + {Array.from({ length: 5 }).map((_, i) => ( +
  • +
    +
    +
    +
    +
    +
  • + ))} +
+
+
+ ); +}