Skip to content

fix: desktop build script#28169

Open
neriousy wants to merge 1 commit into
anomalyco:devfrom
neriousy:fix/desktop-build-script
Open

fix: desktop build script#28169
neriousy wants to merge 1 commit into
anomalyco:devfrom
neriousy:fix/desktop-build-script

Conversation

@neriousy
Copy link
Copy Markdown
Contributor

@neriousy neriousy commented May 18, 2026

Issue for this PR

Closes #

Type of change

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

What does this PR do?

Fixes desktop builds trying to install @opencode-ai/plugin@local

The desktop prebuild builds the embedded opencode server through packages/opencode/script/build-node.ts. That build embedded OPENCODE_CHANNEL, but did not embed OPENCODE_VERSION. At runtime this meant the server was treated as a non-local build, while InstallationVersion still fell back to "local"

Config dependency install uses that state to decide the plugin dependency version, so it produced the invalid npm spec @opencode-ai/plugin@local

This PR embeds OPENCODE_VERSION in the node server build and makes the desktop prebuild pass its resolved OPENCODE_CHANNEL into that build explicitly. With both values present, packaged desktop installs the matching published plugin version instead of local.

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

set these envs

$env:OPENCODE_VERSION = "1.15.4"
$env:OPENCODE_CHANNEL = "dev"

  1. bun run build
  2. bun run package:win
  3. .\dist\win-unpacked"OpenCode Dev.exe"
  4. No more error logs

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

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

If you do not follow this template your PR will be automatically rejected.

@neriousy neriousy requested a review from adamdotdevin as a code owner May 18, 2026 13:40
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. contributor labels May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • No issue referenced. Please add Closes #<number> linking to the relevant issue.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
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.

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found one potentially related PR:

PR #27869 - "fix(nix): re-inherit patches in desktop, ad-hoc sign .app on darwin"
#27869

This PR also addresses desktop build-related issues, specifically around Nix patches and signing the .app on Darwin. It may be related to the current PR #28169 if both are addressing desktop build problems.

Additionally, PR #26202 - "fix(desktop): ensure Electron binary before predev via install.js"
#26202

This PR also deals with desktop build setup, though it's older and may already be merged.

However, note that the current PR #28169 has a minimal description (mostly template text with no actual details about the fix), so it's difficult to determine exact overlap. If you can clarify what specific desktop build issue is being addressed, I can do a more targeted search.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label May 18, 2026
@github-actions github-actions Bot closed this May 18, 2026
@Brendonovich Brendonovich reopened this May 19, 2026
@Brendonovich Brendonovich enabled auto-merge (squash) May 19, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants