Skip to content

Commit 203c7e0

Browse files
fix(server): t3 connect status no longer reports a publish-only link as exposed
formatCloudStatus labelled Exposure from the desired-link marker alone, so a publish-only link printed "Exposure: enabled" and nothing said it has no managed tunnel, disagreeing with `t3 status`. It now reports the link as publish-only and explains that remote access through T3 Connect is off. Fixes #33962 AI-assisted; verified with the tests and tools listed above.
1 parent 0d1e9d2 commit 203c7e0

1 file changed

Lines changed: 16 additions & 8 deletions

File tree

‎apps/server/src/cli/connect.ts‎

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,37 +192,45 @@ function formatCloudStatus(status: CloudCliStatus, options?: { readonly json?: b
192192
: status.desired && status.authenticated
193193
? "pending server startup"
194194
: "not provisioned";
195+
const publishOnly = status.desired && status.linkMode === "publish_only";
195196
const nextStep = !status.authenticated
196197
? "Run `t3 connect link` to authorize and enable T3 Connect."
197198
: status.revoked
198199
? "Run `t3 connect link` to link this environment again."
199200
: !status.desired
200201
? "Run `t3 connect link` to enable T3 Connect."
201202
: !status.linked
202-
? "Start T3 to provision the environment link and launch its managed tunnel."
203+
? publishOnly
204+
? "Start T3 to provision the environment link."
205+
: "Start T3 to provision the environment link and launch its managed tunnel."
203206
: undefined;
204207

205208
return [
206209
"T3 Connect",
207-
` Exposure: ${status.desired ? "enabled" : "disabled"}`,
210+
` Exposure: ${publishOnly ? "publish-only" : status.desired ? "enabled" : "disabled"}`,
208211
` Authorization: ${status.authenticated ? "stored credential" : "missing"}`,
209212
` Environment link: ${provisioned}`,
210213
` Relay: ${status.relayUrl ?? "not provisioned"}`,
211214
` Publish agent activity: ${status.publishAgentActivity ? "enabled" : "disabled"}`,
212215
...formatRelayClientStatus(status.relayClient),
213-
...(!status.desired || status.linkMode !== "managed"
216+
...(!status.desired
214217
? []
215-
: status.reachability === null
218+
: publishOnly
216219
? [
217220
"",
218-
"No running server answered, so reachability was not checked. Check the background service with `t3 service status`.",
221+
"This link only publishes agent activity. Remote access through T3 Connect is off, so other devices need their own route to this machine, such as LAN or Tailscale.",
219222
]
220-
: status.reachability.status === "reachable"
223+
: status.reachability === null
221224
? [
222225
"",
223-
`✓ Other devices can reach this machine · ${formatConnectReachable(status.reachability)}`,
226+
"No running server answered, so reachability was not checked. Check the background service with `t3 service status`.",
224227
]
225-
: ["", formatReachabilityFailure(status.reachability)]),
228+
: status.reachability.status === "reachable"
229+
? [
230+
"",
231+
`✓ Other devices can reach this machine · ${formatConnectReachable(status.reachability)}`,
232+
]
233+
: ["", formatReachabilityFailure(status.reachability)]),
226234
...(nextStep ? ["", `Next: ${nextStep}`] : []),
227235
].join("\n");
228236
}

0 commit comments

Comments
 (0)