Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): T3 Connect settings can repair a link that drifted to publish-only #19389

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/19389/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 5 changed files with 85 additions and 8 deletions (loading 2).

x
0 of 5 viewed, 5 left
42 additions and 1 deletionapps/web/src/cloud/useCloudLinkController.test.tsxModified
View file
@@ -4,6 +4,7 @@
EnvironmentId,
type EnvironmentCloudLinkStateResult,
} from "@t3tools/contracts";
+import type { RelayManagedEndpointProviderKind } from "@t3tools/contracts/relay";
import { AsyncResult } from "effect/reactivity";
import { act, useLayoutEffect } from "react";
import { create, type ReactTestRenderer } from "react-test-renderer";
@@ -13,6 +14,7 @@
scopes: new Set<string>(),
snapshot: null as EnvironmentCloudLinkStateResult | null,
renderedSnapshot: null as EnvironmentCloudLinkStateResult | null,
+ relayProviderKind: null as RelayManagedEndpointProviderKind | null,
getToken: vi.fn<() => Promise<string | null>>(),
link: vi.fn(),
unlink: vi.fn(),
@@ -22,12 +24,26 @@
toast: vi.fn(),
}));
​
+vi.mock("@effect/atom-react", () => ({
+ useAtomValue: () => ({
+ environments: new Map(
+ testState.relayProviderKind === null
+ ? []
+ : [
+ [
+ "primary",