authorgravatar for 71498452+StiensWout@users.noreply.github.comWout Stiens <71498452+StiensWout@users.noreply.github.com> 2026-08-16 14:55:43+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-08-16 18:25:43+05:30
logbab4b6f02b8bdaf15fd32636a97f69ff657cec50
treea796f286cae8c7a8487ec4389dcf0a2f7bc09307
parent89c52a33179bc0932b901f637ad9acb615423436
signature Signed by PGP key B5690EEEBB952194

fix(web): align Windows update confirmation copy (#7208)


5 files changed, 9 insertions(+), 30 deletions(-)

apps/web/src/components/LegacySidebar.tsx+1-1
...@@ -3585,7 +3585,7 @@ export default function LegacySidebar() {...@@ -3585,7 +3585,7 @@ export default function LegacySidebar() {
3585 let confirmed = false;3585 let confirmed = false;
3586 try {3586 try {
3587 confirmed = await ensureLocalApi().dialogs.confirm(3587 confirmed = await ensureLocalApi().dialogs.confirm(
3588 getDesktopUpdateInstallConfirmationMessage(desktopUpdateState, navigator.platform),3588 getDesktopUpdateInstallConfirmationMessage(desktopUpdateState),
3589 );3589 );
3590 } catch (error) {3590 } catch (error) {
3591 setDesktopUpdateActionPending(false);3591 setDesktopUpdateActionPending(false);
apps/web/src/components/desktopUpdate.logic.test.ts+6-21
...@@ -244,30 +244,15 @@ describe("desktop update UI helpers", () => {...@@ -244,30 +244,15 @@ describe("desktop update UI helpers", () => {
244 ).toContain("Install update and restart T3 Code?");244 ).toContain("Install update and restart T3 Code?");
245 });245 });
246246
247 it("warns Windows users that a silent installation can take several minutes", () => {247 it("keeps the same install confirmation copy across desktop platforms", () => {
248 const message = getDesktopUpdateInstallConfirmationMessage(248 expect(
249 {249 getDesktopUpdateInstallConfirmationMessage({
250 availableVersion: "1.1.0",
251 downloadedVersion: "1.1.0",
252 },
253 "Win32",
254 );
255
256 expect(message).toContain("may remain closed for several minutes");
257 expect(message).toContain("no installer window may appear");
258 expect(message).toContain("will reopen automatically");
259 });
260
261 it("keeps the additional silent installation warning Windows-specific", () => {
262 const message = getDesktopUpdateInstallConfirmationMessage(
263 {
264 availableVersion: "1.1.0",250 availableVersion: "1.1.0",
265 downloadedVersion: "1.1.0",251 downloadedVersion: "1.1.0",
266 },252 }),
267 "MacIntel",253 ).toBe(
254 "Install update 1.1.0 and restart T3 Code?\n\nAny running tasks will be interrupted. Make sure you're ready before continuing.",
268 );255 );
269
270 expect(message).not.toContain("may remain closed for several minutes");
271 });256 });
272});257});
273258
apps/web/src/components/desktopUpdate.logic.ts+1-6
...@@ -1,5 +1,4 @@...@@ -1,5 +1,4 @@
1import type { DesktopUpdateActionResult, DesktopUpdateState } from "@t3tools/contracts";1import type { DesktopUpdateActionResult, DesktopUpdateState } from "@t3tools/contracts";
2import { isWindowsPlatform } from "../lib/utils";
32
4export type DesktopUpdateButtonAction = "download" | "install" | "none";3export type DesktopUpdateButtonAction = "download" | "install" | "none";
54
...@@ -97,13 +96,9 @@ export function getDesktopUpdateButtonTooltip(state: DesktopUpdateState): string...@@ -97,13 +96,9 @@ export function getDesktopUpdateButtonTooltip(state: DesktopUpdateState): string
9796
98export function getDesktopUpdateInstallConfirmationMessage(97export function getDesktopUpdateInstallConfirmationMessage(
99 state: Pick<DesktopUpdateState, "availableVersion" | "downloadedVersion">,98 state: Pick<DesktopUpdateState, "availableVersion" | "downloadedVersion">,
100 platform = "",
101): string {99): string {
102 const version = state.downloadedVersion ?? state.availableVersion;100 const version = state.downloadedVersion ?? state.availableVersion;
103 const windowsInstallWarning = isWindowsPlatform(platform)101 return `Install update${version ? ` ${version}` : ""} and restart T3 Code?\n\nAny running tasks will be interrupted. Make sure you're ready before continuing.`;
104 ? "\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."
105 : "";
106 return `Install update${version ? ` ${version}` : ""} and restart T3 Code?\n\nAny running tasks will be interrupted. Make sure you're ready before continuing.${windowsInstallWarning}`;
107}102}
108103
109export function getDesktopUpdateActionError(result: DesktopUpdateActionResult): string | null {104export function getDesktopUpdateActionError(result: DesktopUpdateActionResult): string | null {
apps/web/src/components/settings/SettingsPanels.tsx-1
...@@ -284,7 +284,6 @@ function AboutVersionSection() {...@@ -284,7 +284,6 @@ function AboutVersionSection() {
284 confirmed = await ensureLocalApi().dialogs.confirm(284 confirmed = await ensureLocalApi().dialogs.confirm(
285 getDesktopUpdateInstallConfirmationMessage(285 getDesktopUpdateInstallConfirmationMessage(
286 updateState ?? { availableVersion: null, downloadedVersion: null },286 updateState ?? { availableVersion: null, downloadedVersion: null },
287 navigator.platform,
288 ),287 ),
289 );288 );
290 } catch (error) {289 } catch (error) {
apps/web/src/components/sidebar/SidebarUpdatePill.tsx+1-1
...@@ -222,7 +222,7 @@ function SidebarUpdateControl() {...@@ -222,7 +222,7 @@ function SidebarUpdateControl() {
222 let confirmed = false;222 let confirmed = false;
223 try {223 try {
224 confirmed = await ensureLocalApi().dialogs.confirm(224 confirmed = await ensureLocalApi().dialogs.confirm(
225 getDesktopUpdateInstallConfirmationMessage(state, navigator.platform),225 getDesktopUpdateInstallConfirmationMessage(state),
226 );226 );
227 } catch (error) {227 } catch (error) {
228 setIsActionPending(false);228 setIsActionPending(false);