📝 Description
In the App Router, if page.tsx awaits a massive data fetch from GitHub, the entire page blocks until the data is ready. We want the dashboard "shell" (Navbar, Footer, basic layout) to load instantly, while the individual charts and widgets load asynchronously.
🎯 What needs to be done
Refactor the data fetching logic on the dashboard page. Instead of awaiting everything at the top level, pass promises (or wrap components in React <Suspense>) so the Next.js server can stream UI components to the client as soon as their specific data resolves.
📍 Where to look
app/(root)/[username]/page.tsx
app/(root)/[username]/loading.tsx (You may need to move pieces of this into specific fallback components).
- Next.js Docs: Streaming with Suspense
✅ Acceptance Criteria
📝 Description
In the App Router, if
page.tsxawaits a massive data fetch from GitHub, the entire page blocks until the data is ready. We want the dashboard "shell" (Navbar, Footer, basic layout) to load instantly, while the individual charts and widgets load asynchronously.🎯 What needs to be done
Refactor the data fetching logic on the dashboard page. Instead of awaiting everything at the top level, pass promises (or wrap components in React
<Suspense>) so the Next.js server can stream UI components to the client as soon as their specific data resolves.📍 Where to look
app/(root)/[username]/page.tsxapp/(root)/[username]/loading.tsx(You may need to move pieces of this into specific fallback components).✅ Acceptance Criteria
/[username].ActivityLandscapeorAIInsights) display isolated loading states/skeletons and pop in individually when ready.