The best way to control Claude Code, Codex and more from any computer or phone
fix(web): warn before silent Windows updates (#4350)
Yukun Shan committed
Jul 23, 2026 at 20:36 UTC
b41e89eba9cd232cc3257b400fc30972a9b53438
5 files changed
+37
-3
apps/web/src/components/Sidebar.tsx
+1
-1
@@ -3608,7 +3608,7 @@ export default function Sidebar() {
3608
3609
if (desktopUpdateButtonAction === "install") {
3610
const confirmed = window.confirm(
3611
- getDesktopUpdateInstallConfirmationMessage(desktopUpdateState),
3611
+ getDesktopUpdateInstallConfirmationMessage(desktopUpdateState, navigator.platform),
3612
);
3613
if (!confirmed) return;
3614
void bridge
apps/web/src/components/desktopUpdate.logic.test.ts
+26
@@ -225,6 +225,32 @@ describe("desktop update UI helpers", () => {
225
}),
226
).toContain("Install update and restart T3 Code?");
227
});
228
+
229
+ it("warns Windows users that a silent installation can take several minutes", () => {
230
+ const message = getDesktopUpdateInstallConfirmationMessage(
231
+ {
232
+ availableVersion: "1.1.0",
233
+ downloadedVersion: "1.1.0",
234
+ },
235
+ "Win32",
236
+ );
237
+
238
+ expect(message).toContain("may remain closed for several minutes");
239
+ expect(message).toContain("no installer window may appear");
240
+ expect(message).toContain("will reopen automatically");
241
+ });
242
+
243
+ it("keeps the additional silent installation warning Windows-specific", () => {
244
+ const message = getDesktopUpdateInstallConfirmationMessage(
245
+ {
246
+ availableVersion: "1.1.0",
247
+ downloadedVersion: "1.1.0",
248
+ },
249
+ "MacIntel",
250
+ );
251
+
252
+ expect(message).not.toContain("may remain closed for several minutes");
253
+ });
254
});
255
256
describe("canCheckForUpdate", () => {
apps/web/src/components/desktopUpdate.logic.ts
+6
-1
@@ -1,4 +1,5 @@
1
import type { DesktopUpdateActionResult, DesktopUpdateState } from "@t3tools/contracts";
2
+import { isWindowsPlatform } from "../lib/utils";
3
4
export type DesktopUpdateButtonAction = "download" | "install" | "none";
5
@@ -78,9 +79,13 @@ export function getDesktopUpdateButtonTooltip(state: DesktopUpdateState): string
79
80
export function getDesktopUpdateInstallConfirmationMessage(
81
state: Pick<DesktopUpdateState, "availableVersion" | "downloadedVersion">,
82
+ platform = "",
83
): string {
84
const version = state.downloadedVersion ?? state.availableVersion;
83
- return `Install update${version ? ` ${version}` : ""} and restart T3 Code?\n\nAny running tasks will be interrupted. Make sure you're ready before continuing.`;
85
+ const windowsInstallWarning = isWindowsPlatform(platform)
86
+ ? "\n\nOn Windows, T3 Code may remain closed for several minutes while the update installs, and no installer window may appear. T3 Code will reopen automatically when installation finishes."
87
+ : "";
88
+ return `Install update${version ? ` ${version}` : ""} and restart T3 Code?\n\nAny running tasks will be interrupted. Make sure you're ready before continuing.${windowsInstallWarning}`;
89
}
90
91
export function getDesktopUpdateActionError(result: DesktopUpdateActionResult): string | null {
apps/web/src/components/settings/SettingsPanels.tsx
+1
@@ -233,6 +233,7 @@ function AboutVersionSection() {
233
const confirmed = window.confirm(
234
getDesktopUpdateInstallConfirmationMessage(
235
updateState ?? { availableVersion: null, downloadedVersion: null },
236
+ navigator.platform,
237
),
238
);
239
if (!confirmed) return;
apps/web/src/components/sidebar/SidebarUpdatePill.tsx
+3
-1
@@ -110,7 +110,9 @@ export function SidebarUpdatePill() {
110
}
111
112
if (action === "install") {
113
- const confirmed = window.confirm(getDesktopUpdateInstallConfirmationMessage(state));
113
+ const confirmed = window.confirm(
114
+ getDesktopUpdateInstallConfirmationMessage(state, navigator.platform),
115
+ );
116
if (!confirmed) return;
117
void bridge
118
.installUpdate()