Skip to content

feat: #241 ⚙️ Perf | Non-Blocking Global Layout Suspense Isolation#344

Open
DammyAji wants to merge 4 commits into
StellarFlow-Network:mainfrom
DammyAji:main
Open

feat: #241 ⚙️ Perf | Non-Blocking Global Layout Suspense Isolation#344
DammyAji wants to merge 4 commits into
StellarFlow-Network:mainfrom
DammyAji:main

Conversation

@DammyAji

@DammyAji DammyAji commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #241

Resolves the issue where intensive client telemetry summaries were blocking initial server-side hydration pipelines for simple headers.

Changes

  • src/app/admin/page.tsx (new) — Admin dashboard page with static header, AdminTabBar, and intensive AdminStatsRows enclosed in a native React <Suspense> context slot with AdminStatsSkeleton as the static fallback
  • src/app/layout.tsx — Added SocketProvider to the global layout so WebSocket context is available app-wide without blocking hydration
  • src/app/components/AdminTabBar.tsx — Fixed pre-existing bug (export inside function body, undefined activeTab)
  • src/app/components/FloatingSidebar.tsx — Fixed duplicate handlePrefetch definition
  • src/app/components/nav.jsx — Fixed missing usePathname import and duplicate onMouseEnter
  • src/app/hooks/useSocket.ts — Fixed WebSocket protocol detection to use window.location.protocol so wss:// is used correctly on HTTPS

Technical Requirements Met

  • ✅ Intensive administrative statistics rows enclosed inside native React context slots (<Suspense>)
  • ✅ Fast, static asset fallback cards (AdminStatsSkeleton) served immediately so users interact with text blocks without waiting for full page arrays

DammyAji added 4 commits June 2, 2026 01:10
…lation

- Add StatsSkeleton fallback component for stats rows Suspense boundary
- Add AdminStatsSkeleton fallback for admin telemetry rows
- Wrap SystemStats + ModularStatsCard sections in Suspense in page.jsx
- Export new skeletons from skeletons index

Intensive admin/stats rows are now isolated in native React Suspense
slots so the header and nav hydrate immediately without waiting for
complex client telemetry summaries to resolve.
…lation

- Add src/app/admin/page.tsx: wraps intensive AdminStatsRows in a
  Suspense boundary with AdminStatsSkeleton fallback so static header,
  nav, and tab bar are never blocked by telemetry resolution
- Update layout.tsx: add SocketProvider to global layout tree so
  WebSocket context is available app-wide without re-mounting
- Fix AdminTabBar.tsx: move export default outside function body and
  resolve undefined activeTab variable
- FloatingSidebar.tsx: remove duplicate handlePrefetch definition
- nav.jsx: add missing usePathname import, remove duplicate onMouseEnter
Deriving ws/wss from NODE_ENV breaks in HTTPS dev environments (e.g.
Codespaces). Use window.location.protocol instead so wss: is used
whenever the page is served over HTTPS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

⚙️ Perf | Non-Blocking Global Layout Suspense Isolation

1 participant