From d75f15e78bade08e980e80dac031fad624e22a35 Mon Sep 17 00:00:00 2001 From: Vance Ingalls Date: Sun, 14 Jun 2026 22:30:22 -0700 Subject: [PATCH] fix(studio): flush in-flight http writes before disposing SDK session MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 Co-authored-by: Miguel Ángel --- packages/studio/src/hooks/useSdkSession.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/studio/src/hooks/useSdkSession.ts b/packages/studio/src/hooks/useSdkSession.ts index 4894194151..7e950e79ec 100644 --- a/packages/studio/src/hooks/useSdkSession.ts +++ b/packages/studio/src/hooks/useSdkSession.ts @@ -44,7 +44,8 @@ export function useSdkSession( return () => { cancelled = true; - comp?.dispose(); + const c = comp; + if (c) void c.flush().finally(() => c.dispose()); }; }, [projectId, activeCompPath]);