The best way to control Claude Code, Codex and more from any computer or phone
refactor(desktop): remove test-only Electron error predicates (#9982)
Julius Marminge committed
Sep 5, 2026 at 00:12 UTC
a9caf7b7089afb6f1b3b888ea404b75b8f9e88e1
8 files changed
-12
apps/desktop/src/electron/ElectronDialog.test.ts
-1
@@ -43,7 +43,6 @@ describe("ElectronDialog", () => {
43
);
44
45
assert.instanceOf(error, ElectronDialog.ElectronDialogPickFolderError);
46
- assert.isTrue(ElectronDialog.isElectronDialogError(error));
46
assert.strictEqual(error.ownerWindowId, 7);
47
assert.strictEqual(error.defaultPath, "/workspace");
48
assert.strictEqual(error.cause, cause);
apps/desktop/src/electron/ElectronDialog.ts
-1
@@ -73,7 +73,6 @@ export const ElectronDialogError = Schema.Union([
73
ElectronDialogShowErrorBoxError,
74
]);
75
export type ElectronDialogError = typeof ElectronDialogError.Type;
76
-export const isElectronDialogError = Schema.is(ElectronDialogError);
76
77
export interface ElectronDialogPickFolderInput {
78
readonly owner: Option.Option<Electron.BrowserWindow>;
apps/desktop/src/electron/ElectronTheme.test.ts
-1
@@ -64,7 +64,6 @@ describe("ElectronTheme", () => {
64
const error = yield* Effect.flip(electronTheme.setSource("dark"));
65
66
assert.instanceOf(error, ElectronTheme.ElectronThemeSetSourceError);
67
- assert.isTrue(ElectronTheme.isElectronThemeSetSourceError(error));
67
assert.strictEqual(error.source, "dark");
68
assert.strictEqual(error.cause, cause);
69
assert.include(error.message, "dark");
apps/desktop/src/electron/ElectronTheme.ts
-2
@@ -19,8 +19,6 @@ export class ElectronThemeSetSourceError extends Schema.TaggedErrorClass<Electro
19
}
20
}
21
22
-export const isElectronThemeSetSourceError = Schema.is(ElectronThemeSetSourceError);
23
-
22
export class ElectronTheme extends Context.Service<
23
ElectronTheme,
24
{
apps/desktop/src/electron/ElectronUpdater.test.ts
-3
@@ -71,7 +71,6 @@ describe("ElectronUpdater", () => {
71
const error = yield* updater.checkForUpdates.pipe(Effect.flip);
72
73
assert.instanceOf(error, ElectronUpdater.ElectronUpdaterCheckForUpdatesError);
74
- assert.isTrue(ElectronUpdater.isElectronUpdaterError(error));
74
assert.equal(error.channel, "beta");
75
assert.strictEqual(error.cause, cause);
76
assert.equal(error.message, "Electron updater failed to check for updates on channel beta.");
@@ -89,7 +88,6 @@ describe("ElectronUpdater", () => {
88
const error = yield* updater.downloadUpdate.pipe(Effect.flip);
89
90
assert.instanceOf(error, ElectronUpdater.ElectronUpdaterDownloadUpdateError);
92
- assert.isTrue(ElectronUpdater.isElectronUpdaterError(error));
91
assert.equal(error.channel, "nightly");
92
assert.strictEqual(error.cause, cause);
93
assert.equal(
@@ -126,7 +124,6 @@ describe("ElectronUpdater", () => {
124
.pipe(Effect.flip);
125
126
assert.instanceOf(error, ElectronUpdater.ElectronUpdaterQuitAndInstallError);
129
- assert.isTrue(ElectronUpdater.isElectronUpdaterError(error));
127
assert.equal(error.channel, "alpha");
128
assert.equal(error.isSilent, true);
129
assert.equal(error.isForceRunAfter, false);
apps/desktop/src/electron/ElectronUpdater.ts
-1
@@ -54,7 +54,6 @@ export const ElectronUpdaterError = Schema.Union([
54
ElectronUpdaterQuitAndInstallError,
55
]);
56
export type ElectronUpdaterError = typeof ElectronUpdaterError.Type;
57
-export const isElectronUpdaterError = Schema.is(ElectronUpdaterError);
57
58
export class ElectronUpdater extends Context.Service<
59
ElectronUpdater,
apps/desktop/src/electron/ElectronWindow.test.ts
-1
@@ -79,7 +79,6 @@ describe("ElectronWindow", () => {
79
const error = yield* electronWindow.create(options).pipe(Effect.flip);
80
81
assert.instanceOf(error, ElectronWindow.ElectronWindowCreateError);
82
- assert.isTrue(ElectronWindow.isElectronWindowCreateError(error));
82
assert.deepEqual(error.options, {
83
title: "T3 Code",
84
width: 1100,
apps/desktop/src/electron/ElectronWindow.ts
-2
@@ -58,8 +58,6 @@ export class ElectronWindowCreateError extends Schema.TaggedErrorClass<ElectronW
58
}
59
}
60
61
-export const isElectronWindowCreateError = Schema.is(ElectronWindowCreateError);
62
-
61
export class ElectronWindowOperationError extends Schema.TaggedErrorClass<ElectronWindowOperationError>()(
62
"ElectronWindowOperationError",
63
{