Skip to content

fix(desktop): only offer OpenCode 2 where it can run - #64375

Closed
Hona wants to merge 1 commit into
anomalyco:v1from
Hona:upgrade-prompt-guards
Closed

Hona wants to merge 1 commit into
anomalyco:v1from
Hona:upgrade-prompt-guards

Conversation

@Hona

@Hona Hona commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Issue for this PR

No linked issue. Follow-up to #64153, found while checking the OpenCode 2 offer before the v1 patch release.

Type of change

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

What does this PR do?

Two guards on the OpenCode 2 offer in OpenCode 1 desktop. When and how often the card opens does not change.

Before After
macOS 12 OpenCode 2 is offered and installed, then cannot start No offer
OpenCode 2 download keeps failing About 300 MB retried every 10 minutes, without end Stops after 3 failures until the next launch or Check for updates
  • macOS 13. OpenCode 2 ships Electron 44 (LSMinimumSystemVersion 13.0) and OpenCode 1 ships Electron 42, which still runs on macOS 12. The OpenCode 2 feed has no minimumSystemVersion, so the check is in the app.
  • Failed downloads. Only a download that failed by itself counts. A feed that cannot be reached and a download cancelled by a newer 1.x release do not.
stateDiagram-v2
  [*] --> unavailable
  unavailable --> downloading: 1.x is up to date, fewer than 3 failures
  downloading --> ready: OpenCode 2 downloaded, failures = 0
  downloading --> unavailable: download failed, failures + 1
  unavailable --> unavailable: Check for updates, failures = 0
Loading
export function supportsMajor(platform: string, system: string) {
  if (platform !== "darwin") return true
  return Number(system.split(".")[0]) >= MAJOR_MACOS
}

How did you verify your code works?

  • The macOS 12 guard has a unit test only. No macOS 12 machine was available.
  • The download limit has unit tests for a failing download, an unreachable feed, and a retry after Check for updates.

Screenshots / recordings

No visual change.

Checklist

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

@Hona
Hona requested a review from Brendonovich as a code owner November 17, 2026 06:31
Copilot AI balanced review requested due to automatic review settings November 17, 2026 06:31

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Hona
Hona force-pushed the upgrade-prompt-guards branch from aba4bc2 to 7b5a675 Compare November 17, 2026 06:47
@Hona Hona changed the title fix(desktop): keep the OpenCode 2 offer to once a week fix(desktop): only offer OpenCode 2 where it can run Nov 17, 2026
@Hona Hona closed this Nov 17, 2026
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