# Debug Session: page-loading-spinner **Status**: [OPEN] **Symptom**: http://localhost:5173/ shows a loading spinner / "转圈圈" - page never finishes loading **User-reported**: 2026-06-19 **Environment**: - macOS, Vite dev server on :5173 (PID 28109), Node server on :8787 (PID 52581) - DB: MySQL @ 162.14.110.130:33306 (carlog) — `.setup_done` present - API health: 200 OK, /api/auth/me → 401 (expected for unauthenticated) - HTML / main.js / proxied /api endpoints all return quickly ## Hypotheses 1. **H1 — Auth bootstrap redirect loop**: `/api/auth/me` returns 401, the axios 401 interceptor fires `location.href = '/login?redirect=%2F'`, hard navigation reloads page, the same chain runs again, the browser tab keeps showing the loading state of a SPA re-mount. 2. **H2 — Home.vue `loading = true` stuck**: User is already logged in (session cookie valid), lands on `/` (Home), the 6 parallel API calls in `Home.vue#onMounted` never resolve (one of them hangs → `Promise.all` never settles → `loading.value` stays `true` → "加载中…" rendered forever). 3. **H3 — Vite HMR / module error**: A recent code change in client broke a module, throwing on import; the Vue app never mounts, only `
` is visible and the browser tab shows loading. 4. **H4 — Login page itself renders a spinner**: After redirect to `/login`, something on the Login page (an external CSS or font request, etc.) keeps the page in a "spinning" state perceived as still loading. 5. **H5 — Server DB query hanging for Home's API**: One of the 6 endpoints (e.g. `/stats/overview`, `/dashboard/extra`) hits a long-running SQL on the remote MySQL; the request times out at 15s, but `loading` may not flip until all settle — perceived as a permanent spinner. ## Plan - Step 1: Start debug server (collector) and add light instrumentation - Step 2: Reload the page; collect runtime evidence - Step 3: Pick the right hypothesis and apply a minimal fix - Step 4: Re-run and compare pre/post logs - Step 5: Cleanup on user confirmation