Skip to content

fix(app): stop labeling incompatible servers as OpenCode 1 - #62584

Open
DonnieFi wants to merge 3 commits into
anomalyco:devfrom
DonnieFi:incompatible-version-label
Open

DonnieFi wants to merge 3 commits into
anomalyco:devfrom
DonnieFi:incompatible-version-label

Conversation

@DonnieFi

@DonnieFi DonnieFi commented Nov 7, 2026 •

Copy link
Copy Markdown

Issue for this PR

Fixes #53375

Also reported in #62582 (duplicate of #53375).

Type of change

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

What does this PR do?

Incompatible server health has no version. The UI used selectServerVersion(health) ?? "1", so any incompatible SSH remote was shown as "OpenCode 1" and told to upgrade to V2 — even when the remote was already V2 (for example a patch mismatch like 2.2.5 vs 2.2.6).

When there is no version, use version-agnostic copy instead of inventing "1". If a version is present later, keep the existing versioned message.

How did you verify your code works?

  • bun test src/runtime/server/health-machine.test.ts in packages/app (17 pass)
  • bun run typecheck:tsc in packages/app
  • Pre-push lint + turbo typecheck passed

Visual

<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72" role="img" aria-label="Incompatible server label no longer says OpenCode 1">
  <style>
    .fade { animation: swap 2.4s ease-in-out infinite; }
    @keyframes swap {
      0%, 40% { opacity: 1; }
      50%, 90% { opacity: 0; }
      100% { opacity: 1; }
    }
    .show { animation: reveal 2.4s ease-in-out infinite; }
    @keyframes reveal {
      0%, 40% { opacity: 0; }
      50%, 90% { opacity: 1; }
      100% { opacity: 0; }
    }
    @media (prefers-reduced-motion: reduce) {
      .fade, .show { animation: none; }
      .fade { opacity: 0; }
      .show { opacity: 1; }
    }
  </style>
  <rect width="240" height="72" fill="none"/>
  <text x="12" y="28" fill="currentColor" font-family="ui-sans-serif, system-ui, sans-serif" font-size="11" opacity="0.55">incompatible SSH server</text>
  <text class="fade" x="12" y="52" fill="currentColor" font-family="ui-sans-serif, system-ui, sans-serif" font-size="13">OpenCode 1 (wrong)</text>
  <text class="show" x="12" y="52" fill="currentColor" font-family="ui-sans-serif, system-ui, sans-serif" font-size="13">isn't compatible</text>
</svg>

Screenshots / recordings

N/A — copy-only change. Repro was Desktop 2.2.6 → SSH remote service 2.2.5 showing "OpenCode 1".

Checklist

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

Added by the opencode bot (AI-generated).

Fixes #62582

Related: #60665, #55429

Incompatible health has no version, so falling back to "1" falsely told
users a V2 remote was V1. Use version-agnostic copy when unknown.

@opencodejr opencodejr Bot 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.

The fix looks right. Incompatible health in the app only comes from the SSH setup finding a remote service on a different (2.x) version, so the old "running OpenCode 1… Upgrade to V2" text was always wrong, and dropping the made-up "1" fixes it. I couldn't run it end to end: this needs the Desktop app with an SSH remote, which the sandbox doesn't have. Before/after screenshots of the server row tooltip and the session panel would help. In packages/app, health-machine.test.ts, language.test.ts and src/session pass, and tsc -b passes. Strings missing from other languages fall back to English.

Public API: unchanged (renderer text and two new English i18n keys only).

A few small points, noted inline: the branch for when a version is known can never run, the new text drops any hint about what to do, and the added test can be dropped.

Fixes #62582
Related: #60665, #55429

Comment thread packages/app/src/home/projects/view.tsx Resolved
Incompatible health never carries a version, so drop the dead versioned
branch and the selector test that did not cover the UI fix. Keep a short
match-and-restart next step in the unknown copy.
@DonnieFi

DonnieFi commented Nov 7, 2026

Copy link
Copy Markdown
Author

Credit to @dluc for the /api/info and process logs in #60283 that confirmed a V2 remote was still labeled OpenCode 1, and to @robertn702 for the original report that pinned the ?? \"1\" fallback.

Move the match-and-restart copy onto the existing i18n keys, drop locale
overrides that still said upgrade to V2, and remove unused
selectServerVersion now that no caller invents a version.

@opencodejr opencodejr Bot 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.

The new commit takes up the optional cleanup from my last reply: the text without a version now uses the original keys, the old "OpenCode {{version}} / upgrade to V2" translations and selectServerVersion are removed, and nothing still refers to them. Other languages will show the new English text until it's translated, which is better than the old translations claiming the server runs OpenCode 1. The earlier points (the branch that could never run, the missing next step, the unneeded test) were already addressed in 9191e2f. In packages/app, src/runtime/i18n, src/runtime/server and src/session pass, and tsc -b passes. I still couldn't run the Desktop SSH flow, so before/after screenshots of the server row tooltip and the session panel would help.

Public API: unchanged (renderer text and i18n keys only).

@opencodejr

opencodejr Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Thanks. I checked these in my last review of c65e612: the text with the next step is on server.row.incompatible and session.error.incompatible.description, the outdated translations and selectServerVersion are gone, and the unneeded test and doc comment were dropped. I have nothing more on the code. The only thing still open from my side is before/after screenshots of the server row tooltip and the session panel from a Desktop SSH setup, since I couldn't run that flow here.

@DonnieFi

DonnieFi commented Nov 7, 2026

Copy link
Copy Markdown
Author

Screenshots

Before (Desktop 2.2.6 → SSH remote service 2.2.5). Tooltip said OpenCode 1:

SSH remote deba tooltip says OpenCode 1

Also filed with #62582.

After. I don't have a live after shot. The remote is on a matching version again, so the incompatible UI no longer shows unless we deliberately reintroduce a mismatch. Happy to capture one if maintainers want that forced for a minute.

The PR body SVG shows the copy change for reduced-motion and animated previews.

@opencodejr

opencodejr Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Thanks for the before screenshot and for explaining why there's no after shot. That's fine: the after state is just the new English text, which comes from the two i18n keys I already checked in the code. Whether to force a short version mismatch to capture it is up to the maintainers. I have nothing more on the change.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

1 participant