From 75d98a8553f9bb6a40e9f7bdd32a2a6732dd83af Mon Sep 17 00:00:00 2001 From: Samuel K Date: Wed, 27 May 2026 18:52:13 -0500 Subject: [PATCH] fix(desktop): increase workspace launch watchdog to 10 minutes Slow internet connections can cause workspace creation to exceed the previous 5-minute timeout. Doubling the watchdog gives more headroom without making indefinitely-hung launches harder to notice. --- .../components/workspace/WorkspaceWizard.svelte | 4 ++-- .../components/workspace/WorkspaceWizard.test.ts | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/desktop/src/renderer/src/lib/components/workspace/WorkspaceWizard.svelte b/desktop/src/renderer/src/lib/components/workspace/WorkspaceWizard.svelte index 8d3241ad7..728594fa2 100644 --- a/desktop/src/renderer/src/lib/components/workspace/WorkspaceWizard.svelte +++ b/desktop/src/renderer/src/lib/components/workspace/WorkspaceWizard.svelte @@ -99,7 +99,7 @@ const TEMPLATES = [ { name: "Ruby", source: "https://github.com/skevetter/devsy-quickstart-ruby" }, ] -const LAUNCH_TIMEOUT_MS = 5 * 60 * 1000 +const LAUNCH_TIMEOUT_MS = 10 * 60 * 1000 let { open = $bindable(false), @@ -314,7 +314,7 @@ async function handleLaunch() { if (launchRunning) { launchRunning = false launchError = - "Workspace creation timed out after 5 minutes. The process may still be running in the background." + "Workspace creation timed out after 10 minutes. The process may still be running in the background." toasts.error(launchError) unlisten?.() unlisten = null diff --git a/desktop/src/renderer/src/lib/components/workspace/WorkspaceWizard.test.ts b/desktop/src/renderer/src/lib/components/workspace/WorkspaceWizard.test.ts index 36d03e58e..59d568839 100644 --- a/desktop/src/renderer/src/lib/components/workspace/WorkspaceWizard.test.ts +++ b/desktop/src/renderer/src/lib/components/workspace/WorkspaceWizard.test.ts @@ -393,7 +393,7 @@ describe("launch watchdog", () => { document.body.innerHTML = "" }) - it("fires after 5 minutes when no done event arrives", async () => { + it("fires after 10 minutes when no done event arrives", async () => { providers.set([makeProvider("docker")]) const { getByText, queryByText, unmount } = render(WorkspaceWizard, { props: { open: true }, @@ -407,11 +407,11 @@ describe("launch watchdog", () => { await fireEvent.click(launchBtn) await flushAsync() - // Advance past the 5-minute watchdog. - await vi.advanceTimersByTimeAsync(5 * 60 * 1000 + 1) + // Advance past the 10-minute watchdog. + await vi.advanceTimersByTimeAsync(10 * 60 * 1000 + 1) await flushAsync() - expect(queryByText(/timed out after 5 minutes/i)).not.toBeNull() + expect(queryByText(/timed out after 10 minutes/i)).not.toBeNull() expect(queryByText("Open Workspace")).toBeNull() expect(queryByText("Retry")).not.toBeNull() unmount() @@ -432,10 +432,10 @@ describe("launch watchdog", () => { await flushAsync() // Trip the watchdog. - await vi.advanceTimersByTimeAsync(5 * 60 * 1000 + 1) + await vi.advanceTimersByTimeAsync(10 * 60 * 1000 + 1) await flushAsync() - expect(queryByText(/timed out after 5 minutes/i)).not.toBeNull() + expect(queryByText(/timed out after 10 minutes/i)).not.toBeNull() // Late done event (the listener should have been disposed, so this is a no-op). progressCallback?.({ @@ -446,7 +446,7 @@ describe("launch watchdog", () => { await flushAsync() // Timeout error is still visible; Open Workspace did not appear. - expect(queryByText(/timed out after 5 minutes/i)).not.toBeNull() + expect(queryByText(/timed out after 10 minutes/i)).not.toBeNull() expect(queryByText("Open Workspace")).toBeNull() unmount() })