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

@Hona Hona 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.

@Hona
Hona requested a review from Brendonovich as a code owner August 12, 2026 00:55
Copilot AI lite review requested due to automatic review settings August 12, 2026 00:55

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 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
File Description
packages/desktop/src/renderer/index.tsx Uses a single injected local version for Sentry release tagging and platform version reporting.
packages/desktop/src/main/logging.ts Records the shared local version in debug log manifests instead of Electron’s app version.
packages/desktop/src/main/index.ts Uses the shared local version in startup logs and WSL server controller initialization.
packages/desktop/src/main/env.d.ts Extends ImportMetaEnv typings to include OPENCODE_VERSION.
packages/desktop/src/main/constants.ts Adds local channel support and introduces a VERSION constant for dev-time version injection.
packages/desktop/src/main/background-cli.ts Allows isolated Desktop instances to discover a local-channel server via service-local.json.
packages/desktop/scripts/utils.ts Removes per-build random local versioning and instead forwards the shared OPENCODE_VERSION.
packages/desktop/scripts/dev.ts Sets OPENCODE_CHANNEL=local and a single timestamped OPENCODE_VERSION for the whole dev session.
packages/desktop/electron.vite.config.ts Adds renderer-time injection of OPENCODE_VERSION and expands channel parsing to include local.
packages/app/src/env.d.ts Updates channel typing to include local.
packages/app/src/components/titlebar.tsx Shows 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:v2 Aug 12, 2026
6 of 7 checks passed
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.

2 participants