From ff3842aeb31e5a6c659e56435bf101a0491e6b40 Mon Sep 17 00:00:00 2001 From: Guilhem Lemouel Date: Thu, 3 Sep 2026 14:45:37 +0200 Subject: [PATCH] fix(frontend): let Skip wait for the workspace onboarding names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `loadWorkspaceStep()` was fired and dropped, while Skip and the use-case Continue branch on `ownWorkspace` in their `finally`. Skip awaits one POST that starts after those two GETs and can finish before them, so a first-frame Skip fell through to `leaveOnboarding()` and landed in the workspace with the backend's name — the step this flow exists for, silently gone. Both exits await the load; `isSubmitting` already covers the wait. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_012fRjnaHLwjpHN84gNNxah9 --- .../(root)/(logged)/user/(user)/onboarding/+page.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/routes/(root)/(logged)/user/(user)/onboarding/+page.svelte b/frontend/src/routes/(root)/(logged)/user/(user)/onboarding/+page.svelte index 6a7869dea9..6ac6e8287d 100644 --- a/frontend/src/routes/(root)/(logged)/user/(user)/onboarding/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/user/(user)/onboarding/+page.svelte @@ -72,7 +72,10 @@ console.error('Could not prepare the workspace step:', error) } } - void loadWorkspaceStep() + // Held, not dropped: Skip awaits one POST that can finish before these two GETs do, and + // branching on `ownWorkspace` before they land would skip the naming step this flow exists + // for. Both exits await it; `isSubmitting` already covers the wait. + const workspaceStepReady = loadWorkspaceStep() const sources = [ { id: 'ai_search', label: 'AI search', icon: Bot }, @@ -202,6 +205,7 @@ console.error('Error submitting onboarding data:', error) sendUserToast('Failed to save information: ' + (error?.body || error?.message || error), true) } finally { + await workspaceStepReady isSubmitting = false // do not block users from accessing windmill even if there is an error if (ownWorkspace) { @@ -221,6 +225,7 @@ } catch (error) { console.error('Error skipping onboarding:', error) } finally { + await workspaceStepReady isSubmitting = false // Skipping the survey is not skipping naming the workspace: the questions are ours, // the workspace is theirs.