From d7b89b6d46a3ae33dc7ee0206bb147f8ec6fe2d4 Mon Sep 17 00:00:00 2001 From: chenchun Date: Fri, 4 Sep 2026 15:15:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9B=9E=E9=A6=96=E9=A1=B5=E8=BD=AC?= =?UTF-8?q?=E5=9C=BA=E8=BD=AF=E9=94=81=20=E2=80=94=20=E5=B9=95=E5=B8=83?= =?UTF-8?q?=E5=90=88=E4=B8=8A=E5=90=8E=E6=B0=B8=E4=B8=8D=20reveal=EF=BC=8C?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=8F=AA=E5=89=A9=E8=83=8C=E6=99=AF=E5=92=8C?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit startNavigation() 重置 readyToLoadHeavy,但 loadingBus 只在新 mark 时通知;首页访问过一次后 REQUIRED 资源全部已标记,mark() 被 done.has(key) 守卫挡住不再 notify,回首页(/ 开启 routeLoading 门控)的 reveal 门控永不通过。修复:导航意图产生时若 loadingBus 快照已 ready,立即恢复门控;真正未加载完的资源仍走订阅通知。 --- components/dom/RouteTransitionOverlay.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/components/dom/RouteTransitionOverlay.tsx b/components/dom/RouteTransitionOverlay.tsx index 5a623aa..3c9677c 100644 --- a/components/dom/RouteTransitionOverlay.tsx +++ b/components/dom/RouteTransitionOverlay.tsx @@ -153,10 +153,20 @@ export default function RouteTransitionOverlay() { // Intent → cover (original effect 1). useEffect(() => { if (targetHref && mode === "idle") { + // startNavigation() resets readyToLoadHeavy, but the bus only notifies + // on NEW marks. When every REQUIRED key is already done (any visit to + // "/" after the first), no notification ever fires again, so the + // route:wait reveal gate for a "/" target would never pass — the + // curtain stays covering the page (dots background + header only). + // Restore the gate immediately when the snapshot is already ready; + // genuinely-pending assets still notify through the subscription. + if (loadingBus.getSnapshot().ready) { + setReadyToLoadHeavy(true); + } routeFrom.current = { path: pathname, coverDone: false }; setTransition({ mode: "route", phase: "cover" }); } - }, [targetHref, mode, pathname]); + }, [targetHref, mode, pathname, setReadyToLoadHeavy]); // Entry wait → reveal (original effect 2): fires as soon as the gates // pass — the reveal is NOT held for the progress-bar fade timers.