@devries-cameron20 / t3code Mirror · read-only / commits / 48a383ca6f
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 12:15 UTC

fix(web): show failed desktop downloads in retry tooltips (#31324)

Co-authored-by: johan vaz <johanvaz@Nathalines-MacBook-Pro.local> Co-authored-by: Julius Marminge <julius0216@outlook.com>

Johan Vaz committed Nov 15, 2026 at 10:01 UTC 48a383ca6fea84bf31b71433886b783364857eb3
2 files changed +23 -3
apps/web/src/components/desktopUpdate.logic.test.ts
+16
@@ -42,6 +42,22 @@ describe("desktop update button state", () => {
42 expect(getDesktopUpdateButtonTooltip(state)).toContain("Click to retry");
43 });
44
45 + it("shows the download failure after returning to available", () => {
46 + const state: DesktopUpdateState = {
47 + ...baseState,
48 + status: "available",
49 + availableVersion: "1.1.0",
50 + message: "network timeout",
51 + errorContext: "download",
52 + canRetry: true,
53 + };
54 + expect(resolveDesktopUpdateButtonAction(state)).toBe("download");
55 + expect(getDesktopUpdateButtonTooltip(state)).toBe("Download failed for 1.1.0. Click to retry.");
56 + expect(getDesktopUpdateButtonTooltip({ ...state, notAppliedVersion: "1.1.0" })).toBe(
57 + "Update 1.1.0 did not apply. Click to retry.",
58 + );
59 + });
60 +
61 it("prefers a newly available release over a stale downloaded version", () => {
62 const state: DesktopUpdateState = {
63 ...baseState,
apps/web/src/components/desktopUpdate.logic.ts
+7 -3
@@ -94,6 +94,13 @@ export function getDesktopUpdateButtonTooltip(state: DesktopUpdateState): string
94 ) {
95 return `Update ${state.notAppliedVersion} did not apply. Click to retry.`;
96 }
97 + if (
98 + (state.status === "available" || state.status === "error") &&
99 + state.errorContext === "download" &&
100 + state.availableVersion
101 + ) {
102 + return `Download failed for ${state.availableVersion}. Click to retry.`;
103 + }
104 if (state.status === "available") {
105 return `Update ${state.availableVersion ?? "available"} ready to download`;
106 }
@@ -106,9 +113,6 @@ export function getDesktopUpdateButtonTooltip(state: DesktopUpdateState): string
113 return `Update ${state.downloadedVersion ?? state.availableVersion ?? "ready"} downloaded. Click to restart and install.`;
114 }
115 if (state.status === "error") {
109 - if (state.errorContext === "download" && state.availableVersion) {
110 - return `Download failed for ${state.availableVersion}. Click to retry.`;
111 - }
116 if (state.errorContext === "install" && state.downloadedVersion) {
117 return `Install failed for ${state.downloadedVersion}. Click to retry.`;
118 }