Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): Group Linux windows under the installed launcher #10895

Mergedmwolson(GitHub profile, opens in a new tab)merged 0 commits intomain fromrefs/pull/10895/headmerged by juliusmarminge View on GitHub

Linux windows can appear as a second dock entry because the installed launcher advertises StartupWMClass=t3code, while Electron uses com.t3tools.T3Code.

Set the matching class in the electron-builder launcher (AppImage and deb) and both AUR launchers. Electron 44.4.5 sets both WM_CLASS and the Wayland app ID from the desktop identity; the existing --class=t3code switch does not override this window identity. Theme-icon installation remains outside this PR.

Credit to @mwolson for the diagnosis, implementation, and original desktop evidence in #10895. Fixes #13975.

Verification on the rebuilt head:

  • Generated packaging configuration regression: old t3code value fails; corrected value passes. The existing packaging suite remains 79 tests, all passing.
  • Desktop pre-ready and early startup suites: 48 tests pass.
  • Scripts typecheck, targeted lint/formatting, AUR shell syntax, and diff checks pass.
  • Headless Linux only. Electron cannot launch on this VM: libcups.so.2, libcairo.so.2, libgtk-3.so.0, and libpango-1.0.so.0 are missing, and there is no display session. Packaged Electron dock grouping, X11/Wayland, AUR installation, macOS, Windows, iOS, and Android were not verified here. Fresh desktop evidence and maintainer review remain required before readiness.

Historical author evidence (Ubuntu 26.04 / GNOME 50.1 Wayland, before the maintainer rebuild; not a current-head smoke test): Before: duplicate dock entry; after: window grouped under the pinned launcher

Existing AppImageLauncher entries need re-integration to pick up changed metadata; stale pins are not migrated.

Maintainer takeover: Codex GPT-6.1-Sol; tests: Codex GPT-6-Astra; independent review: Claude Opus 5.5 and Codex GPT-6-Sol. Harness: T3 Code.

