Skip to content

feat(desktop): publish v2 beta desktop - #41626

Merged
Hona merged 5 commits into
anomalyco:v2from
Hona:v2-beta-publish
Aug 11, 2026
Merged

feat(desktop): publish v2 beta desktop#41626
Hona merged 5 commits into
anomalyco:v2from
Hona:v2-beta-publish

Conversation

@Hona

@Hona Hona commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

  • bundle @opencode-ai/cli@next in the beta desktop
  • use the shared V2 service lifecycle with bundled-version replacement
  • keep Electron user data channel-specific and use normal XDG state for the server
  • skip V1 CLI artifacts and V2 npm beta publishing

Merge before #41627.

@Hona
Hona requested a review from Brendonovich as a code owner August 11, 2026 00:50
Copilot AI lite review requested due to automatic review settings August 11, 2026 00:50
@Hona Hona mentioned this pull request Aug 11, 2026

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

This PR updates the beta/release automation to build the beta branch from v2 (plus beta-labeled PRs targeting v2), publish beta desktop releases bundled with the same-run V2 CLI, and avoid unrelated automation (like Nix hash commits) mutating the generated beta branch.

Changes:

  • Adjust beta sync to merge beta-labeled PRs onto origin/v2, add a --prepare mode, and serialize workflow runs before force-pushing.
  • Bundle the same-run V2 CLI into beta desktop artifacts and disable CLI autoupdate when launched from the desktop app.
  • Update publish workflows to treat beta as a desktop-only publish path (skip npm beta publication and legacy CLI artifacts).

Reviewed changes

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

Show a summary per file
File Description
script/publish.ts Adds a OPENCODE_DESKTOP_ONLY gate to skip non-desktop package publishing during beta publishes.
script/beta.ts Switches beta branch base to v2, adds --prepare mode, and emits changed output for workflows.
packages/desktop/src/main/background-cli.ts Disables CLI autoupdate for background CLI invocations launched by the desktop app.
packages/desktop/scripts/utils.ts Adds helper to copy the same-run built CLI into desktop resources and centralizes CLI preparation/signing.
packages/desktop/scripts/prebuild.ts Uses same-run CLI bundling for beta builds while keeping dev behavior unchanged.
packages/desktop/electron-builder.config.ts Bundles the CLI as an extra resource for non-prod (dev + beta) desktop builds.
packages/desktop/electron-builder.config.test.ts Updates tests to assert CLI bundling for dev/beta and non-bundling for prod.
packages/cli/src/commands/handlers/service/start.ts Ensures service start validates version compatibility (checkVersion: true).
.github/workflows/publish.yml Adjusts publish pipeline to support beta desktop-only releases and consume same-run CLI artifacts for desktop packaging.
.github/workflows/nix-hashes.yml Stops nix-hashes workflow from running on beta pushes to avoid mutating the generated branch.
.github/workflows/beta.yml Runs beta sync from v2, serializes runs, and only creates/pushes with the App token when changes are detected.

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

Comment on lines 93 to 96
- name: Build legacy CLI
if: github.ref_name != 'v2'
if: github.ref_name != 'v2' && github.ref_name != 'beta'
run: ./packages/opencode/script/build.ts ${{ (github.ref_name == 'beta' && '--sourcemaps') || '' }}
env:
@Hona Hona changed the title feat(desktop): publish v2 beta builds feat(desktop): publish v2 beta desktop Aug 11, 2026
@Hona
Hona merged commit c2b754b into anomalyco:v2 Aug 11, 2026
7 checks passed

@linghengqian linghengqian left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If I understand correctly, the documentation for opencode desktop v2 has not been recorded on https://opencode.ai/v2/docs ? Have I missed any issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants