The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 04:15 UTC
fix(web): stop offering a provider update that cannot clear a limited-support warning (#17676)
Sean Swanson committed
Oct 18, 2026 at 13:11 UTC
fc0c36f963b6e68933f27b5279f731d6a8454325
2 files changed
+39
-1
apps/web/src/components/settings/providerStatus.test.ts
+33
@@ -99,6 +99,39 @@ it("does not suggest copying a command that installs an incompatible latest vers
99
).not.toBeNull();
100
});
101
102
+it("does not offer an update that cannot change a limited-support version", () => {
103
+ // OpenCode 1.18.35 is the newest `opencode-ai`; the recommended 2.x ships as another package.
104
+ const advisory = {
105
+ status: "current" as const,
106
+ currentVersion: "1.18.35",
107
+ latestVersion: "1.18.35",
108
+ updateCommand: "npm install -g opencode-ai@latest",
109
+ canUpdate: true,
110
+ checkedAt: provider.checkedAt,
111
+ message: null,
112
+ };
113
+ const compatibility = {
114
+ status: "graceful" as const,
115
+ latestVersionStatus: "graceful" as const,
116
+ message: null,
117
+ recommendedRange: ">=2.0.18",
118
+ recommendedVersion: null,
119
+ };
120
+ expect(getProviderVersionAdvisoryPresentation(advisory, compatibility)).toEqual({
121
+ title: "Limited support",
122
+ detail: "Use >=2.0.18 for full support.",
123
+ updateCommand: null,
124
+ emphasis: "normal",
125
+ targetVersion: null,
126
+ });
127
+ expect(
128
+ getProviderVersionAdvisoryPresentation(
129
+ { ...advisory, status: "behind_latest", currentVersion: "1.18.34" },
130
+ compatibility,
131
+ )?.updateCommand,
132
+ ).toBe(advisory.updateCommand);
133
+});
134
+
135
it("shows compatibility in the version popover even when the installed version is current", () => {
136
const advisory = {
137
status: "current" as const,
apps/web/src/components/settings/providerStatus.ts
+6
-1
@@ -114,13 +114,18 @@ export function getProviderVersionAdvisoryPresentation(
114
) {
115
const targetVersion = compatibility.recommendedVersion;
116
const recommendation = getProviderVersionLabel(targetVersion) ?? compatibility.recommendedRange;
117
+ // An installed version that is already the package's latest cannot be fixed by
118
+ // updating it, e.g. when the recommendation needs a different package.
119
+ const isAlreadyLatest = advisory?.status === "current";
120
return {
121
title: COMPATIBILITY_TITLES[compatibility.status],
122
detail:
123
compatibility.message ??
124
(recommendation ? `Use ${recommendation} for full support.` : "Update for full support."),
125
updateCommand:
123
- targetVersion || latestIsIncompatible ? null : (advisory?.updateCommand ?? null),
126
+ targetVersion || latestIsIncompatible || isAlreadyLatest
127
+ ? null
128
+ : (advisory?.updateCommand ?? null),
129
emphasis: compatibility.status === "graceful" ? "normal" : "strong",
130
targetVersion,
131
};