Skip to content

Commit b38197e

Browse files
committed
fix: only preserve LoadFailed nav status when URL matches failed URL
The syncWebContentsState guard that preserves LoadFailed status when the computed status is Success was too broad. It ran on all events including did-navigate and did-navigate-in-page, not just did-stop-loading. This meant a guest that navigated to a new working URL could still report the old LoadFailed status, leaving the unreachable overlay stuck in the UI. Adding a URL comparison ensures the failure is only preserved when Electron emits did-stop-loading for the same URL that failed (the intended case), and clears it when navigation to a different URL succeeds.
1 parent 239e5e7 commit b38197e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/desktop/src/preview/Manager.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,9 @@ const makeNativeOperations = Effect.fn("PreviewManager.makeOperations")(function
11421142
// failed guest is no longer "loading", but it has not successfully
11431143
// navigated anywhere. Keep the failure until a new load actually starts.
11441144
const navStatus =
1145-
current.navStatus.kind === "LoadFailed" && computedNavStatus.kind === "Success"
1145+
current.navStatus.kind === "LoadFailed" &&
1146+
computedNavStatus.kind === "Success" &&
1147+
computedNavStatus.url === current.navStatus.url
11461148
? current.navStatus
11471149
: computedNavStatus;
11481150
const state: PreviewTabState = {

0 commit comments

Comments
 (0)