From 67587706b3e29b4aac599492b2d1ca8c21844590 Mon Sep 17 00:00:00 2001 From: Nico Wiedemann Date: Tue, 27 Oct 2026 02:15:24 +0100 Subject: [PATCH 1/3] Stop "Log In Again" from freezing sign-in and opening endless tabs Opening the cloud sign-in dialog wrote a fresh link nonce and then read it back, in the same effect, to build the account URL. In Svelte 5 that read makes the effect depend on the value it just wrote, so every run scheduled the next one: a new nonce and another browser tab each time, until Svelte threw effect_update_depth_exceeded and left the dialog frozen. A Mac log showed exactly that error right after the session expired. The reset-and-open now runs untracked, so only `open` triggers it. The first component test checks the browser opens exactly once; it fails with the same error against the old code. vitest gains the svelteTesting plugin so components mount with Svelte's client build. Co-Authored-By: Claude Opus 5 (1M context) --- CHANGELOG.md | 7 ++ src/lib/components/CloudAuthModal.svelte | 13 ++- .../__tests__/CloudAuthModal.test.ts | 83 +++++++++++++++++++ vitest.config.ts | 3 +- 4 files changed, 102 insertions(+), 4 deletions(-) create mode 100644 src/lib/components/__tests__/CloudAuthModal.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index ac27a1e..1d236b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,13 @@ popover, not for the person who wrote the commit. ## [Unreleased] +### Fixed + +- **Logging in again after a cloud session expires works again.** Clicking "Log In Again" + froze the sign-in dialog and could open hundreds of browser tabs at once: opening the dialog + kept restarting itself, opening a new sign-in page each time, until the app gave up. It now + opens the browser once + ## [1.11.2] - 2026-10-24 ### Fixed diff --git a/src/lib/components/CloudAuthModal.svelte b/src/lib/components/CloudAuthModal.svelte index 38651f5..479d197 100644 --- a/src/lib/components/CloudAuthModal.svelte +++ b/src/lib/components/CloudAuthModal.svelte @@ -15,6 +15,7 @@