Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions apps/web/src/components/desktopUpdate.logic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ describe("desktop update button state", () => {
);
});

it("never calls a build on the other track up to date", () => {
// A Stable build whose switch to Nightly did not finish; the updater discards every release.
const state: DesktopUpdateState = {
...baseState,
status: "up-to-date",
channel: "nightly",
currentVersion: "0.1.5",
checkedAt: "2026-11-18T00:00:00.000Z",
};
expect(getDesktopUpdateButtonTooltip(state)).not.toBe("Up to date");
expect(
getDesktopUpdateButtonTooltip({ ...state, currentVersion: "0.1.6-nightly.20261118.1" }),
).toBe("Up to date");
});

it("prefers a newly available release over a stale downloaded version", () => {
const state: DesktopUpdateState = {
...baseState,
Expand Down
15 changes: 15 additions & 0 deletions apps/web/src/components/desktopUpdate.logic.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { DesktopUpdateActionResult, DesktopUpdateState } from "@t3tools/contracts";
import { desktopUpdateChannelOf } from "@t3tools/shared/cliRelease";
import { msg } from "gt-react";

import { m, type MessageResolver } from "../i18n/messages";
import { channelSwitchLabel } from "./sidebar/updateEverything.logic";

export type DesktopUpdateButtonAction = "download" | "install" | "none";

Expand Down Expand Up @@ -159,6 +161,19 @@ export function getDesktopUpdateButtonTooltip(
}
return state.message ?? resolve(msg("Update failed"));
}
// The updater discards every release of the other track, so "up to date" would be false here.
const buildChannel = desktopUpdateChannelOf(state.currentVersion);
if (state.status === "up-to-date" && buildChannel !== state.channel) {
return resolve(
msg(
"This {build} build ignores {track} releases. Review the update track in Settings to finish the switch.",
{
build: channelSwitchLabel(buildChannel, resolve),
track: channelSwitchLabel(state.channel, resolve),
},
),
);
}
return resolve(msg("Up to date"));
}

Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -2607,6 +2607,7 @@
"d62631cab06d2b80": "Update {version} heruntergeladen. Klicke zum Neustarten und Installieren.",
"52e1d4a487c0cf4b": "Installation von {version} fehlgeschlagen. Klicke, um es erneut zu versuchen.",
"78a04e0e625c0990": "Update fehlgeschlagen",
"c24de5eb69373a55": "Dieser {build}-Build ignoriert {track}-Releases. Prüfe den Update-Kanal in den Einstellungen, um den Wechsel abzuschließen.",
"b02ae45a6109c93b": "Auf dem neuesten Stand",
"edcda9e8ee4ccad8": "Update {version} installieren und T3 Code neu starten?\n\nLaufende Aufgaben werden unterbrochen. Stelle sicher, dass du bereit bist, bevor du fortfährst.",
"02eba0f7cc90f759": "Update installieren und T3 Code neu starten?\n\nLaufende Aufgaben werden unterbrochen. Stelle sicher, dass du bereit bist, bevor du fortfährst.",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2606,6 +2606,7 @@
"d62631cab06d2b80": "Update {version} downloaded. Click to restart and install.",
"52e1d4a487c0cf4b": "Install failed for {version}. Click to retry.",
"78a04e0e625c0990": "Update failed",
"c24de5eb69373a55": "This {build} build ignores {track} releases. Review the update track in Settings to finish the switch.",
"b02ae45a6109c93b": "Up to date",
"edcda9e8ee4ccad8": "Install update {version} and restart T3 Code?\n\nAny running tasks will be interrupted. Make sure you're ready before continuing.",
"02eba0f7cc90f759": "Install update and restart T3 Code?\n\nAny running tasks will be interrupted. Make sure you're ready before continuing.",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2606,6 +2606,7 @@
"d62631cab06d2b80": "Actualización {version} descargada. Haz clic para reiniciar e instalar.",
"52e1d4a487c0cf4b": "Falló la instalación de {version}. Haz clic para reintentarlo.",
"78a04e0e625c0990": "Falló la actualización",
"c24de5eb69373a55": "Esta compilación {build} ignora las versiones {track}. Revisa el canal de actualizaciones en Ajustes para terminar el cambio.",
"b02ae45a6109c93b": "Actualizado",
"edcda9e8ee4ccad8": "¿Instalar la actualización {version} y reiniciar T3 Code?\n\nSe interrumpirán las tareas en curso. Asegúrate de estar listo antes de continuar.",
"02eba0f7cc90f759": "¿Instalar la actualización y reiniciar T3 Code?\n\nSe interrumpirán las tareas en curso. Asegúrate de estar listo antes de continuar.",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2606,6 +2606,7 @@
"d62631cab06d2b80": "Mise à jour {version} téléchargée. Cliquez pour redémarrer et l’installer.",
"52e1d4a487c0cf4b": "Échec de l’installation de {version}. Cliquez pour réessayer.",
"78a04e0e625c0990": "Échec de la mise à jour",
"c24de5eb69373a55": "Cette version {build} ignore les versions {track}. Vérifiez le canal de mise à jour dans les Réglages pour terminer le changement.",
"b02ae45a6109c93b": "À jour",
"edcda9e8ee4ccad8": "Installer la mise à jour {version} et redémarrer T3 Code ?\n\nToutes les tâches en cours seront interrompues. Assurez-vous d’être prêt avant de continuer.",
"02eba0f7cc90f759": "Installer la mise à jour et redémarrer T3 Code ?\n\nToutes les tâches en cours seront interrompues. Assurez-vous d’être prêt avant de continuer.",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -2604,6 +2604,7 @@
"d62631cab06d2b80": "更新 {version} をダウンロードしました。クリックすると再起動してインストールします。",
"52e1d4a487c0cf4b": "{version} のインストールに失敗しました。クリックして再試行してください。",
"78a04e0e625c0990": "更新に失敗しました",
"c24de5eb69373a55": "この {build} ビルドは {track} のリリースを無視します。切り替えを完了するには、設定で更新トラックを確認してください。",
"b02ae45a6109c93b": "最新の状態です",
"edcda9e8ee4ccad8": "更新 {version} をインストールして T3 Code を再起動しますか?\n\n実行中のタスクはすべて中断されます。準備ができていることを確認してから続行してください。",
"02eba0f7cc90f759": "更新をインストールして T3 Code を再起動しますか?\n\n実行中のタスクはすべて中断されます。準備ができていることを確認してから続行してください。",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -2605,6 +2605,7 @@
"d62631cab06d2b80": "업데이트 {version}이(가) 다운로드되었습니다. 클릭하여 다시 시작하고 설치하세요.",
"52e1d4a487c0cf4b": "{version} 설치에 실패했습니다. 클릭하여 다시 시도하세요.",
"78a04e0e625c0990": "업데이트 실패",
"c24de5eb69373a55": "이 {build} 빌드는 {track} 릴리스를 무시합니다. 전환을 완료하려면 설정에서 업데이트 트랙을 확인하세요.",
"b02ae45a6109c93b": "최신 상태",
"edcda9e8ee4ccad8": "업데이트 {version}을(를) 설치하고 T3 Code를 다시 시작할까요?\n\n실행 중인 작업은 모두 중단됩니다. 계속하기 전에 준비가 되었는지 확인하세요.",
"02eba0f7cc90f759": "업데이트를 설치하고 T3 Code를 다시 시작할까요?\n\n실행 중인 작업은 모두 중단됩니다. 계속하기 전에 준비가 되었는지 확인하세요.",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -2606,6 +2606,7 @@
"d62631cab06d2b80": "Atualização {version} baixada. Clique para reiniciar e instalar.",
"52e1d4a487c0cf4b": "Falha ao instalar {version}. Clique para tentar novamente.",
"78a04e0e625c0990": "Falha na atualização",
"c24de5eb69373a55": "Esta build {build} ignora as versões {track}. Revise o canal de atualização em Configurações para concluir a troca.",
"b02ae45a6109c93b": "Atualizado",
"edcda9e8ee4ccad8": "Instalar a atualização {version} e reiniciar o T3 Code?\n\nAs tarefas em execução serão interrompidas. Verifique se está tudo pronto antes de continuar.",
"02eba0f7cc90f759": "Instalar a atualização e reiniciar o T3 Code?\n\nAs tarefas em execução serão interrompidas. Verifique se está tudo pronto antes de continuar.",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -2606,6 +2606,7 @@
"d62631cab06d2b80": "Обновление {version} скачано. Нажмите, чтобы перезапустить и установить.",
"52e1d4a487c0cf4b": "Не удалось установить {version}. Нажмите, чтобы повторить.",
"78a04e0e625c0990": "Ошибка обновления",
"c24de5eb69373a55": "Эта сборка {build} игнорирует выпуски {track}. Проверьте канал обновлений в настройках, чтобы завершить переключение.",
"b02ae45a6109c93b": "Последняя версия",
"edcda9e8ee4ccad8": "Установить обновление {version} и перезапустить T3 Code?\n\nВсе выполняющиеся задачи будут прерваны. Убедитесь, что вы готовы.",
"02eba0f7cc90f759": "Установить обновление и перезапустить T3 Code?\n\nВсе выполняющиеся задачи будут прерваны. Убедитесь, что вы готовы.",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -2606,6 +2606,7 @@
"d62631cab06d2b80": "Uppdateringen {version} har laddats ned. Klicka för att starta om och installera.",
"52e1d4a487c0cf4b": "Installationen av {version} misslyckades. Klicka för att försöka igen.",
"78a04e0e625c0990": "Uppdateringen misslyckades",
"c24de5eb69373a55": "Den här {build}-versionen ignorerar {track}-versioner. Granska uppdateringsspåret i Inställningar för att slutföra bytet.",
"b02ae45a6109c93b": "Uppdaterad",
"edcda9e8ee4ccad8": "Installera uppdateringen {version} och starta om T3 Code?\n\nPågående uppgifter avbryts. Se till att du är redo innan du fortsätter.",
"02eba0f7cc90f759": "Installera uppdateringen och starta om T3 Code?\n\nPågående uppgifter avbryts. Se till att du är redo innan du fortsätter.",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -2610,6 +2610,7 @@
"d62631cab06d2b80": "更新 {version} 已下载。点击重启并安装。",
"52e1d4a487c0cf4b": "安装 {version} 失败。点击重试。",
"78a04e0e625c0990": "更新失败",
"c24de5eb69373a55": "此 {build} 版本会忽略 {track} 版本。请在设置中检查更新通道以完成切换。",
"b02ae45a6109c93b": "已是最新版本",
"edcda9e8ee4ccad8": "安装更新 {version} 并重启 T3 Code?\n\n正在运行的任务会被中断。请确认已准备好再继续。",
"02eba0f7cc90f759": "安装更新并重启 T3 Code?\n\n正在运行的任务会被中断。请确认已准备好再继续。",
Expand Down
Loading