Improve Linux desktop identity packaged builds#1201
Improve Linux desktop identity packaged builds#1201Chrono-byte wants to merge 3 commits intopingdotgg:mainfrom
Conversation
- Set Linux WM class and desktop entry naming consistently - Generate a dev desktop launcher for Electron on Linux - Align desktop artifact packaging with the new app name
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can enforce grammar and style rules using `languagetool`.Configure the |
There was a problem hiding this comment.
Pull request overview
This PR improves Linux desktop integration for the Electron desktop app by making the packaged app’s Linux identity (executable name, WM class, and desktop entry metadata) consistent, so GNOME/AppImage can correctly associate the running window with the installed desktop entry and icon.
Changes:
- Align Linux packaging metadata by setting a consistent
executableNameandStartupWMClass, and adjust the staged package name used for builds. - Set Linux WM class at runtime (
--class=...) and set the desktop entry name from the Electron main process. - Ensure the dev Electron launcher passes a Linux
--classargument for consistent dev window identity.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/build-desktop-artifact.ts | Aligns Linux electron-builder metadata (executable + WM class) and updates staged packaging identity used to build artifacts. |
| apps/desktop/src/main.ts | Sets Linux WM class at runtime and configures the app’s desktop entry name for better shell association. |
| apps/desktop/scripts/dev-electron.mjs | Passes a Linux --class arg when launching Electron in dev to keep window identity consistent. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
This PR aligns the Linux desktop identity for the packaged Electron app so Linux shells (e.g., GNOME/AppImage integration) correctly associate the running window with the installed desktop entry (name/icon), by making the executable name, WM_CLASS, and desktop entry metadata consistent.
Changes:
- Set Linux
executableNameand desktop entryStartupWMClasstot3codein the electron-builder config. - Rename the staged
package.jsonnameused for packaging fromt3-code-desktoptot3code. - Set Linux runtime WM class (
--class) and desktop entry name (setDesktopName) based on dev vs packaged mode.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/build-desktop-artifact.ts | Aligns electron-builder Linux packaging identity (executableName, StartupWMClass) and staged package name with t3code. |
| apps/desktop/src/main.ts | Ensures the Linux runtime window class and desktop entry name match the packaged desktop metadata. |
| apps/desktop/scripts/dev-electron.mjs | Passes a Linux --class argument during dev launches to influence WM_CLASS. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
What Changed
Linux desktop environments were not matching the running Electron app to its packaged desktop entry. The AppImage launched, but the shell surfaced it as t3-code-desktop with the generic icon instead of the proper icon.
This happened because the Linux app identity was inconsistent across packaging and runtime. The staged package name, executable name, desktop entry name, and Chromium/Electron window class were not aligned closely enough for GNOME/AppImage integration to associate the live window with the installed desktop metadata.
This change makes the Linux identity consistent so installed AppImage builds resolve to the correct app name and icon in the shell.
Why
Before:

After:

Checklist
Note
Set Linux WM class and desktop entry name for packaged desktop builds
--classChromium switch tot3code(ort3code-devin dev) on Linux startup in main.ts, and callsapp.setDesktopNamewith the matching.desktopfilename when supported.executableName: 't3code', addStartupWMClass: 't3code'to the.desktopentry, and rename the staged package fromt3-code-desktoptot3code.t3-code-desktoptot3code, which affects install paths and desktop integration on existing installs.Macroscope summarized 97bf6ce.