@devries-cameron20 / t3code-1 / commits / ca0ca71045
Fork 0

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

fix(desktop): Stable switch no longer tells policy-blocked nightly apps to reinstall by hand (#32609)

Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Julius Marminge <julius0216@outlook.com>

Victor committed Nov 15, 2026 at 01:30 UTC ca0ca71045725c01fe65609ea250219a52fa4bba
2 files changed +6 -1
apps/desktop/src/updates/DesktopUpdates.test.ts
+5 -1
@@ -1,7 +1,7 @@
1 import * as NodeModule from "node:module";
2
3 import { assert, describe, it } from "@effect/vitest";
4 -import { DESKTOP_UPDATE_RESTART_MARKER_FILE } from "@t3tools/contracts";
4 +import { DESKTOP_UPDATE_RESTART_MARKER_FILE, DesktopUpdateStateSchema } from "@t3tools/contracts";
5 import { computeReleaseNotes } from "electron-updater/out/providers/GitHubProvider.js";
6 import * as Cause from "effect/Cause";
7 import * as Deferred from "effect/Deferred";
@@ -13,6 +13,7 @@ import * as Logger from "effect/Logger";
13 import * as Option from "effect/Option";
14 import * as References from "effect/References";
15 import * as Ref from "effect/Ref";
16 +import * as Schema from "effect/Schema";
17 import * as Stream from "effect/Stream";
18 import * as TestClock from "effect/testing/TestClock";
19
@@ -25,6 +26,8 @@ import * as DesktopUpdatePolicy from "./DesktopUpdatePolicy.ts";
26 import * as DesktopUpdates from "./DesktopUpdates.ts";
27 import { flushCallbacks, makeHarness } from "./updatesTestHarness.ts";
28
29 +const encodeUpdateState = Schema.encodeEffect(DesktopUpdateStateSchema);
30 +
31 type ReleaseFeed = Parameters<typeof computeReleaseNotes>[2];
32 type RunningVersion = Parameters<typeof computeReleaseNotes>[0];
33
@@ -1280,6 +1283,7 @@ describe("DesktopUpdates under a managed policy", () => {
1283 assert.equal(held.status, "disabled");
1284 assert.include(held.message ?? "", message);
1285 assert.isTrue(held.channelBlockedByPolicy);
1286 + assert.isTrue((yield* encodeUpdateState(held)).channelBlockedByPolicy);
1287 assert.isFalse((yield* updates.check("menu")).checked);
1288 assert.equal(harness.checkCount(), 0);
1289
packages/contracts/src/ipc.ts
+1
@@ -335,6 +335,7 @@ export const DesktopUpdateStateSchema = Schema.Struct({
335 errorContext: Schema.NullOr(Schema.Literals(["check", "download", "install"])),
336 canRetry: Schema.Boolean,
337 notAppliedVersion: Schema.optionalKey(Schema.String),
338 + channelBlockedByPolicy: Schema.optionalKey(Schema.Literal(true)),
339 });
340
341 export const DesktopCliCommandStateSchema = Schema.Struct({