Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(clients): learn an environment's LAN and tailnet addresses #15468

Mergedjuliusmarmingemerged 9 commits intot3code/connection-routes fromrefs/pull/15468/headmerged by juliusmarminge View on GitHub

Showing 22 changed files with 9 additions and 6 deletions (loading 20).

x
0 of 22 viewed, 22 left
2 additions and 4 deletionsapps/mobile/src/features/cloud/cloud-drafts.tsModified
View file
@@ -1,4 +1,4 @@
-import { EnvironmentRegistry, connectionRoutes } from "@t3tools/client-runtime/connection";
+import { EnvironmentRegistry, removedWithRelay } from "@t3tools/client-runtime/connection";
import { createRuntimeCommand } from "@t3tools/client-runtime/state/runtime";
import * as Effect from "effect/Effect";
import * as Schema from "effect/Schema";
@@ -28,9 +28,7 @@
const environmentIds = new Set(
[...entries.values()]
// Only environments that sign-out removes entirely lose their drafts.
- .filter((entry) =>
- connectionRoutes(entry).every((route) => route.target._tag === "RelayConnectionTarget"),
- )
+ .filter(removedWithRelay)
.map((entry) => entry.target.environmentId),
);
// Credentials are already revoked. A failed backup must leave the local
7 additions and 2 deletionsapps/mobile/src/features/settings/EnvironmentRoutesSection.tsxModified
View file
@@ -5,6 +5,7 @@
connectionRouteId,
connectionRouteLabel,
connectionRoutes,
+ isLearned,
} from "@t3tools/client-runtime/connection";
import type { EnvironmentId } from "@t3tools/contracts";
import * as Option from "effect/Option";