The best way to control Claude Code, Codex and more from any computer or phone
refactor(mobile): remove unused pairing redaction wrapper (#10147)
Julius Marminge committed
Sep 5, 2026 at 08:42 UTC
6a8f4d3b8f1c73df33fb6ac3f1ff89e38b4cf633
2 files changed
+1
-32
apps/mobile/src/lib/connection.test.ts
+1
-22
@@ -1,11 +1,7 @@
1
import { afterEach, describe, expect, it, vi } from "vite-plus/test";
2
import { EnvironmentId } from "@t3tools/contracts";
3
4
-import {
5
- isRelayManagedConnection,
6
- redactPairingCredential,
7
- toStableSavedRemoteConnection,
8
-} from "./connection";
4
+import { isRelayManagedConnection, toStableSavedRemoteConnection } from "./connection";
5
import { authClientMetadata } from "./authClientMetadata";
6
7
const mobilePlatform = vi.hoisted(() => ({ OS: "ios" as "ios" | "android" }));
@@ -83,23 +79,6 @@ describe("mobile remote connection records", () => {
79
});
80
});
81
86
- it("removes one-time bootstrap credentials before persisting pairing URLs", () => {
87
- expect(redactPairingCredential("https://desktop.example/#token=bootstrap-token")).toBe(
88
- "https://desktop.example/",
89
- );
90
- expect(redactPairingCredential("https://desktop.example/?token=bootstrap-token")).toBe(
91
- "https://desktop.example/",
92
- );
93
- });
94
-
95
- it("removes hosted pairing credentials while keeping the advertised host", () => {
96
- expect(
97
- redactPairingCredential(
98
- "https://app.t3.codes/pair?host=https%3A%2F%2Fdesktop.example&token=bootstrap-token&label=Desktop",
99
- ),
100
- ).toBe("https://app.t3.codes/pair?host=https%3A%2F%2Fdesktop.example&label=Desktop");
101
- });
102
-
82
it("recognizes explicitly managed relay connections", () => {
83
expect(isRelayManagedConnection({ relayManaged: true })).toBe(true);
84
});
apps/mobile/src/lib/connection.ts
-10
@@ -1,5 +1,4 @@
1
import { EnvironmentId } from "@t3tools/contracts";
2
-import { stripPairingTokenFromUrl } from "@t3tools/shared/remote";
2
import { type EnvironmentConnectionPhase } from "@t3tools/client-runtime/connection";
3
4
export interface SavedRemoteConnection {
@@ -17,15 +16,6 @@ export interface SavedRemoteConnection {
16
17
export type RemoteClientConnectionState = EnvironmentConnectionPhase;
18
20
-export function redactPairingCredential(pairingUrl: string): string {
21
- const trimmed = pairingUrl.trim();
22
- try {
23
- return stripPairingTokenFromUrl(new URL(trimmed)).toString();
24
- } catch {
25
- return trimmed;
26
- }
27
-}
28
-
19
export function isRelayManagedConnection(
20
connection: Pick<SavedRemoteConnection, "authenticationMethod" | "relayManaged">,
21
): boolean {