diff --git a/CHANGELOG.md b/CHANGELOG.md index e8929e5..f707b16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ## [Unreleased] +### Improved + +- **Smoother loading on the Journeys page.** The Journeys tab now shows a polished skeleton placeholder while data loads, matching the loading experience on Dashboard, Funnels, Uptime, and Settings. + ### Fixed - **No more random errors when switching tabs.** Navigating between Dashboard, Funnels, Uptime, and Settings no longer shows "Invalid credentials", "Something went wrong", or "Site not found" errors. This was caused by a timing issue when your login session refreshed in the background while multiple pages were loading at the same time — all those requests now wait for the refresh to finish and retry cleanly. diff --git a/app/sites/[id]/journeys/page.tsx b/app/sites/[id]/journeys/page.tsx index 388369b..f636f96 100644 --- a/app/sites/[id]/journeys/page.tsx +++ b/app/sites/[id]/journeys/page.tsx @@ -6,7 +6,7 @@ import { getDateRange, formatDate } from '@ciphera-net/ui' import { Select, DatePicker } from '@ciphera-net/ui' import SankeyDiagram from '@/components/journeys/SankeyDiagram' import TopPathsTable from '@/components/journeys/TopPathsTable' -import { SkeletonCard } from '@/components/skeletons' +import { JourneysSkeleton, useMinimumLoading } from '@/components/skeletons' import { useDashboard, useJourneyTransitions, @@ -52,6 +52,8 @@ export default function JourneysPage() { document.title = domain ? `Journeys \u00b7 ${domain} | Pulse` : 'Journeys | Pulse' }, [dashboard?.site?.domain]) + const showSkeleton = useMinimumLoading(transitionsLoading && !transitionsData) + const entryPointOptions = [ { value: '', label: 'All entry points' }, ...(entryPoints ?? []).map((ep) => ({ @@ -60,6 +62,8 @@ export default function JourneysPage() { })), ] + if (showSkeleton) return + return (
{/* Header */} @@ -146,18 +150,12 @@ export default function JourneysPage() { {/* Sankey Diagram */}
- {transitionsLoading ? ( -
- -
- ) : ( - setEntryPath(path)} - /> - )} + setEntryPath(path)} + />
{/* Top Paths */}