From 03c91dfb0b596bd9f661a726d53dc24899d88c63 Mon Sep 17 00:00:00 2001 From: agent_coder Date: Sat, 11 Jul 2026 04:10:22 +0300 Subject: [PATCH] =?UTF-8?q?docs(deploy):=20=D0=BF=D0=BE=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D1=82=D1=8C=20=D1=83=D1=81=D1=82=D0=B0=D1=80=D0=B5?= =?UTF-8?q?=D0=B2=D1=88=D0=B8=D0=B9=20=D0=BA=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D1=82=20=D0=BF=D1=80=D0=BE=20auto-reload=20=D1=81=D0=BA=D1=80?= =?UTF-8?q?=D1=8B=D1=82=D0=BE=D0=B9=20=D0=B2=D0=BA=D0=BB=D0=B0=D0=B4=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=BF=D0=BE=D0=B4=20=D0=B2=D0=B0=D1=80=D0=B8=D0=B0?= =?UTF-8?q?=D0=BD=D1=82=20C=20(#481,=20=D1=80=D0=B5=D0=B2=D1=8C=D1=8E=20F1?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit r1-коммент утверждал «auto-reload on a hidden tab», но вариант C (r2) убрал авто-reload скрытой вкладки ради защиты несохранённого ввода. Переписал под фактическое поведение: баннер + отложенный reload на следующей in-app навигации. Co-Authored-By: Claude Opus 4.8 (1M context) --- apps/client/src/features/user/user-provider.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/client/src/features/user/user-provider.tsx b/apps/client/src/features/user/user-provider.tsx index 08af6f65..20d6bc92 100644 --- a/apps/client/src/features/user/user-provider.tsx +++ b/apps/client/src/features/user/user-provider.tsx @@ -66,8 +66,9 @@ export function UserProvider({ children }: React.PropsWithChildren) { // Register the version-coherence listener SYNCHRONOUSLY, before the socket // connects: the server emits `app-version` immediately in handleConnection, // so a listener attached after connect would miss it on a fast localhost - // connect. On a version mismatch the client guard-reloads (banner on a - // visible tab, auto-reload on a hidden one) before it hits a stale chunk. + // connect. On a version mismatch the client shows a banner and defers the + // auto-reload to the next in-app navigation (variant C — avoids reloading a + // backgrounded tab that may hold unsaved input) before it hits a stale chunk. newSocket.on("app-version", (payload?: AppVersionSocketPayload) => { triggerGuardedReload(payload?.version); });