Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(clients): disable incompatible environments during discovery #11990

Mergedjuliusmarmingemerged 3 commits intomain fromrefs/pull/11990/headmerged by juliusmarminge View on GitHub

Showing 17 changed files with 50 additions and 6 deletions (loading 14).

x
0 of 17 viewed, 17 left
27 additions and 1 deletionapps/mobile/src/features/cloud/cloudEnvironmentPresentation.test.tsModified
View file
@@ -1,4 +1,4 @@
-import { EnvironmentId } from "@t3tools/contracts";
+import { EnvironmentId, ORCHESTRATION_PROTOCOL_VERSION } from "@t3tools/contracts";
import type { RelayEnvironmentStatusResponse } from "@t3tools/contracts/relay";
import { describe, expect, it } from "vite-plus/test";
​
@@ -24,6 +24,32 @@
​
describe("available cloud environment presentation", () => {
+ it("shows an incompatible discovered server before any connection attempt", () => {
+ const onlineStatus = relayStatus("online");
+ const status = {
+ ...onlineStatus,
+ descriptor: {
+ environmentId: onlineStatus.environmentId,
+ label: "Preview server",
+ platform: { os: "darwin", arch: "arm64" },
+ serverVersion: "2.0.0",
+ orchestrationProtocolVersion: ORCHESTRATION_PROTOCOL_VERSION + 1,
+ capabilities: { repositoryIdentity: true },
+ },
+ } satisfies RelayEnvironmentStatusResponse;
+ expect(
+ availableCloudEnvironmentPresentation({
+ isStatusPending: false,
+ status,
+ statusError: null,
+ statusErrorTraceId: null,
+ }),