fix(desktop): Group Linux windows under the installed launcher #10895
main fromrefs/pull/10895/head·merged by juliusmarminge View on GitHubLinux 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
t3codevalue 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, andlibpango-1.0.so.0are 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):

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
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
🟠 High
gnome-extension/metadata.json:6The desktop client rejects the installed GNOME extension after this version is bumped to
3, soLinuxSnapShot.detect()falls back to the picker and active-window snapshots stop using the extension.LinuxSnapShot.detect()only accepts versions1and2; 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.Approvability#
Verdict: Approved at
35447d4Macroscope'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
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).4af4334. Prior analysis still applies.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.
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_statustofalsein 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_commitssetting.- Last reviewed commit: fc4ce9080b3ae5c4fd85682cc2dad9dea07545af
- Latest commit, not reviewed: 4af433426372908ab9a6d740b7675612fd5553ec
Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto 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.tsThe 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.tsLinux 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,juliusmarmingeSequence 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 reviewfc4ce-
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:
3 · 1-
Failed checks: 1 warningCheck name Status Explanation Resolution Description check The description is detailed, but it does not accurately describe the changes in this pull request. It focuses on StartupWMClassand 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 checks: 3 passed-
Check name Status Explanation Linked Issues check The changes satisfy issue #10894by updating the Wayland app ID, adding Icon=t3code, and copying packaged hicolor icons into the user icon theme.Out of Scope Changes check The changes remain focused on Linux desktop integration. Identifier updates in related runtime code, tests, documentation, and GNOME integration support the stated objectives. Title check The 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
StartupWMClassand 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.tsapps/desktop/src/app/DesktopLinuxUrlHandler.tsapps/desktop/src/app/DesktopPreReadyPlatform.test.tsapps/desktop/src/app/DesktopPreReadyPlatform.ts
-
The desktop client does not read
metadata.jsonversion.LinuxSnapShot.detect()andfeedbackAvailableuse the extension D-BusVersionproperty. That is still 2 inextension.js(get Version() { return 2; }). Package version 3 is only howGnomeCaptureSetupdecides to offer an update so existing installs replace mixed-caseCLIENT_NAMESwith the lowercase names.Keeping metadata at 2 would leave those installs on the old names, which reject
com.t3tools.t3code.SnapShot.Sorry, I'm unable to act on this request because you do not have permissions within this repository.
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.
- apps/desktop/src/app/DesktopPreReadyPlatform.ts line 44OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -20,2 +24,21 @@2024 }212526+function installLinuxDesktopIconsFromAppImage(input: {27+ readonly appDir: string;28+ readonly dataHome: string;29+ readonly desktopEntryName: string;30+}): void {31+ let copied = false;32+ for (const operation of linuxDesktopIconInstallOperations({33+ packagedHicolorRoot: NodePath.posix.join(input.appDir, "usr/share/icons/hicolor"),34+ dataHome: input.dataHome,35+ desktopEntryName: input.desktopEntryName,36+ })) {37+ if (!NodeFS.existsSync(operation.sourcePath)) continue;38+ NodeFS.mkdirSync(NodePath.posix.dirname(operation.targetPath), { recursive: true });39+ NodeFS.copyFileSync(operation.sourcePath, operation.targetPath);40+ copied = true;41+ }42+ if (!copied) return;43+ try {44+ NodeChildProcess.spawnSync(
🟠 High
app/DesktopPreReadyPlatform.ts:44spawnSynccan block Electron startup indefinitely here even withtimeout: 2000: Node sendsSIGTERMat the timeout but does not return untilgtk-update-icon-cacheexits. A same-named executable from the inheritedPATHthat ignores or handlesSIGTERMtherefore prevents the application from reaching ready; use a non-blocking child process or a termination mechanism that guarantees the parent returns.No longer relevant as of 9a743e1eb7ba71c0a8ea361299888e1d7d5adb64
Startup no longer uses
spawnSync.PNG copies still run synchronously before
setDesktopName, and only when the dest is missing or the file size differs.gtk-update-icon-cacheis spawned only after a real copy,unref'd, andSIGKILL'd after 2s. A missing binary or a stuck helper cannot hold ready.The tradeoff is a compositor that only reads the GTK cache might miss new files until that child finishes. The PNGs are already in user hicolor, which is what niri/Noctalia lookup needs.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
mwolson(GitHub profile, opens in a new tab) changed the title
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.
mwolson(GitHub profile, opens in a new tab) changed the title
- @@ -2772,4 +2772,5 @@27722772 ],27732773 desktop: {27742774 entry: {2775- StartupWMClass: "t3code",2775+ // GNOME matches this before the hidden portal desktop entry on Wayland.2776+ StartupWMClass: "com.t3tools.T3Code",
🟡 Medium
scripts/build-desktop-artifact.ts:2776The packaged Linux launcher no longer matches the app's X11 windows, so X11/GNOME can show a separate application entry with the wrong launcher/icon.
StartupWMClassis matched against the--class=t3codevalue used by the production pre-ready setup, while this value iscom.t3tools.T3Code; keepStartupWMClassast3codebecause Wayland's desktop identity is set independently throughsetDesktopName.🤖 Copy this AI Prompt to have your agent fix this:
In file @scripts/build-desktop-artifact.ts around line 2776: The packaged Linux launcher no longer matches the app's X11 windows, so X11/GNOME can show a separate application entry with the wrong launcher/icon. `StartupWMClass` is matched against the `--class=t3code` value used by the production pre-ready setup, while this value is `com.t3tools.T3Code`; keep `StartupWMClass` as `t3code` because Wayland's desktop identity is set independently through `setDesktopName`.Electron 44.1.0 derives the X11 window class from
setDesktopName, not--class. Its implementation sets both X11 class and Wayland app id from the same value.Our GNOME 50.4/Electron 44.1.0 fixtures kept
--class=t3codeunchanged. Xwayland reportedcom.t3tools.T3Codebefore and after. The old metadata matched the hidden handler; the corrected metadata passed visible-launcher matching, favorite reload, and relaunch.This wasn't a full T3 AppImage or GNOME 46/AppImageLauncher test. Reverting would restore the reproduced failure.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
eliath(GitHub profile, opens in a new tab) approved these changes
Reproduced on Ubuntu GNOME/X11 with nightly AppImage
0.0.41-nightly.20260911.1551The root cause mentioned here matches my investigation: the generated
com.t3tools.T3Code.desktopis rewritten on each launch withoutIcon=. This change fixes it.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 isolatedHOMEso 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 160GTK 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 FOUNDThe finding is that third line. The window's identity is mixed-case
com.t3tools.T3Code(WM_CLASS = "com.t3tools.t3code", "com.t3tools.T3Code"), butlinuxDesktopIconNameslowercases 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
HOMEmeans 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_ICONon 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.
Confirmed this fixes the duplicate dock icon for the official
.debtoo (#13975).I merged this branch onto current
main(it predates the.debtarget but merges cleanly) and built a.deb. The packaged/usr/share/applications/t3code.desktopdiffers from the official nightly's (0.0.43-nightly.20260927.2344) only byStartupWMClass=t3code→StartupWMClass=com.t3tools.T3Code. The rest of the package outside/optis identical.I then applied that same
.desktopon the installed official nightly.deband 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.- apps/desktop/src/app/DesktopPreReadyPlatform.ts lines 31 to 31OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -11,11 +13,19 @@11131214 import * as DesktopEarlyElectronStartup from "./DesktopEarlyElectronStartup.ts";1315 import { resolveDesktopAppBranding } from "./DesktopEnvironment.ts";14-import { renderUrlHandlerDesktopEntry } from "./DesktopLinuxUrlHandler.ts";16+import {17+ linuxDesktopIconInstallOperations,18+ renderUrlHandlerDesktopEntry,19+} from "./DesktopLinuxUrlHandler.ts";1520 import * as ElectronProtocol from "../electron/ElectronProtocol.ts";16211722 export interface DesktopPreReadyCommandLineReader {1823 readonly hasSwitch: (switchName: string) => boolean;1924 readonly getSwitchValue: (switchName: string) => string;2025 }212627+function linuxDesktopIconNeedsCopy(sourcePath: string, targetPath: string): boolean {28+ if (!NodeFS.existsSync(sourcePath)) return false;29+ if (!NodeFS.existsSync(targetPath)) return true;30+ try {31+ return NodeFS.statSync(sourcePath).size !== NodeFS.statSync(targetPath).size;
🟡 Medium
app/DesktopPreReadyPlatform.ts:31Equal-sized source and target files are treated as identical, so an AppImage update that changes
t3code.pngpixels or metadata without changing its byte length skips all icon copies and cache refresh, leaving the stale desktop icon installed. Compare the file contents (or a reliable hash) instead of onlystatSync(...).size.No longer relevant as of 0f9f2876c0845aa5decdfba2de3cd6b764809fa9
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 theStartupWMClasschange is what matters.Where the literal filename is used:
- Noctalia 5.x (5.0.0 through 5.2.0) requires it. Its taskbar skips
NoDisplayentries 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 carryingStartupWMClass=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.pngfirst, but would also findcom.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'sStartupWMClassas a theme icon before the entry'sIcon. It usescom.t3tools.T3Codeif the visible launcher is matched.
_NET_WM_ICONisn't actually empty: T3 sets a 1024×1024 icon (about 4 MB).xpropreads at most 500,000 bytes by default and prints nothing when the first icon is cut off;xprop -len 16000000 _NET_WM_ICONshowsIcon (1024 x 1024). GNOME 46 doesn't read the property anyway.- Noctalia 5.x (5.0.0 through 5.2.0) requires it. Its taskbar skips
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.
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 hiddencom.t3tools.T3Code.desktopbefore and on the pinnedt3code.desktopafter, on both launches.
Before: the running window appears as a second dock entry.

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

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

juliusmarminge requested changes
The
StartupWMClass=com.t3tools.T3Codechange is correct: Electron derives the app id fromsetDesktopName, and electron-builder's desktop entry requiresStartupWMClassto 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:- Drop the
t3codeicon name (DesktopLinuxUrlHandler.ts#L94-L101). Stable and nightly both useexecutableName: "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 upcom.t3tools.t3codeorcom.t3tools.T3Code, nevert3code, and the hidden handler entry already has an absoluteIcon=since #8673. - Don't create a user icon cache (DesktopPreReadyPlatform.ts#L38-L54).
gtk-update-icon-cache -f -tusually creates~/.local/share/icons/hicolor/icon-theme.cachewhere 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. - 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-databasecall inDesktopLinuxUrlHandlerlets it use EffectFileSystem/ChildProcessSpawnerwith a timeout. That also removes thenode:child_processimport, the rawsetTimeout, theglobalTimers:offopt-out andposixJoin, and takes the work off synchronous startup. - Tests: the new
DesktopPreReadyPlatformtests mockfsandchild_processwholesale, and the spawn mock'sondoes 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/linuxWmClassno longer affects the window class and could be removed.- Drop the
mwolson(GitHub profile, opens in a new tab) changed the title
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:- Only
com.t3tools.t3codeandcom.t3tools.T3Codeare installed; not3code. icon-theme.cacheis 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.- The install runs in
DesktopLinuxUrlHandlernext toupdate-desktop-database, with EffectFileSystemandChildProcessSpawner. Pre-ready is untouched. - 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.timeoutonexitCodedoes not bound the scope's release. WithoutforceKillAfter, a helper that ignores SIGTERM keeps the scope waiting indefinitely; I checked this against the real spawner. The new cache refresh setsforceKillAfter: "1 second". The existingupdate-desktop-databaseandxdg-mimecalls have the same gap, which I left alone here.I'll send the
--class=t3codecleanup separately.- Only
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
Following up on the
--classnote: #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 (t3codebecomesT3code). 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.juliusmarminge added labelsmacroscope-review
Confirmed this fix works on the
.debon Ubuntu 26.04 (GNOME, Wayland)juliusmarminge assignedjuliusmarminge
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.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
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.desktopstill shipsStartupWMClass=t3code, while the window identifies ascom.t3tools.T3Code. As a workaround I added a user-level override (~/.local/share/applications/t3code.desktop) that is identical except forStartupWMClass=com.t3tools.T3Code, which is the value this PR sets. +1 for getting this merged.Note
Written by
gpt-6.1-solon behalf of Mariamerged 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=t3codedoes not control the main window's identity in this electron version. the released nightly reportsWM_CLASS = "com.t3tools.t3code", "com.t3tools.T3Code". keepingStartupWMClass=com.t3tools.T3Codeis 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:changedpassed 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
.debbinary (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. onlyStartupWMClasschanged between captures. before: the pinned launcher and running window are separate. after relaunch: one running launcher entry. gnome's running-app id changes fromcom.t3tools.T3Code.desktoptot3code.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:

after, this pr's launcher metadata:

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.
- reproduced the regression: the existing packaging test fails with main's
juliusmarminge added labelsbugfix
juliusmarminge added labelspr:gate-failed
Native Wayland check on KDE Plasma, the session type listed as unverified above. I used the released nightly binary and changed only the
StartupWMClassline 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 isolatedT3CODE_HOME,XDG_CONFIG_HOMEandXDG_DATA_HOME.Method: I installed the AppImage's own
t3code.desktopas~/.local/share/applications/t3code.desktop, the name the.debuses.ExecandIconpoint 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 onlyStartupWMClassfromt3codetocom.t3tools.T3Codeand repeated. The app's hiddencom.t3tools.T3Code.desktopURL handler was present throughout, as on a real install.Results
- On native Wayland, KWin reports window class
com.t3tools.T3Code(whole classt3code com.t3tools.T3Code) and desktop file namecom.t3tools.T3Code. That is the value this PR writes.
- Pinned, not running:
- Main (
StartupWMClass=t3code), launched from the pin: one taskbar entry, no duplicate.
- 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.
- 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.
- On native Wayland, KWin reports window class
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.4165managed by Gear Lever 4.6.2Symptom: Launching from the pinned dock icon opens a second, unpinned dock entry. The launcher says
StartupWMClass=t3code, the window's app ID iscom.t3tools.T3Code, so GNOME matches the window to the hiddencom.t3tools.T3Code.desktophandler instead.Workaround: Changing the line to
StartupWMClass=com.t3tools.T3Codefixes it: the window groups under the pinned launcher.The workaround doesn't last, though. Gear Lever rebuilds the
.desktopfile from the AppImage on every update, sot3codecomes 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:
Although this may fix grouping on GNOME, I think it will leave the duplicate dock entry on most other Wayland compositors.
StartupWMClasscomes 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, socom.t3tools.T3Code.desktopfor us. electron-builder installs the visible entry ast3code.desktop(fromexecutableName), so a window can only reach it on compositors honoringStartupWMClass.There’s also a second problem. The only file actually named
com.t3tools.T3Code.desktopis the hidden link-handler entry that the app writes to~/.local/share/applicationson every launch. Wherever matching uses the app ID, the running window is tied to thatNoDisplay=trueentry, not to the installed launcher.A fix that works everywhere might be:
Declare
"desktopName": "com.t3tools.T3Code.desktop"in the packagedpackage.jsonand setlinux.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 ascom.t3tools.T3Code.desktopwith a matchingStartupWMClass, so we no longer need to setStartupWMClassby hand. The AppStream<launchable>incom.t3tools.t3code.metainfo.xmlwould need the same rename.When
com.t3tools.T3Code.desktopexists 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=trueplusMimeType=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.)
[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, whileDesktopPreReadyPlatformsets the desktop identity tocom.t3tools.T3Code.desktopand 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 tocom.t3tools.T3Coderestores 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.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.desktopwithStartupWMClass=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 ist3code.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
StartupWMClassas a fallback; I haven't tested other compositors (see the #31405 discussion).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.
Before After 8cbc95923a 4af4334263 

Before recording After recording: pin, quit, relaunch Head: fully quit Head: relaunched from pin 

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.
tanstack-source added labelsbug
juliusmarminge merged this1d152c3
juliusmarminge closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed