diff --git a/web/app/(dashboard)/dashboard/projects/[slug]/[env]/services/[serviceId]/rollouts/[rolloutId]/loading.tsx b/web/app/(dashboard)/dashboard/projects/[slug]/[env]/services/[serviceId]/rollouts/[rolloutId]/loading.tsx new file mode 100644 index 00000000..d7ac3214 --- /dev/null +++ b/web/app/(dashboard)/dashboard/projects/[slug]/[env]/services/[serviceId]/rollouts/[rolloutId]/loading.tsx @@ -0,0 +1,24 @@ +import { Skeleton } from "@/components/ui/skeleton"; + +export default function Loading() { + return ( +
+
+ +
+
+ + + + +
+
+
+ +
+ + +
+
+ ); +} diff --git a/web/components/service/details/rollout-history.tsx b/web/components/service/details/rollout-history.tsx index 67c305a9..1627312c 100644 --- a/web/components/service/details/rollout-history.tsx +++ b/web/components/service/details/rollout-history.tsx @@ -17,7 +17,7 @@ import { ItemGroup, ItemTitle, } from "@/components/ui/item"; -import { Spinner } from "@/components/ui/spinner"; +import { Skeleton } from "@/components/ui/skeleton"; import type { RolloutStatus } from "@/db/types"; import { formatRelativeTime } from "@/lib/date"; import { fetcher } from "@/lib/fetcher"; @@ -108,6 +108,32 @@ function formatDuration(start: string, end: string | null): string { return `${seconds}s`; } +function RolloutHistorySkeleton({ actions }: { actions?: React.ReactNode }) { + return ( +
+
+ + {actions ?
{actions}
: null} +
+ +
+ {[1, 2, 3].map((item) => ( +
+ +
+ + +
+
+ ))} +
+
+ ); +} + export function RolloutHistory({ serviceId, projectSlug, @@ -140,11 +166,7 @@ export function RolloutHistory({ const rollouts = data?.rollouts || []; if (isLoading) { - return ( -
- -
- ); + return ; } return ( diff --git a/web/components/service/service-layout-client.tsx b/web/components/service/service-layout-client.tsx index 04e07f9e..e81946e6 100644 --- a/web/components/service/service-layout-client.tsx +++ b/web/components/service/service-layout-client.tsx @@ -151,7 +151,9 @@ export function ServiceLayoutClient({ const isActiveTab = (href: string) => { if (href === basePath) { - return pathname === basePath; + return ( + pathname === basePath || pathname.startsWith(`${basePath}/rollouts`) + ); } return pathname.startsWith(href); };