Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): outdated servers can be updated even when the client can't connect #15002

Mergedjuliusmarmingemerged 3 commits intomain fromrefs/pull/15002/headmerged by juliusmarminge View on GitHub

Showing 18 changed files with 70 additions and 1 deletion (loading 15).

x
0 of 18 viewed, 18 left
13 additions and 0 deletionsapps/web/src/components/settings/ConnectionsSettings.tsxModified
View file
@@ -165,11 +165,13 @@
usePrimaryEnvironment,
useRelayEnvironmentDiscovery,
} from "~/state/environments";
+import { APP_VERSION } from "~/branding";
import { requestConfirmDialog } from "~/confirmDialog";
import { useAtomCommand } from "../../state/use-atom-command";
import { primaryServerKeybindingsAtom, serverEnvironment } from "~/state/server";
import { ConnectionStatusDot } from "../ConnectionStatusDot";
import {
+ OutdatedServerUpdateAction,
ServerUpdateAction,
ServerUpdateProgress,
ServerUpdatesAction,
@@ -1598,6 +1600,17 @@
) : null
+ {unsupported &&
+ environment.entry.serverUpdateRequired === true &&
+ serverUpdateState.status !== "running" ? (
+ <OutdatedServerUpdateAction
+ environmentId={environmentId}
+ serverLabel={`${environment.label} server`}
+ fromVersion={lastDescriptor?.serverVersion}
+ targetVersion={APP_VERSION}
+ label={serverUpdateState.status === "failed" ? "Retry update" : "Update"}
+ />
+ ) : null}