Show dashboard loading state from landing page#49
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR improves perceived load time when navigating from the landing page to the dashboard by intercepting plain left-clicks and using SvelteKit's
Confidence Score: 5/5Safe to merge — the change is additive, scoped to the marketing landing page and a new loader variant, and introduces no side effects on authenticated routes. The click-intercept logic is correct: modifier-key and non-left-button clicks fall through to native behavior, rel=external is preserved on all three anchors so prerender continues to skip /runs, and goto() is only invoked in the browser via an event handler. The new boot variant is self-contained CSS with no shared state, and prefers-reduced-motion is handled. No auth logic, data paths, or existing routes are affected. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant LandingPage as Landing Page (+page.svelte)
participant RouteLoader as RouteNavigationLoader (root scope)
participant SvelteKit as SvelteKit goto()
participant Dashboard as /runs (Dashboard)
User->>LandingPage: clicks Dashboard link (left-click, no modifier)
LandingPage->>LandingPage: openDashboard() intercepts click
LandingPage->>LandingPage: event.preventDefault()
LandingPage->>SvelteKit: goto(dashboardPath)
SvelteKit->>RouteLoader: "navigating.to set → active = true"
RouteLoader->>User: Shows full-screen boot-dmx loader
SvelteKit->>Dashboard: Fetches /runs route
Dashboard-->>SvelteKit: Route loaded
SvelteKit->>RouteLoader: "navigating.to cleared → active = false"
RouteLoader->>User: Loader hidden, dashboard renders
Note over LandingPage: Modifier-key or non-left clicks bypass preventDefault
Note over LandingPage: rel=external kept so prerender skips /runs
Reviews (3): Last reviewed commit: "Show dashboard loading state from landin..." | Re-trigger Greptile |
33c316a to
689cc89
Compare
689cc89 to
0879450
Compare

Stack Context
This PR improves the perceived loading experience when entering the dashboard from the landing page.
What?
goto('/runs')so the root dot matrix route loader appears while/runsloads.Why?
The links previously opted out of SvelteKit navigation with
rel="external", so users stayed on the landing page with only the browser spinner while the dashboard loaded. Removingrel="external"entirely made the prerender crawler follow/runs, which fails during Vercel prerender because it is an authenticated app route. This keeps prerender behavior safe while still giving users the client-side loading state on normal clicks.The root route-transition loader also now matches the first-load landing page loader, using the same 5x5 pulse grid, dark background, amber dot color, timing, and reduced-motion behavior.
Test plan
bun run checkbun run lintbunx vite buildbun run build:vercelcould not complete locally becausedrizzle-kit push --forcefailed before Vite started;bunx vite buildverifies the SvelteKit build/prerender phase that failed in Vercel.devwithout approval.