Repository navigation
Conversation
Incompatible health has no version, so falling back to "1" falsely told users a V2 remote was V1. Use version-agnostic copy when unknown.
There was a problem hiding this comment.
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.
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.
|
Credit to @dluc for the |
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.
There was a problem hiding this comment.
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).
|
Thanks. I checked these in my last review of c65e612: the text with the next step is on |
ScreenshotsBefore (Desktop 2.2.6 → SSH remote service 2.2.5). Tooltip said 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. |
|
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. |

Issue for this PR
Fixes #53375
Also reported in #62582 (duplicate of #53375).
Type of change
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.tsinpackages/app(17 pass)bun run typecheck:tscinpackages/applint+ turbotypecheckpassedVisual
Screenshots / recordings
N/A — copy-only change. Repro was Desktop 2.2.6 → SSH remote service 2.2.5 showing "OpenCode 1".
Checklist
Added by the opencode bot (AI-generated).
Fixes #62582
Related: #60665, #55429