Skip to content

Commit c5c27df

Browse files
committed
Fix silent startup failure and missing provider refresh for primary environments
Bug 1: When backend readiness timed out in packaged mode, the catch handler only logged a warning — no window was created and handleFatalStartupError was never called. Now the error propagates to handleFatalStartupError so the user sees an error dialog instead of an invisible, unrecoverable app. Bug 2: The config subscription condition excluded primary environments because it only matched kind=="saved" or explicit onConfigSnapshot. Added kind=="primary" to the condition so desktop users get the subscribeServerConfig subscription and the associated provider refresh fires immediately instead of waiting for the 60-second periodic timer.
1 parent 0f15b17 commit c5c27df

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

apps/desktop/src/main.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,7 @@ function ensureInitialBackendWindowOpen(): void {
448448
if (isBackendReadinessAborted(error)) {
449449
return;
450450
}
451-
writeDesktopLogHeader(
452-
`bootstrap backend readiness warning message=${formatErrorMessage(error)}`,
453-
);
454-
console.warn("[desktop] backend readiness check timed out during packaged bootstrap", error);
451+
handleFatalStartupError("backend-readiness", error);
455452
})
456453
.finally(() => {
457454
if (backendInitialWindowOpenInFlight === nextOpen) {

apps/web/src/environments/runtime/connection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ export function createEnvironmentConnection(
264264
);
265265

266266
const unsubConfig =
267-
input.kind === "saved" || input.onConfigSnapshot
267+
input.kind === "saved" || input.kind === "primary" || input.onConfigSnapshot
268268
? input.client.server.subscribeConfig(
269269
(event: Parameters<Parameters<WsRpcClient["server"]["subscribeConfig"]>[0]>[0]) => {
270270
if (event.type !== "snapshot") {

0 commit comments

Comments
 (0)