fix(desktop): align local development identity - #41889
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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_VERSIONand threads it into renderer Sentry release + platform version reporting, and into Electron main-side logging/WSL server metadata. - Adds a
localchannel option and routes isolated Desktop server discovery throughservice-local.jsonwhen applicable. - Updates UI channel indicator behavior to show
LOCALalongsideDEV/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), | ||
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Verification
Type checking
Package type checks remain blocked by existing upstream Core, AI, and Plugin workspace errors. No reported error points to these changed files.