From c6f786ffbfe1b11c71cb3403dbafcaf2ef2b497e Mon Sep 17 00:00:00 2001 From: Guilhem Lemouel Date: Mon, 26 Oct 2026 03:35:19 -0700 Subject: [PATCH] fix: keep a hand-off that reuses home's draft on its session page Co-Authored-By: Claude Opus 5.5 (1M context) --- frontend/src/lib/components/sessions/sessionRuntime.svelte.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/lib/components/sessions/sessionRuntime.svelte.ts b/frontend/src/lib/components/sessions/sessionRuntime.svelte.ts index 8be0b2836e..686d10bc6e 100644 --- a/frontend/src/lib/components/sessions/sessionRuntime.svelte.ts +++ b/frontend/src/lib/components/sessions/sessionRuntime.svelte.ts @@ -1472,6 +1472,9 @@ export function resetSessionPreviewTabs(sessionId: string, seedUrl: string): voi const rt = runtimes.get(sessionId) if (rt) { rt.previewTabs.reset(tabs, 'session') + // Written to the record now, not after the owner's debounce: the sessions page judges + // the arrival by the record's tabs, and a draft without any opens on Home instead. + rt.previewTabs.flushNow() } else { setSessionTabs(sessionId, tabs, 'session') setSessionPreviewCollapsed(sessionId, false)