fix(webui): restore startup flow while keeping recovery batching (#6712)

* fix(webui): restore startup flow while keeping recovery batching

Keep the two restart recovery scans from #6708. Withdraw the browser preload and launcher changes until they can be measured independently against the Windows first-send regression.

* fix(webui): skip graph layout measurement in reduced motion

A zero-duration shared layout still measured the panel while the 500-node graph was mounting. Disable the shared-layout link in reduced motion and start the browser budget after the initial graph paints. Keep the existing 150ms limit and all 500 node checks.
This commit is contained in:
chengyongru authored and GitHub committed 2026-11-18 23:40:49 +08:00
1 parent cab49a1c66
commit 995f9e36c1
21 files changed
+260 -400

No files matched your search

-1
View File
@@ -75,7 +75,6 @@ export async function fetchBootstrap(
const res = await fetchWithTimeout(`${baseUrl}/webui/bootstrap`, {
method: "GET",
credentials: "same-origin",
cache: "no-store",
headers,
}, timeoutMs);
if (!res.ok) {
-22
View File
@@ -1,22 +0,0 @@
import { consumeUrlBootstrapSecret, fetchBootstrap, loadSavedSecret } from "./bootstrap";
export async function requestBootstrap(secret = consumeUrlBootstrapSecret() || loadSavedSecret()) {
const boot = await fetchBootstrap("", secret);
// The document can receive the token well before React mounts. Do not extend its TTL.
const tokenExpiresAt = boot.expires_in ? Date.now() + Math.max(0, boot.expires_in) * 1000 : null;
return { boot, secret, tokenExpiresAt };
}
export type BootstrapRequest = ReturnType<typeof requestBootstrap>;
/** Hand this document's request to its App, not to a global or persistent cache. */
export function preloadInitialBootstrap() {
let pending: BootstrapRequest | undefined = requestBootstrap();
// A fast 401 (or timeout) may arrive before the UI imports. App handles the original rejection.
void pending.catch(() => {});
return () => {
const request = pending;
pending = undefined;
return request;
};
}