GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(desktop): restore linux launcher identity by neriousy · Pull Request #31709 · anomalyco/opencode

Conversation

@neriousy

@neriousy neriousy commented Jun 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Issue for this PR

Closes #31710

Regression context: #31571

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Restores the Linux desktop package identity after the Electron 42 packaging update in #31571 changed the installed executable, launcher, and icon basename to opencode-desktop.

The previous PR added opencode-desktop to avoid electron-builder deriving an invalid AppImage executable name from the scoped npm package name @opencode-ai/desktop. This keeps the same path-safety property, but uses the channel app id (ai.opencode.desktop, ai.opencode.desktop.beta, or ai.opencode.desktop.dev) so Linux desktop metadata lines up with the app id, desktopName, StartupWMClass, and hicolor icon basename.

For prod, the visible launcher is ai.opencode.desktop.desktop and references Icon=ai.opencode.desktop, so GNOME/KDE can associate the running Electron window with the installed launcher/icon.

This also ships a hidden compatibility launcher at opencode-desktop.desktop for prod deb/rpm packages. Existing Linux dock pins that point at the short-lived opencode-desktop.desktop entry should keep launching the app while new installs use the canonical app id launcher.

How did you verify your code works?

  • cd packages/desktop && bun test electron-builder.config.test.ts
  • cd packages/desktop && bun typecheck
  • cd packages/desktop && OPENCODE_CHANNEL=prod bunx electron-builder --linux deb --config electron-builder.config.ts --publish never
  • cd packages/desktop && OPENCODE_CHANNEL=prod bunx electron-builder --linux AppImage --config electron-builder.config.ts --publish never
  • Inspected the generated .deb and confirmed it contains:
    • /usr/share/applications/ai.opencode.desktop.desktop
    • /usr/share/applications/opencode-desktop.desktop
    • /usr/share/icons/hicolor/.../apps/ai.opencode.desktop.png
  • Pre-push hook ran bun turbo typecheck successfully.

Screenshots / recordings

N/A - packaging metadata change only.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Filip Hejmowski
fix(desktop): restore linux launcher identity
67ce207
@neriousy
neriousy requested review from Brendonovich and Hona as code owners June 10, 2026 15:05
@github-actions github-actions Bot added contributor needs:issue labels Jun 10, 2026
@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@neriousy
neriousy marked this pull request as draft June 10, 2026 15:08
@neriousy
neriousy marked this pull request as ready for review June 10, 2026 15:09
@github-actions github-actions Bot removed the needs:issue label Jun 10, 2026
Hona
Hona reviewed Jun 10, 2026
View reviewed changes

@Hona Hona left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Reviewed the packaging mechanics against the vendored app-builder-lib 26.15.2 source. The identity alignment (executableName / desktopName / StartupWMClass / icon basename) is correct and the compat launcher matches what electron-builder generates for prod (/opt/${sanitizedProductName}/${executableName}). No bugs found. One decision to confirm before merge (beta pins, inline) and two optional notes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/desktop/electron-builder.config.ts
protocols: { name: "OpenCode", schemes: ["opencode"] },
publish: { provider: "github", owner: "anomalyco", repo: "opencode", channel: "latest" },
rpm: { packageName: "opencode" },
deb: { fpm: [legacyDesktopEntryFpm] },

@Hona Hona Jun 10, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The compat launcher is prod-only, but the regression also affected beta: the regressed executableName: "opencode-desktop" was shared across all channels, and the deb/rpm launcher filename falls back to executableName, so regressed beta packages also installed /usr/share/applications/opencode-desktop.desktop. Beta users who pinned during the regression window will lose their pins on upgrade.

This may well be an acceptable tradeoff (short window, small audience, and a beta compat file would need a different Exec — /opt/OpenCode Beta/ai.opencode.desktop.beta — while colliding with prod's compat file at the same path, a conflict the regressed packages already had). If it's intentional, worth a sentence in the PR description; otherwise beta needs its own legacy entry.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Hona Hona Jun 10, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Resolved: maintainer decision is that launcher pin continuity is out of scope — no migration needed for beta (or anywhere). Not blocking merge. Optional follow-up: since pin migration is the compat launcher's only purpose, the opencode-desktop.desktop resource, the two fpm mappings, and the compat test could be dropped entirely to simplify the config — fine either way.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/desktop/electron-builder.config.ts
icon: `resources/icons`,
category: "Development",
executableName: "opencode-desktop",
executableName: appId,

@Hona Hona Jun 10, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Optional hardening: the installed .desktop filename here comes from executableName only because linux.syncDesktopName defaults to false — the identity holds because executableName === appId and desktopName === appId + ".desktop" happen to agree. Setting linux.syncDesktopName: true derives the launcher filename from desktopName directly, which is the pattern the 26.15.x docs recommend, and app-builder-lib notes the default flips to true in v27 anyway. Same output today; just removes the implicit coupling. (Relatedly, the explicit StartupWMClass below is already the 26.15.x default when desktopName is set — harmless, fine to keep as documentation.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/desktop/electron-builder.config.test.ts
const module = await import(`./electron-builder.config.ts?channel=${channel.channel}`)
const config = module.default as Configuration

if (previous === undefined) delete process.env.OPENCODE_CHANNEL

@Hona Hona Jun 10, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Nit: the env restore runs after await import(...) without try/finally, so if the import throws, the mutated OPENCODE_CHANNEL leaks into subsequent tests. Only matters when the config module is already broken, but a finally would keep those failures isolated. Applies to both tests in this file.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Hona
Hona enabled auto-merge (squash) June 10, 2026 15:42
@Hona
Hona merged commit 2e0f88d into anomalyco:dev Jun 10, 2026
15 of 16 checks passed

Uh oh!

There was an error while loading. Please reload this page.

isaacfinnegan pushed a commit to isaacfinnegan/whispercode that referenced this pull request Jun 15, 2026
@neriousy
fix(desktop): restore linux launcher identity (anomalyco#31709)
13e7de7
davidgut1982 pushed a commit to davidgut1982/opencode that referenced this pull request Jun 19, 2026
@neriousy @davidgut1982
fix(desktop): restore linux launcher identity (anomalyco#31709)
3f79aa8
BenGu3 pushed a commit to BenGu3/opencode that referenced this pull request Jun 27, 2026
@neriousy @BenGu3
fix(desktop): restore linux launcher identity (anomalyco#31709)
d195a13
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
@neriousy
fix(desktop): restore linux launcher identity (#31709)
0c24b83
@opencodejr opencodejr Bot mentioned this pull request Nov 1, 2026
OpenCode does not merge with Favorite in Dash to Dock #61096
Open
@AJ-505 AJ-505 mentioned this pull request Nov 3, 2026
fix: desktop launcher identity and failed-turn replay reliability AJ-505/opencode#1
Open
@opencodejr opencodejr Bot mentioned this pull request Nov 9, 2026
OpenCode Favorite on Dash to Dock results in non-merged instances after upgrade #62918
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Hona Hona Hona left review comments
@Brendonovich Brendonovich Awaiting requested review from Brendonovich

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Linux desktop app icon missing after Electron packaging update

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@neriousy @Hona
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.