Skip to content

set StartupWMClass for gnome dock grouping - #3133

Open
thedhruvhegde wants to merge 1 commit into
generalaction:mainfrom
thedhruvhegde:fix/linux-gnome-startup-wmclass
Open

set StartupWMClass for gnome dock grouping#3133
thedhruvhegde wants to merge 1 commit into
generalaction:mainfrom
thedhruvhegde:fix/linux-gnome-startup-wmclass

Conversation

@thedhruvhegde

@thedhruvhegde thedhruvhegde commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

closes #2881

on gnome wayland the running window was untracked because the desktop file did not declare StartupWMClass matching the electron product name.

set it to PRODUCT_NAME in both linux builder configs (stable and canary).

tested by: config-only

@greptile-apps

greptile-apps Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR attempts to improve GNOME dock grouping by adding StartupWMClass metadata to stable and canary Linux package configurations.

  • Applies the product-specific window class to both release channels.
  • Preserves distinct stable and canary identities.
  • Uses the wrong electron-builder nesting for desktop-entry fields, preventing the intended metadata from being emitted correctly.

Confidence Score: 4/5

The PR should not merge until StartupWMClass is nested under linux.desktop.entry, otherwise its intended GNOME grouping fix will not take effect.

Both packaging configurations place the new desktop-entry field outside electron-builder’s expected entry object, so the generated launcher will not reliably contain the metadata this PR is intended to add.

Files Needing Attention: apps/emdash-desktop/electron-builder.config.ts, apps/emdash-desktop/electron-builder.canary.config.ts

Important Files Changed

Filename Overview
apps/emdash-desktop/electron-builder.config.ts Adds stable StartupWMClass metadata at the wrong electron-builder configuration level.
apps/emdash-desktop/electron-builder.canary.config.ts Adds the same incorrectly nested desktop-entry metadata for canary packages.
Prompt To Fix All With AI
### Issue 1
apps/emdash-desktop/electron-builder.config.ts:66-68
**Desktop Entry Field Misnested**

`StartupWMClass` is placed directly under `linux.desktop`, but electron-builder 26 expects custom desktop-entry fields under `linux.desktop.entry`. As a result, the stable and canary Linux launchers will not emit this value as intended, so GNOME window grouping remains broken. Please nest the field under `desktop.entry` in both configurations.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "set linux desktop StartupWMClass so gnom..." | Re-trigger Greptile

Comment on lines +66 to +68
desktop: {
StartupWMClass: PRODUCT_NAME,
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Desktop Entry Field Misnested

StartupWMClass is placed directly under linux.desktop, but electron-builder 26 expects custom desktop-entry fields under linux.desktop.entry. As a result, the stable and canary Linux launchers will not emit this value as intended, so GNOME window grouping remains broken. Please nest the field under desktop.entry in both configurations.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/emdash-desktop/electron-builder.config.ts
Line: 66-68

Comment:
**Desktop Entry Field Misnested**

`StartupWMClass` is placed directly under `linux.desktop`, but electron-builder 26 expects custom desktop-entry fields under `linux.desktop.entry`. As a result, the stable and canary Linux launchers will not emit this value as intended, so GNOME window grouping remains broken. Please nest the field under `desktop.entry` in both configurations.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is narrowly scoped to electron-builder Linux desktop entry metadata and aligns with the reported GNOME Wayland grouping issue.

Pull request overview

Fixes GNOME Wayland dock grouping by ensuring the generated Linux .desktop entries include a StartupWMClass that matches the Electron product name, so GNOME can associate the running window with the installed launcher.

Changes:

  • Add linux.desktop.StartupWMClass = PRODUCT_NAME to the stable electron-builder config.
  • Add linux.desktop.StartupWMClass = PRODUCT_NAME to the canary electron-builder config.
File summaries
File Description
apps/emdash-desktop/electron-builder.config.ts Adds StartupWMClass to the Linux desktop entry for stable builds to enable GNOME Wayland grouping.
apps/emdash-desktop/electron-builder.canary.config.ts Adds the same StartupWMClass desktop entry field for canary builds to enable GNOME Wayland grouping.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: Incorrect or generic dock icon on GNOME Wayland

2 participants