Skip to content

Improve Linux desktop identity packaged builds#1201

Open
Chrono-byte wants to merge 3 commits intopingdotgg:mainfrom
Chrono-byte:main
Open

Improve Linux desktop identity packaged builds#1201
Chrono-byte wants to merge 3 commits intopingdotgg:mainfrom
Chrono-byte:main

Conversation

@Chrono-byte
Copy link

@Chrono-byte Chrono-byte commented Mar 18, 2026

  • Set Linux WM class and desktop entry naming consistently
  • Align desktop artifact packaging with the new app name

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:
image

After:
image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes

Note

Set Linux WM class and desktop entry name for packaged desktop builds

  • Sets the --class Chromium switch to t3code (or t3code-dev in dev) on Linux startup in main.ts, and calls app.setDesktopName with the matching .desktop filename when supported.
  • Updates build-desktop-artifact.ts to set executableName: 't3code', add StartupWMClass: 't3code' to the .desktop entry, and rename the staged package from t3-code-desktop to t3code.
  • Behavioral Change: the Linux executable name and package metadata name change from t3-code-desktop to t3code, which affects install paths and desktop integration on existing installs.

Macroscope summarized 97bf6ce.

- 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
Copilot AI review requested due to automatic review settings March 18, 2026 23:19
@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 74c27e39-3562-42c5-80de-b3a23a465648

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can enforce grammar and style rules using `languagetool`.

Configure the reviews.tools.languagetool setting to enable/disable rules and categories. Refer to the LanguageTool Community to learn more.

@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 18, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 executableName and StartupWMClass, 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 --class argument 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.

@github-actions github-actions bot added size:S 10-29 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Mar 18, 2026
@Chrono-byte Chrono-byte requested a review from Copilot March 18, 2026 23:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 executableName and desktop entry StartupWMClass to t3code in the electron-builder config.
  • Rename the staged package.json name used for packaging from t3-code-desktop to t3code.
  • 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants