fix: keep a hand-off that reuses home's draft on its session page

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Guilhem Lemouel
2026-10-26 03:35:19 -07:00
co-authored by Claude Opus 5.5
parent f6d86d1c29
commit c6f786ffbf
@@ -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)