Skip to content

fix(desktop): restore Linux dock icon association - #6250

Closed
kbrianps wants to merge 2 commits into
pingdotgg:mainfrom
kbrianps:agent/fix-linux-dock-icon
Closed

kbrianps wants to merge 2 commits into
pingdotgg:mainfrom
kbrianps:agent/fix-linux-dock-icon

Conversation

@kbrianps

@kbrianps kbrianps commented Aug 12, 2026 •

Copy link
Copy Markdown

What Changed

  • Restore Electron's Linux class command-line switch from the existing linuxWmClass environment value.
  • Add a regression test covering the packaged Linux window class.

Why

The generated Linux desktop entry uses StartupWMClass=t3code, but the migrated desktop runtime no longer applied the matching Electron window class. Linux shells therefore saw the running window as T3 Code (Alpha) and could not associate it with the installed desktop entry and bundled icon.

This restores the existing identity configuration so the runtime window and launcher use the same class.

UI Changes

No in-app UI changes. This fixes Linux desktop-shell integration for the existing application icon.

Checklist

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

Verification

  • vp test run apps/desktop/src/app/DesktopAppIdentity.test.ts
  • vp run --filter @t3tools/desktop typecheck
  • vp lint apps/desktop/src/app/DesktopAppIdentity.ts apps/desktop/src/app/DesktopAppIdentity.test.ts --report-unused-disable-directives
  • vp fmt --check apps/desktop/src/app/DesktopAppIdentity.ts apps/desktop/src/app/DesktopAppIdentity.test.ts
  • git diff --check

Generated with GPT-5 Codex using the Codex CLI harness.

Note

Restore Linux dock icon association by setting linuxWmClass to t3code

Adds a test in DesktopPreReadyPlatform.test.ts that verifies the Linux window class (linuxWmClass) is set to "t3code" and that the ["class", "t3code"] command-line switch is appended before Electron is ready. Also adds an afterEach hook to clean up stubbed environment variables between tests.

Macroscope summarized cbb2392.


Note

Low Risk
Test-only changes with no runtime behavior in this diff; low risk to production.

Overview
Adds a regression test on DesktopPreReadyPlatform for packaged Linux builds: when VITE_DEV_SERVER_URL is empty and the host is Linux, pre-ready Electron options expose linuxWmClass as t3code and appendSwitch("class", "t3code") runs before Electron is ready—matching StartupWMClass in the desktop entry so the dock can associate the running window with the launcher icon.

Also adds afterEach → vi.unstubAllEnvs() so env stubs from that test do not leak into other cases.

Reviewed by Cursor Bugbot for commit cbb2392. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

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 Plus

Run ID: 0415dbca-344e-4a83-ac82-0bea37eddfe6

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

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Aug 12, 2026
@kbrianps
kbrianps marked this pull request as ready for review August 12, 2026 00:50
Copilot AI lite review requested due to automatic review settings August 12, 2026 00:50

Copilot AI left a comment

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.

Pull request overview

Restores Linux desktop-shell icon/launcher association for the Electron desktop app by ensuring the running window’s WM class matches the packaged .desktop entry (StartupWMClass).

Changes:

  • Append Electron’s Linux --class command-line switch using environment.linuxWmClass during identity configuration.
  • Add a regression test asserting the class switch is appended with the expected packaged value (t3code).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
apps/desktop/src/app/DesktopAppIdentity.ts Adds Linux WM class configuration via appendCommandLineSwitch("class", ...) during app identity setup.
apps/desktop/src/app/DesktopAppIdentity.test.ts Extends the ElectronApp test double to record command-line switches and adds a Linux-specific regression test.

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

Comment thread apps/desktop/src/app/DesktopAppIdentity.ts
@macroscopeapp

macroscopeapp Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved da9c86c

This PR contains only test file changes - adding test cleanup and a new test case for Linux window class. No runtime code is modified. The unresolved review comment on DesktopAppIdentity.ts is not applicable as that file is not in this diff.

You can customize Macroscope's approvability policy. Learn more.

@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). labels Aug 12, 2026
@kbrianps
kbrianps force-pushed the agent/fix-linux-dock-icon branch from da9c86c to cbb2392 Compare August 13, 2026 11:42
@t3dotgg

t3dotgg commented Aug 27, 2026

Copy link
Copy Markdown
Member

Note

🤖 GPT-5.6 Sol responding on behalf of Theo

We're closing this PR as we clean up the T3 Code backlog. Thank you for taking the time to put this together.

Closing because the Linux window-class fix is already on current main. DesktopPreReadyPlatform applies the class switch from linuxWmClass before startup. This PR now contains only a test for that existing behavior, not a remaining production fix. A new dock association failure would need a current reproduction.

If you believe we closed this in error, please reopen the PR and leave a comment explaining what we missed. If GitHub does not let you reopen it, leave a comment here and we'll take another look.

@t3dotgg t3dotgg closed this Aug 27, 2026
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.

3 participants