diff --git a/apps/web/src/components/sidebar/updateEverything.logic.test.ts b/apps/web/src/components/sidebar/updateEverything.logic.test.ts index f4b1d0053b22b..ea44f1592a956 100644 --- a/apps/web/src/components/sidebar/updateEverything.logic.test.ts +++ b/apps/web/src/components/sidebar/updateEverything.logic.test.ts @@ -45,6 +45,20 @@ function machine( }; } +// A desktop-mode server the desktop app cannot control, such as a WSL backend or an older app. +function withoutDesktopControl(base: UpdateEverythingMachine): UpdateEverythingMachine { + return { + ...base, + serverConfig: { + ...base.serverConfig!, + environment: { + ...base.serverConfig!.environment, + capabilities: { repositoryIdentity: true, serverSelfUpdate: "desktop-managed" }, + }, + }, + }; +} + describe("collectServerUpdateTargets", () => { it("updates remote servers that can move to the target and names every skipped one", () => { const { targets, skipped } = collectServerUpdateTargets( @@ -67,6 +81,7 @@ describe("collectServerUpdateTargets", () => { machine("current", "0.0.50", "boot-service"), machine("current-offline", "0.0.50", "boot-service", { connected: false }), machine("manual", "0.0.40", undefined), + withoutDesktopControl(machine("wsl-backend", "0.0.40", "desktop-managed")), ], "0.0.50", ); @@ -82,6 +97,7 @@ describe("collectServerUpdateTargets", () => { ["no-scope", "no permission"], ["busy", "already updating"], ["manual", "needs a manual update"], + ["wsl-backend", "update T3 Code on that machine"], ]); }); @@ -230,15 +246,9 @@ describe("collectChannelSwitchTargets", () => { host(machine("service", "0.1.2", "boot-service"), 70), // A Stable tag built a migration the latest Nightly does not have yet. host(machine("ahead", "0.1.3", "boot-service"), 73), - machine("old-desktop", "0.1.2", "desktop-managed", { - serverConfig: { - ...machine("old-desktop", "0.1.2", "desktop-managed").serverConfig!, - environment: { - ...machine("old-desktop", "0.1.2", "desktop-managed").serverConfig!.environment, - capabilities: { repositoryIdentity: true, serverSelfUpdate: "desktop-managed" }, - }, - }, - }), + withoutDesktopControl(machine("old-desktop", "0.1.2", "desktop-managed")), + // Already on Nightly, so it needs an update rather than a channel switch. + withoutDesktopControl(machine("behind-desktop", OLD_NIGHTLY, "desktop-managed")), machine("current", NIGHTLY, "boot-service"), // The server refuses a track its policy rules out, so the dialog skips it up front. managedHost(host(machine("no-nightly", "0.1.2", "boot-service"), 70)), @@ -254,7 +264,8 @@ describe("collectChannelSwitchTargets", () => { "ahead", `its database has changes ${NIGHTLY} does not support yet; stay on Stable until Nightly has them`, ], - ["old-desktop", "needs a newer desktop app"], + ["old-desktop", "change the update track on that machine"], + ["behind-desktop", "update T3 Code on that machine"], [ "no-nightly", "Example Corp manages T3 Code updates. Only stable releases can be installed.", diff --git a/apps/web/src/components/sidebar/updateEverything.logic.ts b/apps/web/src/components/sidebar/updateEverything.logic.ts index 6930549adf19b..f9bf0976a22e4 100644 --- a/apps/web/src/components/sidebar/updateEverything.logic.ts +++ b/apps/web/src/components/sidebar/updateEverything.logic.ts @@ -70,6 +70,10 @@ export interface SkippedMachine { readonly reason: string; } +// Desktop servers without the desktop control fd (older apps, WSL backends: wsl.exe cannot pass +// fds) cannot be updated from here, and their desktop app is not necessarily the stale part. +const UPDATE_ON_THAT_MACHINE = msg("update T3 Code on that machine"); + /** Skip current and app-hosted servers; the latter update with the app and would relaunch mid-run. * Desktop-managed servers use their own feed. Each server's updater checks that it can install the * release before it restarts, so no registry precheck runs here. */ @@ -115,7 +119,7 @@ export function collectServerUpdateTargets( continue; } if (selfUpdate === "desktop-managed" && !desktopAppUpdate) { - skip(resolve(msg("needs a newer desktop app"))); + skip(resolve(UPDATE_ON_THAT_MACHINE)); continue; } const serverChannel = cliReleaseChannelOf(config.environment.serverVersion); @@ -425,7 +429,11 @@ function trackSwitchMove( if (selfUpdate === null) return { skip: resolve(msg("needs a manual update")) }; if (selfUpdate !== "desktop-managed") return { selfUpdate }; if (config.environment.capabilities.desktopAppChannelSwitch !== true) { - return { skip: resolve(msg("needs a newer desktop app")) }; + return { + skip: resolve( + sameTrack ? UPDATE_ON_THAT_MACHINE : msg("change the update track on that machine"), + ), + }; } // Squirrel.Mac renames the bundle for the new track and then cannot relaunch it. if (!sameTrack && config.environment.platform.os === "darwin") { diff --git a/apps/web/src/i18n/translations/de.json b/apps/web/src/i18n/translations/de.json index 36f57764ea37a..f4dad5ee724fa 100644 --- a/apps/web/src/i18n/translations/de.json +++ b/apps/web/src/i18n/translations/de.json @@ -12145,7 +12145,8 @@ "f938bb483eb3d189": "startet zuletzt neu", "9bca02be2b4d612a": "nicht verbunden", "2dcc418b6a13b83c": "erfordert manuelles Update", - "5c8ebc36f84dee7a": "erfordert eine neuere Desktop-App", + "f13e08bd3614112e": "T3 Code auf diesem Rechner aktualisieren", + "3c3348c36a2695af": "Update-Kanal auf diesem Rechner ändern", "fa8faa732a2688ef": "im Kanal {channel}", "9b961309baafa09d": "keine Berechtigung", "9bafb2622c22d145": "wird bereits aktualisiert", diff --git a/apps/web/src/i18n/translations/en.json b/apps/web/src/i18n/translations/en.json index 22791e2badd65..4258c84baab17 100644 --- a/apps/web/src/i18n/translations/en.json +++ b/apps/web/src/i18n/translations/en.json @@ -12153,7 +12153,8 @@ "f938bb483eb3d189": "restarts last", "9bca02be2b4d612a": "not connected", "2dcc418b6a13b83c": "needs a manual update", - "5c8ebc36f84dee7a": "needs a newer desktop app", + "f13e08bd3614112e": "update T3 Code on that machine", + "3c3348c36a2695af": "change the update track on that machine", "fa8faa732a2688ef": "on the {channel} channel", "9b961309baafa09d": "no permission", "9bafb2622c22d145": "already updating", diff --git a/apps/web/src/i18n/translations/es.json b/apps/web/src/i18n/translations/es.json index 2c68ad496ac5f..d744ed21ea34a 100644 --- a/apps/web/src/i18n/translations/es.json +++ b/apps/web/src/i18n/translations/es.json @@ -12138,7 +12138,8 @@ "f938bb483eb3d189": "se reinicia el último", "9bca02be2b4d612a": "sin conexión", "2dcc418b6a13b83c": "requiere una actualización manual", - "5c8ebc36f84dee7a": "requiere una app de escritorio más reciente", + "f13e08bd3614112e": "actualiza T3 Code en ese equipo", + "3c3348c36a2695af": "cambia el canal de actualizaciones en ese equipo", "fa8faa732a2688ef": "en el canal {channel}", "9b961309baafa09d": "sin permiso", "9bafb2622c22d145": "ya se está actualizando", diff --git a/apps/web/src/i18n/translations/fr.json b/apps/web/src/i18n/translations/fr.json index cb4db84726d56..2a7ed2b642ebb 100644 --- a/apps/web/src/i18n/translations/fr.json +++ b/apps/web/src/i18n/translations/fr.json @@ -12143,7 +12143,8 @@ "f938bb483eb3d189": "redémarre en dernier", "9bca02be2b4d612a": "non connecté", "2dcc418b6a13b83c": "nécessite une mise à jour manuelle", - "5c8ebc36f84dee7a": "nécessite une version plus récente de l’app de bureau", + "f13e08bd3614112e": "mettez à jour T3 Code sur cette machine", + "3c3348c36a2695af": "changez le canal de mise à jour sur cette machine", "fa8faa732a2688ef": "sur le canal {channel}", "9b961309baafa09d": "pas d’autorisation", "9bafb2622c22d145": "déjà en cours de mise à jour", diff --git a/apps/web/src/i18n/translations/ja.json b/apps/web/src/i18n/translations/ja.json index 01c10337742d3..65d375d5dfe6a 100644 --- a/apps/web/src/i18n/translations/ja.json +++ b/apps/web/src/i18n/translations/ja.json @@ -12094,7 +12094,8 @@ "f938bb483eb3d189": "最後に再起動", "9bca02be2b4d612a": "未接続", "2dcc418b6a13b83c": "手動での更新が必要", - "5c8ebc36f84dee7a": "新しいデスクトップアプリが必要", + "f13e08bd3614112e": "そのマシンで T3 Code を更新してください", + "3c3348c36a2695af": "そのマシンで更新トラックを変更してください", "fa8faa732a2688ef": "{channel} チャネル", "9b961309baafa09d": "権限なし", "9bafb2622c22d145": "すでに更新中", diff --git a/apps/web/src/i18n/translations/ko.json b/apps/web/src/i18n/translations/ko.json index eb4cf8b1c5273..009726c6235d1 100644 --- a/apps/web/src/i18n/translations/ko.json +++ b/apps/web/src/i18n/translations/ko.json @@ -12090,7 +12090,8 @@ "f938bb483eb3d189": "마지막에 다시 시작", "9bca02be2b4d612a": "연결되지 않음", "2dcc418b6a13b83c": "수동 업데이트 필요", - "5c8ebc36f84dee7a": "최신 데스크톱 앱 필요", + "f13e08bd3614112e": "해당 기기에서 T3 Code를 업데이트하세요", + "3c3348c36a2695af": "해당 기기에서 업데이트 트랙을 변경하세요", "fa8faa732a2688ef": "{channel} 채널", "9b961309baafa09d": "권한 없음", "9bafb2622c22d145": "이미 업데이트 중", diff --git a/apps/web/src/i18n/translations/pt-BR.json b/apps/web/src/i18n/translations/pt-BR.json index 06eea3c29b995..cc7169a5bbfa1 100644 --- a/apps/web/src/i18n/translations/pt-BR.json +++ b/apps/web/src/i18n/translations/pt-BR.json @@ -12143,7 +12143,8 @@ "f938bb483eb3d189": "reinicia por último", "9bca02be2b4d612a": "não conectado", "2dcc418b6a13b83c": "precisa de atualização manual", - "5c8ebc36f84dee7a": "precisa de um app desktop mais novo", + "f13e08bd3614112e": "atualize o T3 Code nessa máquina", + "3c3348c36a2695af": "mude o canal de atualização nessa máquina", "fa8faa732a2688ef": "no canal {channel}", "9b961309baafa09d": "sem permissão", "9bafb2622c22d145": "já está atualizando", diff --git a/apps/web/src/i18n/translations/ru.json b/apps/web/src/i18n/translations/ru.json index 44148970bd468..21f82b275b00e 100644 --- a/apps/web/src/i18n/translations/ru.json +++ b/apps/web/src/i18n/translations/ru.json @@ -12144,7 +12144,8 @@ "f938bb483eb3d189": "перезапуск последним", "9bca02be2b4d612a": "не подключено", "2dcc418b6a13b83c": "нужно обновить вручную", - "5c8ebc36f84dee7a": "нужна более новая версия десктопного приложения", + "f13e08bd3614112e": "обновите T3 Code на этом компьютере", + "3c3348c36a2695af": "смените канал обновлений на этом компьютере", "fa8faa732a2688ef": "на канале {channel}", "9b961309baafa09d": "нет прав", "9bafb2622c22d145": "уже обновляется", diff --git a/apps/web/src/i18n/translations/sv.json b/apps/web/src/i18n/translations/sv.json index 2bb20d01df420..c0829ddf8b6ed 100644 --- a/apps/web/src/i18n/translations/sv.json +++ b/apps/web/src/i18n/translations/sv.json @@ -12151,7 +12151,8 @@ "f938bb483eb3d189": "startar om sist", "9bca02be2b4d612a": "inte ansluten", "2dcc418b6a13b83c": "behöver uppdateras manuellt", - "5c8ebc36f84dee7a": "behöver en nyare skrivbordsapp", + "f13e08bd3614112e": "uppdatera T3 Code på den datorn", + "3c3348c36a2695af": "byt uppdateringsspår på den datorn", "fa8faa732a2688ef": "på kanalen {channel}", "9b961309baafa09d": "ingen behörighet", "9bafb2622c22d145": "uppdateras redan", diff --git a/apps/web/src/i18n/translations/zh.json b/apps/web/src/i18n/translations/zh.json index 0def42b8dda67..89ce3e0a2f383 100644 --- a/apps/web/src/i18n/translations/zh.json +++ b/apps/web/src/i18n/translations/zh.json @@ -12169,7 +12169,8 @@ "f938bb483eb3d189": "最后重启", "9bca02be2b4d612a": "未连接", "2dcc418b6a13b83c": "需要手动更新", - "5c8ebc36f84dee7a": "需要更高版本的桌面应用", + "f13e08bd3614112e": "请在该机器上更新 T3 Code", + "3c3348c36a2695af": "请在该机器上更改更新通道", "fa8faa732a2688ef": "使用 {channel} 通道", "9b961309baafa09d": "没有权限", "9bafb2622c22d145": "正在更新",