@devries-cameron20 / t3code-1 / commits / 371e323925
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

test(server): remove authorization prompt snapshots (#9985)

Julius Marminge committed Sep 5, 2026 at 00:18 UTC 371e32392570fdc0d2309e9f92490bbd2c6b3f02
4 files changed +3 -35
apps/server/src/cli/connect.test.ts
-19
@@ -13,31 +13,12 @@ import * as Terminal from "effect/Terminal";
13 import * as BootService from "../cloud/bootService.ts";
14 import {
15 acquireRelayClientForLink,
16 - formatHeadlessAuthorizationPrompt,
17 - formatRelayClientReady,
16 headlessSessionConfig,
17 isPublishAgentActivityEnabledValue,
18 reportCloudDisconnectResults,
19 } from "./connect.ts";
20 import { recoverServiceOnboardingOffer } from "./service.ts";
21
24 -it("explains how to complete headless authorization", () => {
25 - assert.equal(
26 - formatHeadlessAuthorizationPrompt("https://example.test/connect"),
27 - [
28 - "Headless authorization",
29 - "Open this URL on a device with a browser:",
30 - " https://example.test/connect",
31 - "",
32 - "After signing in, return here and enter the code shown in your browser.",
33 - ].join("\n"),
34 - );
35 -});
36 -
37 -it("formats relay readiness without printing its installation path", () => {
38 - assert.equal(formatRelayClientReady("2026.5.2"), "✓ Relay client ready · cloudflared 2026.5.2");
39 -});
40 -
22 const readHeadlessSessionConfig = (env: Record<string, string>) =>
23 headlessSessionConfig.pipe(Effect.provide(ConfigProvider.layer(ConfigProvider.fromEnv({ env }))));
24
apps/server/src/cli/connect.ts
+2 -2
@@ -86,7 +86,7 @@ const promptForOutOfBandOAuthCode = Effect.fn("cloud.cli.prompt_for_out_of_band_
86 },
87 );
88
89 -export function formatHeadlessAuthorizationPrompt(authorizeUrl: string): string {
89 +function formatHeadlessAuthorizationPrompt(authorizeUrl: string): string {
90 return [
91 "Headless authorization",
92 "Open this URL on a device with a browser:",
@@ -464,7 +464,7 @@ const runCloudCommand = Effect.fn("cloud.cli.run_cloud_command")(function* <A, E
464
465 const connectedAs = (identity: string | null): string => (identity ? ` as ${identity}` : "");
466
467 -export function formatRelayClientReady(version: string): string {
467 +function formatRelayClientReady(version: string): string {
468 return `✓ Relay client ready · cloudflared ${version}`;
469 }
470
apps/server/src/cloud/CliTokenManager.test.ts
-13
@@ -93,19 +93,6 @@ class PromptRejectedError extends Schema.TaggedErrorClass<PromptRejectedError>()
93 { message: Schema.String },
94 ) {}
95
96 -it("formats loopback authorization with a headless-host fallback", () => {
97 - assert.equal(
98 - CliTokenManager.formatLoopbackAuthorizationPrompt("https://clerk.example.test/authorize"),
99 - [
100 - "Open this URL to authorize T3 Connect:",
101 - " https://clerk.example.test/authorize",
102 - "",
103 - "Press \u001b[1mEnter\u001b[22m to open it in your browser.",
104 - "No browser on this device? Press \u001b[1mH\u001b[22m to switch to headless mode.",
105 - ].join("\n"),
106 - );
107 -});
108 -
96 const makeTestTerminal = (queue: Queue.Queue<Terminal.UserInput>) =>
97 Terminal.make({
98 columns: Effect.succeed(80),
apps/server/src/cloud/CliTokenManager.ts
+1 -1
@@ -44,7 +44,7 @@ const CLOUD_CLI_OAUTH_CALLBACK_TIMEOUT = Duration.minutes(10);
44 const CLOUD_CLI_OAUTH_REFRESH_EARLY_MS = Duration.toMillis(Duration.minutes(5));
45 const boldTerminalText = (value: string): string => `\u001b[1m${value}\u001b[22m`;
46
47 -export function formatLoopbackAuthorizationPrompt(authorizationUrl: string): string {
47 +function formatLoopbackAuthorizationPrompt(authorizationUrl: string): string {
48 return [
49 "Open this URL to authorize T3 Connect:",
50 ` ${authorizationUrl}`,