Fix empty topology create-root and cut navigation loading flash.

Keep the hidden system root built-in; speed tree bootstrap, unblock new-root UI, and soften query/Suspense refetch jank.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-07 09:18:13 +08:00
parent c4911b6ddc
commit 990798987b
8 changed files with 246 additions and 61 deletions

View file

@ -9,7 +9,16 @@ import { I18nProvider } from "./i18n";
import { ToastProvider } from "./hooks/useToast";
import { AuthProvider } from "./auth/AuthContext";
const queryClient = new QueryClient();
const queryClient = new QueryClient({
defaultOptions: {
queries: {
// Avoid remount flash/jank on every navigation (default staleTime is 0).
staleTime: 30_000,
refetchOnWindowFocus: false,
retry: 1,
},
},
});
createRoot(document.getElementById("root")!).render(
<StrictMode>