Skip to content

Commit 736ec84

Browse files
fix(server): crash recovery typechecks
Co-Authored-By: Claude Fable 5.2 <[email protected]>
1 parent 2f3109e commit 736ec84

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎apps/server/src/preview/ServerBrowser.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,11 +593,12 @@ const make = Effect.gen(function* () {
593593
if (tab.desktop) return dropTab(tab, true);
594594
const key = tabKey(tab.threadId, tab.tabId);
595595
if (tabs.get(key) !== tab) return;
596-
tab.crash = {
596+
const crash = {
597597
url: ServerBrowserPage.withoutDataPayload(tab.page.url()).slice(0, 2048),
598598
code: -2,
599599
description: "Page crashed",
600600
};
601+
tab.crash = crash;
601602
const reopening = (async () => {
602603
// The session must name the crash before a new page reads it, or it would load the URL again.
603604
await runPromise(
@@ -606,7 +607,7 @@ const make = Effect.gen(function* () {
606607
threadId: tab.threadId,
607608
tabId: tab.tabId,
608609
serverControlled: true,
609-
navStatus: { _tag: "LoadFailed", title: "", ...tab.crash },
610+
navStatus: { _tag: "LoadFailed", title: "", ...crash },
610611
canGoBack: false,
611612
canGoForward: false,
612613
})

0 commit comments

Comments
 (0)