🐛 Fix landing pages stuck on Loading spinner on Netlify#4244
🐛 Fix landing pages stuck on Loading spinner on Netlify#4244clubanderson merged 1 commit intomainfrom
Conversation
Public landing pages (/from-holmesgpt, /from-lens, /from-headlamp, /feature-inspektorgadget, /feature-kagent, /white-label, /welcome) were inside FullDashboardApp which wraps everything in AuthProvider. On console.kubestellar.io (Netlify, no Go backend), AuthProvider calls /api/me which never resolves, leaving the page stuck on "Loading KubeStellar Console" forever. Fix: Move all public landing pages to LightweightShell routes (same pattern as /missions), which skip auth and the full provider stack. Also removes unused DEV_BAR_HEIGHT_PX import that was blocking tsc. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
/lgtm |
|
@clubanderson: you cannot LGTM your own PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: clubanderson The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
👋 Hey @clubanderson — thanks for opening this PR!
This is an automated message. |
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR fixes public landing pages getting stuck on the “Loading KubeStellar Console” spinner in the Netlify deployment by moving those routes out of the auth-wrapped app shell and into the existing lightweight routing pattern.
Changes:
- Routes several public marketing/landing pages through
LightweightShellto avoidAuthProvider(and its/api/mecall) on Netlify. - Removes the unused
DEV_BAR_HEIGHT_PXimport to satisfy TypeScript build settings.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| web/src/App.tsx | Moves public landing page routes to LightweightShell and removes them from FullDashboardApp so they render without auth/back-end dependencies. |
| web/src/components/layout/Layout.tsx | Drops an unused UI constant import (DEV_BAR_HEIGHT_PX). |
| {/* ── Public landing pages ────────────────────────────────────── | ||
| Marketing/comparison pages that must render without auth. | ||
| On Netlify (no Go backend), AuthProvider blocks forever | ||
| waiting for /api/me — these pages skip that entirely. */} | ||
| <Route path={ROUTES.FROM_LENS} element={<LightweightShell><FromLens /></LightweightShell>} /> |
There was a problem hiding this comment.
Moving these landing pages out of FullDashboardApp means they no longer mount PageViewTracker. Several of the public pages (e.g., Welcome/FromLens/FromHeadlamp/WhiteLabel) don’t set document.title or emit a GA4 page_view themselves, so titles/analytics will regress for these routes. Consider hoisting PageViewTracker to App() (outside AuthProvider) or adding an equivalent tracker inside LightweightShell for the public routes.
| <Route path={ROUTES.FROM_LENS} element={<LightweightShell><FromLens /></LightweightShell>} /> | ||
| <Route path={ROUTES.FROM_HEADLAMP} element={<LightweightShell><FromHeadlamp /></LightweightShell>} /> | ||
| <Route path={ROUTES.FROM_HOLMESGPT} element={<LightweightShell><FromHolmesGPT /></LightweightShell>} /> | ||
| <Route path={ROUTES.FEATURE_INSPEKTORGADGET} element={<LightweightShell><FeatureInspektorGadget /></LightweightShell>} /> | ||
| <Route path={ROUTES.FEATURE_KAGENT} element={<LightweightShell><FeatureKagent /></LightweightShell>} /> |
There was a problem hiding this comment.
These public landing page routes all repeat the same LightweightShell wrapper. To reduce duplication and keep route definitions easier to update, consider grouping them under a parent that renders LightweightShell + , then define the individual paths as children.
🔄 Auto-Applying Copilot Code ReviewCopilot code review found 0 code suggestion(s) and 2 general comment(s). Also address these general comments:
Push all fixes in a single commit. Run Auto-generated by copilot-review-apply workflow. |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
Summary
Public landing pages (
/from-holmesgpt,/from-lens,/from-headlamp,/feature-inspektorgadget,/feature-kagent,/white-label,/welcome) were insideFullDashboardApp, which wraps everything inAuthProvider.On console.kubestellar.io (Netlify deployment, no Go backend),
AuthProvidercalls/api/mewhich never resolves — leaving the page permanently stuck on the "Loading KubeStellar Console" spinner.Fix
Move all public landing pages to
LightweightShellroutes (same pattern already used by/missions). This skips auth and the full provider stack (~1.8MB → ~200KB initial JS).Also fixes
DEV_BAR_HEIGHT_PXimport that was blockingtscTest plan
console.kubestellar.io/from-holmesgpt— should render immediately without spinnerconsole.kubestellar.io/from-lens— sameconsole.kubestellar.io/welcome— same