| author | |
| committer | |
| log | bab4b6f02b8bdaf15fd32636a97f69ff657cec50 |
| tree | a796f286cae8c7a8487ec4389dcf0a2f7bc09307 |
| parent | 89c52a33179bc0932b901f637ad9acb615423436 |
| signature | Signed by PGP key B5690EEEBB952194 |
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 | }); |
| 246 | 246 | ||
| 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 | }); |
| 273 | 258 |
apps/web/src/components/desktopUpdate.logic.ts+1-6| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | import type { DesktopUpdateActionResult, DesktopUpdateState } from "@t3tools/contracts"; | 1 | import type { DesktopUpdateActionResult, DesktopUpdateState } from "@t3tools/contracts"; |
| 2 | import { isWindowsPlatform } from "../lib/utils"; | ||
| 3 | 2 | ||
| 4 | export type DesktopUpdateButtonAction = "download" | "install" | "none"; | 3 | export type DesktopUpdateButtonAction = "download" | "install" | "none"; |
| 5 | 4 | ||
| ... | @@ -97,13 +96,9 @@ export function getDesktopUpdateButtonTooltip(state: DesktopUpdateState): string | ... | @@ -97,13 +96,9 @@ export function getDesktopUpdateButtonTooltip(state: DesktopUpdateState): string |
| 97 | 96 | ||
| 98 | export function getDesktopUpdateInstallConfirmationMessage( | 97 | export 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 | } |
| 108 | 103 | ||
| 109 | export function getDesktopUpdateActionError(result: DesktopUpdateActionResult): string | null { | 104 | export 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); |