The best way to control Claude Code, Codex and more from any computer or phone
fix(desktop): stop overwriting a custom dock icon on launch (#7125)
Rishet11 committed
Aug 18, 2026 at 23:13 UTC
3b5d476eb6af9d14efe037e9d163848d6fd048d7
2 files changed
+31
-2
apps/desktop/src/app/DesktopAppIdentity.test.ts
+27
-1
@@ -199,7 +199,9 @@ describe("DesktopAppIdentity", () => {
199
assert.equal(calls.setAboutPanelOptions[0]?.applicationName, "T3 Code (Alpha)");
200
assert.equal(calls.setAboutPanelOptions[0]?.applicationVersion, "1.2.3");
201
assert.equal(calls.setAboutPanelOptions[0]?.version, "0123456789ab");
202
- assert.deepEqual(calls.setDockIcon, ["/icon.png"]);
202
+ // Packaged: the bundle's own icon stands, so a custom one the user
203
+ // attached survives.
204
+ assert.deepEqual(calls.setDockIcon, []);
205
}),
206
{
207
calls,
@@ -212,4 +214,28 @@ describe("DesktopAppIdentity", () => {
214
},
215
);
216
});
217
+
218
+ it.effect("sets the dock icon only when running unpackaged", () => {
219
+ const calls: ElectronAppCalls = {
220
+ setAboutPanelOptions: [],
221
+ setDockIcon: [],
222
+ setName: [],
223
+ };
224
+
225
+ return withIdentity(
226
+ Effect.gen(function* () {
227
+ const identity = yield* DesktopAppIdentity.DesktopAppIdentity;
228
+ yield* identity.configure;
229
+
230
+ // Electron shows a generic icon for an unpackaged run, which is the
231
+ // reason this call exists at all.
232
+ assert.deepEqual(calls.setDockIcon, ["/icon.png"]);
233
+ }),
234
+ {
235
+ calls,
236
+ environment: { isPackaged: false },
237
+ pngIconPath: Option.some("/icon.png"),
238
+ },
239
+ );
240
+ });
241
});
apps/desktop/src/app/DesktopAppIdentity.ts
+4
-1
@@ -134,7 +134,10 @@ export const make = Effect.gen(function* () {
134
yield* electronApp.setDesktopName(environment.linuxDesktopEntryName);
135
}
136
137
- if (environment.platform === "darwin") {
137
+ // Unpackaged runs only. A packaged bundle already carries its icon in
138
+ // Info.plist, so setting the dock tile again changes nothing except to
139
+ // overwrite a custom icon the user attached to the app themselves.
140
+ if (environment.platform === "darwin" && !environment.isPackaged) {
141
const iconPaths = yield* assets.iconPaths;
142
yield* Option.match(iconPaths.png, {
143
onNone: () => Effect.void,