From 578bebbd8b6b82a772c4cc4aea674ae0d363bf72 Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 29 May 2026 17:56:22 +0200 Subject: [PATCH] =?UTF-8?q?fix(stammbaum):=20URL=20pan/zoom=20sync=20never?= =?UTF-8?q?=20fired=20=E2=80=94=20gate=20replaceState=20on=20router-ready?= =?UTF-8?q?=20(#692)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit replaceState throws 'before the router is initialized' during hydration, which killed the sync $effect on its first tick so the URL never updated on pan/zoom. Gate the write behind a flag flipped after the first post-mount tick() (router started) plus a defensive try/catch. Verified live: zoom now updates ?z=. The prior component test mocked replaceState and masked this. Co-Authored-By: Claude Opus 4.8 --- frontend/src/routes/stammbaum/+page.svelte | 27 +++++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/frontend/src/routes/stammbaum/+page.svelte b/frontend/src/routes/stammbaum/+page.svelte index a7964372..1232827c 100644 --- a/frontend/src/routes/stammbaum/+page.svelte +++ b/frontend/src/routes/stammbaum/+page.svelte @@ -1,5 +1,5 @@