Fixes pingdotgg/t3code#32482

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟠 High gnome-extension/metadata.json:6

      The desktop client rejects the installed GNOME extension after this version is bumped to 3, so LinuxSnapShot.detect() falls back to the picker and active-window snapshots stop using the extension. LinuxSnapShot.detect() only accepts versions 1 and 2; keep this metadata version within that supported set or update the client’s accepted versions together.

        "version": 2,
      🤖 Copy this AI Prompt to have your agent fix this:
      In file @apps/desktop/gnome-extension/metadata.json around line 6:
      
      The desktop client rejects the installed GNOME extension after this version is bumped to `3`, so `LinuxSnapShot.detect()` falls back to the picker and active-window snapshots stop using the extension. `LinuxSnapShot.detect()` only accepts versions `1` and `2`; keep this metadata version within that supported set or update the client’s accepted versions together.
    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved at 35447d4

      Macroscope's review found this PR approvable — This narrowly scoped Linux packaging fix aligns the launcher’s StartupWMClass with Electron’s desktop identity so windows group under the installed launcher. It changes only generated/AUR desktop metadata and includes regression coverage; application behavior outside Linux launcher grouping is unaffected.

      No code changes detected at 4af4334. Prior analysis still applies.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. Bugbot is paused — on-demand spend limit reached

      Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

      A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

    5. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review Change StackReview Change Stack

      Important

      Review skipped

      We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting @coderabbitai full review.

      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

      Note

      Reviews paused

      It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

      • Last reviewed commit: fc4ce9080b3ae5c4fd85682cc2dad9dea07545af
      • Latest commit, not reviewed: 4af433426372908ab9a6d740b7675612fd5553ec

      Use the following commands to manage reviews:

      • @coderabbitai resume to resume automatic reviews.
      • @coderabbitai review to trigger a single review.

      Use the checkboxes below for quick actions:

      • ▶️ Resume reviews
      • 🔍 Trigger review
      Walkthrough

      Linux desktop entries now use Icon=t3code. Linux pre-ready setup copies packaged hicolor icons into the user data directory and refreshes the icon cache when needed. Tests cover icon naming, copying, cache refresh behavior, and startup ordering.

      Changes: Linux icon integration

      Layer / File(s)Summary
      Desktop entry and icon mapping
      apps/desktop/src/app/DesktopLinuxUrlHandler.ts, apps/desktop/src/app/DesktopLinuxUrlHandler.test.ts
      The hidden Linux desktop entry declares Icon=t3code. Helpers derive lowercase icon names and generate hicolor installation operations. Tests cover mixed-case desktop IDs and generated targets.
      AppImage icon installation
      apps/desktop/src/app/DesktopPreReadyPlatform.ts, apps/desktop/src/app/DesktopPreReadyPlatform.test.ts
      Linux pre-ready setup copies changed AppImage icons, skips matching destinations, refreshes gtk-update-icon-cache, and completes copies before asynchronous layer work. Installation failures remain nonfatal.

      Estimated code review effort: 3 (Moderate) | ~20 minutes

      Severity of issue fixed: Low

      Suggested reviewers: bil0000, juliusmarminge

      Sequence Diagram(s)

      sequenceDiagram
        participant DesktopPreReadyPlatform
        participant linuxDesktopIconInstallOperations
        participant APPDIR
        participant UserHicolorTree
        participant gtk-update-icon-cache
        DesktopPreReadyPlatform->>linuxDesktopIconInstallOperations: Build icon installation operations
        linuxDesktopIconInstallOperations-->>DesktopPreReadyPlatform: Return packaged and user icon paths
        DesktopPreReadyPlatform->>APPDIR: Read packaged icon metadata
        DesktopPreReadyPlatform->>UserHicolorTree: Copy changed icons
        DesktopPreReadyPlatform->>gtk-update-icon-cache: Refresh the icon cache
      Merge Risk: Minimal · previous review fc4ce

      Linux AppImage startup now installs the lowercase desktop identity and icon aliases needed for Wayland compositor icon lookup. The desktop-entry and icon-copy behavior are covered, with no current merge-blocking risk identified.

      Pre-merge checks: Passed 3 · Failed 1

      Failed Failed checks: 1 warning
      Check nameStatusExplanationResolution
      Description checkWarningThe description is detailed, but it does not accurately describe the changes in this pull request. It focuses on StartupWMClass and launcher configuration, while the changes update Linux app IDs and…Rewrite the Problem and Change sections to describe the app ID and AppImage icon-lookup issue, the desktop-entry and icon-installation changes, and how those changes address the issue. Align the scope and linked issue references with the st…
      Passed Passed checks: 3 passed

      Check nameStatusExplanation
      Linked Issues checkPassedThe changes satisfy issue #10894 by updating the Wayland app ID, adding Icon=t3code, and copying packaged hicolor icons into the user icon theme.
      Out of Scope Changes checkPassedThe changes remain focused on Linux desktop integration. Identifier updates in related runtime code, tests, documentation, and GNOME integration support the stated objectives.
      Title checkPassedThe title clearly describes the Linux desktop integration change and the intended window-grouping behavior.
      Full details: Description check

      Explanation

      The description is detailed, but it does not accurately describe the changes in this pull request. It focuses on StartupWMClass and launcher configuration, while the changes update Linux app IDs and add AppImage icon installation. It also says theme-icon installation is outside the PR, which conflicts with the changes and stated objectives.

      Resolution

      Rewrite the Problem and Change sections to describe the app ID and AppImage icon-lookup issue, the desktop-entry and icon-installation changes, and how those changes address the issue. Align the scope and linked issue references with the stated objectives. Keep the verification results only if they apply to this PR's changes, and state any required maintainer approval or why the change qualifies for an exception.

      Finishing Touches

      🧪 Generate unit tests (beta)

      • Create PR with unit tests
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
      ℹ️ Recent review info

      ⚙️ Run configuration

      Configuration used: Path: .coderabbit.yaml

      Review profile: CHILL

      Plan: Essentials

      Run ID: 7179063b-a3ec-4cf1-a5c3-13953861ac3a

      📥 Commits

      Reviewing files that changed from the base of the PR and between e16b8b059c9f5ff6dfed1addecffb831c6aee043 and e23c2b8b5686346bf351f379a4deb10de3e89ed1.

      📒 Files selected for processing (4)

      • apps/desktop/src/app/DesktopLinuxUrlHandler.test.ts
      • apps/desktop/src/app/DesktopLinuxUrlHandler.ts
      • apps/desktop/src/app/DesktopPreReadyPlatform.test.ts
      • apps/desktop/src/app/DesktopPreReadyPlatform.ts
    6. The desktop client does not read metadata.json version.

      LinuxSnapShot.detect() and feedbackAvailable use the extension D-Bus Version property. That is still 2 in extension.js (get Version() { return 2; }). Package version 3 is only how GnomeCaptureSetup decides to offer an update so existing installs replace mixed-case CLIENT_NAMES with the lowercase names.

      Keeping metadata at 2 would leave those installs on the old names, which reject com.t3tools.t3code.SnapShot.

    7. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Sorry, I'm unable to act on this request because you do not have permissions within this repository.

    8. Bugbot is paused — on-demand spend limit reached

      Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

      A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

    9. mwolson(GitHub profile, opens in a new tab) changed the title

    10. Bugbot is paused — on-demand spend limit reached

      Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

      A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

    11. mwolson(GitHub profile, opens in a new tab) changed the title

    12. eliath(GitHub profile, opens in a new tab) approved these changes

      Reproduced on Ubuntu GNOME/X11 with nightly AppImage 0.0.41-nightly.20260911.1551

      The root cause mentioned here matches my investigation: the generated com.t3tools.T3Code.desktop is rewritten on each launch without Icon=. This change fixes it.

    13. Built and tested this branch on GNOME 46 with an AppImage. One finding.

      Ubuntu 24.04.5, GNOME Shell 46.0 on X11, Ubuntu Dock v90. I fetched the PR head, rebased onto current main (d7819c1881, clean — your base was 12 days back), built the Linux AppImage, and launched it with an isolated HOME so it could not touch my daily install.

      Everything the PR claims, it does. The entry it wrote carries Icon=t3code, and both names land in the theme:

      hicolor/256x256/apps/t3code.png                20991
      hicolor/256x256/apps/com.t3tools.t3code.png    20991
      hicolor/icon-theme.cache                       160

      GTK resolves them, so this is not just files in the right place:

      t3code             -> …/hicolor/256x256/apps/t3code.png
      com.t3tools.t3code -> …/hicolor/256x256/apps/com.t3tools.t3code.png
      com.t3tools.T3Code -> NOT FOUND

      The finding is that third line. The window's identity is mixed-case com.t3tools.T3Code (WM_CLASS = "com.t3tools.t3code", "com.t3tools.T3Code"), but linuxDesktopIconNames lowercases before installing. Icon theme lookups are case-sensitive, so a shell that uses the literal app id as an icon name — rather than lowercasing it like Noctalia, or resolving through the desktop file like GNOME — still finds nothing. Adding the un-lowercased name looks like a one-line change.

      Scope limits, so this isn't read as more than it is: the isolated HOME means GNOME's own dash never saw these files, so I did not verify pinning or favorites, only that the files are installed and resolvable. X11, not Wayland. I also did not test AppImageLauncher re-integration.

      Separately: _NET_WM_ICON on the main window is present but empty, on this build and on the released one. The window carries no icon of its own, so the entry and theme are doing all the work. Possibly relevant for X11 shells that prefer the window property.

      I hit this bug independently before finding #10894 and reached the same diagnosis.

      Prepared with Claude Opus 5 via Claude Code.

    14. TonybynMp4(GitHub profile, opens in a new tab)commented

      Confirmed this fixes the duplicate dock icon for the official .deb too (#13975).

      I merged this branch onto current main (it predates the .deb target but merges cleanly) and built a .deb. The packaged /usr/share/applications/t3code.desktop differs from the official nightly's (0.0.43-nightly.20260927.2344) only by StartupWMClass=t3code → StartupWMClass=com.t3tools.T3Code. The rest of the package outside /opt is identical.

      I then applied that same .desktop on the installed official nightly .deb and relaunched from the pinned favourite. The window now groups under the pinned T3 Code icon, and the second generic icon is gone. Ubuntu 26.04.1, GNOME Shell 50.1, Wayland.

    15. Thanks for testing on GNOME 46. You're right that theme lookup is case-sensitive, and the branch now also installs com.t3tools.T3Code.png. GNOME and Ubuntu Dock don't use it: they take the icon from the matched desktop entry, so on your setup the StartupWMClass change is what matters.

      Where the literal filename is used:

      • Noctalia 5.x (5.0.0 through 5.2.0) requires it. Its taskbar skips NoDisplay entries and, when no visible entry matches, falls back to a case-sensitive theme lookup of the app id. That happens with an AppImage run without integration, or an older integration still carrying StartupWMClass=t3code. Noctalia 4.x resolves the hidden entry first and doesn't need it.
      • LXQt panel 2.3.0 on wlroots looks up the app id as a theme icon, first exactly as given and then lowercased. It finds com.t3tools.T3Code.png first, but would also find com.t3tools.t3code.png, so it doesn't strictly need the new file.
      • DankMaterialShell 1.6.2 uses the literal app id as a theme icon when no desktop entry resolves.
      • Waybar 0.14.0 (wlr/taskbar, hyprland/workspaces) tries the matched entry's StartupWMClass as a theme icon before the entry's Icon. It uses com.t3tools.T3Code if the visible launcher is matched.

      _NET_WM_ICON isn't actually empty: T3 sets a 1024×1024 icon (about 4 MB). xprop reads at most 500,000 bytes by default and prints nothing when the first icon is cut off; xprop -len 16000000 _NET_WM_ICON shows Icon (1024 x 1024). GNOME 46 doesn't read the property anyway.

    16. juliusmarminge requested changes

      The code looks ready at this head. The 99 focused desktop/startup/packaging tests passed locally, and the earlier blocking-startup and same-size stale-icon findings are fixed. Electron's window identity behavior also supports the StartupWMClass change.

      Please add before/after screenshots before merging, as required by this repository's UI-change instructions. Show the affected Linux dock/overview state, including the corrected icon and the running window grouped under the visible launcher. A short recording is useful if demonstrating pinning and relaunch rather than static screenshots. Existing reviewer reports are useful, but the PR currently explicitly omits visual evidence.

      This request is for review evidence, not a code defect. I did not perform desktop visual verification.

      Reviewed with GPT-6 in Codex.

    17. Screenshots

      @juliusmarminge Added before/after screenshots, also inlined in the description. Ubuntu 26.04, GNOME Shell 50.1 on Wayland, Ubuntu Dock. T3 Code is pinned, launched from the pin, closed, and relaunched from it. Before is today's nightly .deb (0.0.45-nightly.20260930.2493), after is this PR's .deb; the icon artwork differs only because the before build is a Nightly. GNOME's window tracker put the window on the hidden com.t3tools.T3Code.desktop before and on the pinned t3code.desktop after, on both launches.

      Ubuntu Dock before and after

      Before: the running window appears as a second dock entry.

      Before: nightly .deb

      After: the running window is grouped under the pinned launcher.

      After: this PR's .deb

      After: relaunched from the pinned launcher, still one entry.

      After: relaunched from the pin

    18. juliusmarminge requested changes

      The StartupWMClass=com.t3tools.T3Code change is correct: Electron derives the app id from setDesktopName, and electron-builder's desktop entry requires StartupWMClass to match. It is set everywhere it needs to be (the electron-builder entry for AppImage and .deb, plus both PKGBUILDs), and it fixes #13975 on its own. I'd happily merge that part now. Could you split it into its own PR? The icon-copy half needs changes first:

      1. Drop the t3code icon name (DesktopLinuxUrlHandler.ts#L94-L101). Stable and nightly both use executableName: "t3code". So running a nightly AppImage copies the nightly icon to ~/.local/share/icons/hicolor/256x256/apps/t3code.png, which hides the stable .deb/AUR icon in /usr/share. Stable and nightly AppImages then overwrite each other's copy on every launch, and nothing removes the copies afterwards. The shells this targets look up com.t3tools.t3code or com.t3tools.T3Code, never t3code, and the hidden handler entry already has an absolute Icon= since #8673.
      2. Don't create a user icon cache (DesktopPreReadyPlatform.ts#L38-L54). gtk-update-icon-cache -f -t usually creates ~/.local/share/icons/hicolor/icon-theme.cache where none existed. Only T3 then keeps it current, so GTK apps can miss icons that other tools add later. Please drop the refresh, or only run it when the cache already exists.
      3. Move the icon install out of pre-ready. The icons aren't needed until the window maps. Doing it next to the existing update-desktop-database call in DesktopLinuxUrlHandler lets it use Effect FileSystem/ChildProcessSpawner with a timeout. That also removes the node:child_process import, the raw setTimeout, the globalTimers:off opt-out and posixJoin, and takes the work off synchronous startup.
      4. Tests: the new DesktopPreReadyPlatform tests mock fs and child_process wholesale, and the spawn mock's on does nothing, so the timeout, kill and error handling go untested. After the move, one or two tests against a real temp directory would cover more with less code.

      Small follow-up, not blocking: --class=t3code / linuxWmClass no longer affects the window class and could be removed.

    19. mwolson(GitHub profile, opens in a new tab) changed the title

    20. Split as suggested. This PR is now only StartupWMClass=com.t3tools.T3Code (electron-builder entry for the AppImage and .deb, plus both PKGBUILDs), with the dock screenshots. The theme icons moved to #14471 linux-app-id-theme-icons with your four points addressed:

      1. Only com.t3tools.t3code and com.t3tools.T3Code are installed; no t3code.
      2. icon-theme.cache is never created. An existing one is refreshed after an icon changes, or when it is older than the installed icons, which also retries a refresh that failed on an earlier launch.
      3. The install runs in DesktopLinuxUrlHandler next to update-desktop-database, with Effect FileSystem and ChildProcessSpawner. Pre-ready is untouched.
      4. The tests use a real temp directory: fresh install, same-length stale icons, a failed then recovered refresh, a missing source, a missing cache tool, a stalled refresh, and a cache dated after the icons.

      One thing I hit on the way: Effect.timeout on exitCode does not bound the scope's release. Without forceKillAfter, a helper that ignores SIGTERM keeps the scope waiting indefinitely; I checked this against the real spawner. The new cache refresh sets forceKillAfter: "1 second". The existing update-desktop-database and xdg-mime calls have the same gap, which I left alone here.

      I'll send the --class=t3code cleanup separately.

    21. Following up on the --class note: #14482 linux-drop-class-switch removes it. It no longer affects the main window, but it still set the X11 class of T3's own GTK folder picker when no file-chooser portal is running (t3code becomes T3code). The PR has before/after screenshots from GNOME on X11 and Wayland and from XFCE, with no visible difference. SnapShots are unaffected: they run only in Wayland sessions, take their identity from the desktop entry name, and find T3's window by process id and title.

    22. juliusmarminge added labelsmacroscope-review

    23. Confirmed this fix works on the .deb on Ubuntu 26.04 (GNOME, Wayland)

    24. juliusmarminge assignedjuliusmarminge

    25. Taking over this one as maintainer for batch desktop-app-01. I will reconcile the launcher metadata with current main, preserve the focused scope and author credit, and run fresh tests and independent reviews. No merge in this pass.

    26. Hit the same issue on the official nightly .deb (0.1.2-nightly.20261022.3541), Ubuntu, GNOME on Wayland. When I launch from the pinned dock launcher, a second dock entry opens instead of the pinned one.

      /usr/share/applications/t3code.desktop still ships StartupWMClass=t3code, while the window identifies as com.t3tools.T3Code. As a workaround I added a user-level override (~/.local/share/applications/t3code.desktop) that is identical except for StartupWMClass=com.t3tools.T3Code, which is the value this PR sets. +1 for getting this merged.

    27. Note

      Written by gpt-6.1-sol on behalf of Maria

      merged current main (3de45c6254) into the existing branch without rewriting @mwolson's history. the final diff remains three launcher metadata corrections and the existing-file packaging regression test. no runtime cleanup or icon installation was added.

      --class=t3code does not control the main window's identity in this electron version. the released nightly reports WM_CLASS = "com.t3tools.t3code", "com.t3tools.T3Code". keeping StartupWMClass=com.t3tools.T3Code is correct; the separate switch cleanup stays in https://git.cafe/pingdotgg/t3code/pulls/14482. the old bot requests concerning icon installation and gnome extension metadata describe changes that are absent from this diff.

      verification at ae92e55a8bba37fc7661b22231ba87a29f3ff594:

      • reproduced the regression: the existing packaging test fails with main's StartupWMClass=t3code, then passes with this pr's value.
      • blacksmith: 81 packaging/startup/url-handler tests passed; vp run check:changed passed formatting, lint, both knip passes, 34 package typechecks, and the affected test file. aur shell syntax and diff checks also passed.
      • two independent gpt-6.1-sol reviews found no code defects at this exact head.
      • fresh gnome 46 x11 evidence below: the same released nightly .deb binary (0.1.3-nightly.20261025.3692), isolated home, and onboarding state were used for both captures. its extracted launcher was relocated to the extracted executable/icon paths identically in both runs. only StartupWMClass changed between captures. before: the pinned launcher and running window are separate. after relaunch: one running launcher entry. gnome's running-app id changes from com.t3tools.T3Code.desktop to t3code.desktop.

      unverified: a newly built artifact from this head, native wayland, appimagelauncher reintegration, aur installation, and other desktop shells. this is a live metadata regression check using the released app, not a claim that a new head artifact was installed. the attempted nested wayland session stalled before mapping a window. existing pins/integrations still need their metadata refreshed.

      @mwolson, the remaining theme-icon installation work and obsolete class-switch cleanup stay with your separate prs. this takeover preserves your launcher fix unchanged.

      before, main's launcher metadata:

      gnome x11 before: pinned launcher and separate running t3 code entry

      after, this pr's launcher metadata:

      gnome x11 after: running t3 code window grouped under the pinned launcher

      all reported ci checks are now successful or intentionally skipped. julius's existing changes-requested review remains for human re-review; i have not dismissed it. the fresh captures address its request for dock/overview evidence, within the verification limits above.

    28. juliusmarminge added labelsbugfix

    29. juliusmarminge added labelspr:gate-failed

    30. Native Wayland check on KDE Plasma, the session type listed as unverified above. I used the released nightly binary and changed only the StartupWMClass line between runs.

      Environment: Fedora 44, KDE Plasma 6.8.2 (KWin 6.8.2), Wayland session. T3 Code 0.1.7-nightly.20261101.4035, AppImage extracted, run with isolated T3CODE_HOME, XDG_CONFIG_HOME and XDG_DATA_HOME.

      Method: I installed the AppImage's own t3code.desktop as ~/.local/share/applications/t3code.desktop, the name the .deb uses. Exec and Icon point at the extracted app, and the entry is named "T3 Code (PR test)", identically in both runs. I pinned it from the app menu before launching, launched it from the pin, then changed only StartupWMClass from t3code to com.t3tools.T3Code and repeated. The app's hidden com.t3tools.T3Code.desktop URL handler was present throughout, as on a real install.

      Results

      • On native Wayland, KWin reports window class com.t3tools.T3Code (whole class t3code com.t3tools.T3Code) and desktop file name com.t3tools.T3Code. That is the value this PR writes.
      4-kwin-window-class 5-kwin-desktop-file-name
      • Pinned, not running:
      1-pinned-not-running
      • Main (StartupWMClass=t3code), launched from the pin: one taskbar entry, no duplicate.
      2-before-t3code
      • This PR (StartupWMClass=com.t3tools.T3Code), launched from the pin: one entry, and the running window is grouped under the pinned "T3 Code (PR test)" launcher.
      3-after-com t3tools T3Code
      • In both runs, launching again from the app menu while the app was running brought the existing window forward. No "T3 Code is ready" notification appeared (the GNOME symptom in #27257).

      Conclusion: Plasma Wayland doesn't show the duplicate entry on main, and this PR doesn't regress it. The window identity the PR matches is confirmed on native Wayland. Plasma may tie a window to the pinned launcher that started it, so this doesn't show whether the old value breaks grouping for windows started some other way on Plasma.

      Not checked: GNOME Wayland, a build from this PR's head (the change is launcher metadata only, so I used the released binary), AppImageLauncher or Gear Lever integration, and the AUR packages.

    31. Still reproducible on the latest nightly. Confirming the fix in this PR:

      Environment: Fedora 44, GNOME Shell 50.6 (Wayland), Dash to Dock, AppImage 0.1.8-nightly.20261104.4165 managed by Gear Lever 4.6.2

      Symptom: Launching from the pinned dock icon opens a second, unpinned dock entry. The launcher says StartupWMClass=t3code, the window's app ID is com.t3tools.T3Code, so GNOME matches the window to the hidden com.t3tools.T3Code.desktop handler instead.

      Workaround: Changing the line to StartupWMClass=com.t3tools.T3Code fixes it: the window groups under the pinned launcher.

      The workaround doesn't last, though. Gear Lever rebuilds the .desktop file from the AppImage on every update, so t3code comes back with each nightly and I have to fix it again every day. With this PR, the right value would ship in the AppImage and Gear Lever (and AppImageLauncher) would pick it up automatically.

      It would be great to get this merged. :+1:

    32. andersk(GitHub profile, opens in a new tab)commented

      Although this may fix grouping on GNOME, I think it will leave the duplicate dock entry on most other Wayland compositors.

      StartupWMClass comes from X11 startup notification and is not part of Wayland. Mutter still honours it as a fallback, but compositors and shells that follow xdg-shell match a window to the desktop entry whose basename matches its app ID, so com.t3tools.T3Code.desktop for us. electron-builder installs the visible entry as t3code.desktop (from executableName), so a window can only reach it on compositors honoring StartupWMClass.

      There’s also a second problem. The only file actually named com.t3tools.T3Code.desktop is the hidden link-handler entry that the app writes to ~/.local/share/applications on every launch. Wherever matching uses the app ID, the running window is tied to that NoDisplay=true entry, not to the installed launcher.

      A fix that works everywhere might be:

      1. Declare "desktopName": "com.t3tools.T3Code.desktop" in the packaged package.json and set linux.syncDesktopName: true (available in our pinned electron-builder 26.16.1, and always enabled in 27 per electron-userland/electron-builder#9908). electron-builder then installs the entry as com.t3tools.T3Code.desktop with a matching StartupWMClass, so we no longer need to set StartupWMClass by hand. The AppStream <launchable> in com.t3tools.t3code.metainfo.xml would need the same rename.

      2. When com.t3tools.T3Code.desktop exists in $XDG_DATA_DIRS, don’t write the hidden user-local entry. Delete any entry left by an earlier launch when it’s recognisably the generated one (NoDisplay=true plus MimeType=x-scheme-handler/t3code;), so it doesn’t override the .deb’s entry and hide T3 Code from application menus. The entry would then only be written for AppImages, where the integration tool chooses the filename.

        (Opened #31405 for just this item, which is worth doing independently.)

    33. [gpt-6.1-sol][Codex] on behalf of shivam.

      Issue-watch handoff for https://github.com/pingdotgg/t3code/issues/32482. At main e455200077, both AUR launchers still advertise StartupWMClass=t3code, while DesktopPreReadyPlatform sets the desktop identity to com.t3tools.T3Code.desktop and writes the matching hidden URL handler. The new report is GNOME Shell 50.5 on Manjaro Wayland, AUR nightly 0.1.8-nightly.20261107.4314: the running icon has no Pin to Dash option. The reporter confirms that changing the visible launcher's class to com.t3tools.T3Code restores matching.

      I inspected this PR at head 1b9ce88beb0a373ad5a3785e82ac5b13404f7f6b: it already makes that exact change in both AUR PKGBUILDs and the electron-builder launcher. This covers the new report without another PR. PR https://github.com/pingdotgg/t3code/pull/31405 alone does not cover the current AUR launcher filename, t3code.desktop.

      Julius already claimed this PR and authored 4f18fc2fcfcf661b5f0eda99a3974468d6794b7f, so I am handing the new issue to this existing work. No code changes or new tests were run in this thread. GNOME Wayland pinning and an AUR installation remain unverified here; this is source inspection plus the reporter's workaround, not fresh desktop evidence.

    34. PR #31405 alone does not cover the current AUR launcher filename, t3code.desktop.

      To be clear: my proposal is to merge #31405, and then separately rename t3code.desktop to com.t3tools.T3Code.desktop (which would break without #31405).

    35. Confirming the effect of this change on the official .deb (0.1.8) on Ubuntu 26.04, GNOME Shell 50.1, Wayland.

      I applied the equivalent edit locally: a user-level copy of /usr/share/applications/t3code.desktop with StartupWMClass=com.t3tools.T3Code. After restarting T3 Code, the window groups under the installed launcher instead of resolving to the hidden URL-handler entry, and "Pin to Dash" is available; the pinned entry is t3code.desktop. Without it, the window matched ~/.local/share/applications/com.t3tools.T3Code.desktop (NoDisplay=true) and couldn't be pinned (#32482).

      This only covers GNOME/Mutter, which honours StartupWMClass as a fallback; I haven't tested other compositors (see the #31405 discussion).

    36. Evidence

      Environment for all captures: Ubuntu 24.04, GNOME Shell 46 nested Wayland, packaged Electron deb builds, software rendering, 1600×920 display, identical fresh profiles and default light app theme. Captures show the same cropped dash/menu region, excluding the private environment label.

      Steps: launch each packaged app, open GNOME Overview and the running icon's context menu. Base lacks Pin to Dash. On head, select Pin to Dash, fully quit, launch from the remaining pin, and reopen its menu. Head returns as one window under the visible t3code.desktop launcher with an Unpin action.

      BeforeAfter
      8cbc95923a4af4334263
      Before: Pin to Dash absentAfter: Pin to Dash available
      Before recordingAfter recording: pin, quit, relaunch
      Head: fully quitHead: relaunched from pin
      Pin remains without a running windowOne grouped window and Unpin action

      Desktop driver, isolated runner and crop commands, base shell observations, head shell observations.

      AI-assisted; verified with the tests and tools listed above.

      Not shown:

      • GNOME Shell 50 specifically: the available desktop environment is GNOME Shell 46; the reported failure and fixed behavior were both observed there.
      • AUR package installation: this Ubuntu environment used independently built deb packages extracted with isolated user-local launcher registration rather than an Arch/AUR installation.
      • Existing AppImage launcher metadata refresh: no AppImage integration was exercised.
    37. tanstack-source added labelsbug

    38. juliusmarminge merged this1d152c3

    39. juliusmarminge closed this

Sign in to join this conversation.