Skip to content

fix(desktop): align local development identity - #41889

Merged
Hona merged 2 commits into
anomalyco:v2from
Hona:desktop-local-channel
Aug 12, 2026
Merged

fix(desktop): align local development identity#41889
Hona merged 2 commits into
anomalyco:v2from
Hona:desktop-local-channel

Conversation

@Hona

@HonaHona commented Aug 12, 2026

Copy link
Copy Markdown
Member

Summary

  • use the existing local channel throughout desktop development
  • share one 2.0.0-local timestamp version between Electron and the local CLI
  • discover the isolated server through service-local.json
  • show LOCAL in the titlebar and the local version in Settings

Verification

  • built the Electron main, preload, and renderer bundles with a fixed local identity
  • confirmed the renderer bundle contains the local version and LOCAL badge
  • built the CLI with channel local and the same version
  • confirmed the server writes service-local.json with that version

Type checking

Package type checks remain blocked by existing upstream Core, AI, and Plugin workspace errors. No reported error points to these changed files.

CopilotAI lite review requested due to automatic review settings August 12, 2026 00:55

CopilotAI 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 standardizes the “local” development identity for the Desktop app by propagating a single 2.0.0-local-<timestamp> version across the Electron main/renderer and the locally built CLI, and by aligning discovery to the service-local.json registration contract.

Changes:

  • Introduces a shared local dev OPENCODE_VERSION and threads it into renderer Sentry release + platform version reporting, and into Electron main-side logging/WSL server metadata.
  • Adds a local channel option and routes isolated Desktop server discovery through service-local.json when applicable.
  • Updates UI channel indicator behavior to show LOCAL alongside DEV/BETA.

Reviewed changes

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

Show a summary per file
FileDescription
packages/desktop/src/renderer/index.tsxUses a single injected local version for Sentry release tagging and platform version reporting.
packages/desktop/src/main/logging.tsRecords the shared local version in debug log manifests instead of Electron’s app version.
packages/desktop/src/main/index.tsUses the shared local version in startup logs and WSL server controller initialization.
packages/desktop/src/main/env.d.tsExtends ImportMetaEnv typings to include OPENCODE_VERSION.
packages/desktop/src/main/constants.tsAdds local channel support and introduces a VERSION constant for dev-time version injection.
packages/desktop/src/main/background-cli.tsAllows isolated Desktop instances to discover a local-channel server via service-local.json.
packages/desktop/scripts/utils.tsRemoves per-build random local versioning and instead forwards the shared OPENCODE_VERSION.
packages/desktop/scripts/dev.tsSets OPENCODE_CHANNEL=local and a single timestamped OPENCODE_VERSION for the whole dev session.
packages/desktop/electron.vite.config.tsAdds renderer-time injection of OPENCODE_VERSION and expands channel parsing to include local.
packages/app/src/env.d.tsUpdates channel typing to include local.
packages/app/src/components/titlebar.tsxShows a channel badge for local in addition to dev/beta.

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

Comment on lines +75 to +78
define: {
"import.meta.env.OPENCODE_VERSION": JSON.stringify(process.env.OPENCODE_VERSION),
"import.meta.env.VITE_OPENCODE_CHANNEL": JSON.stringify(channel),
},
@Hona
Hona merged commit 04ad06e into anomalyco:v2Aug 12, 2026
6 of 7 checks passed
Sign up for freeto 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.

2 participants

@Hona