@devries-cameron20 / t3code-1 / commits / c19b8f0401
Fork 0

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

fix(cli): t3 status no longer suggests --no-lan under a T3CODE_HOST override (#35691)

Julius Marminge committed Nov 12, 2026 at 15:59 UTC c19b8f04018f9495ddce67090c33c247ee095e58
2 files changed +25 -7
apps/server/src/cli/up.test.ts
+23 -5
@@ -167,6 +167,8 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer, NetService.layer))
167 /** Runs as if in a terminal, answering each question with this text. */
168 readonly answer?: string;
169 readonly prints?: string;
170 + readonly omits?: string;
171 + readonly json?: object;
172 readonly env: string;
173 readonly args: ReadonlyArray<string>;
174 readonly installs: number;
@@ -271,12 +273,28 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer, NetService.layer))
273 installed: true,
274 status: { current: false, otherBaseDir: "/srv/t3 home" },
275 reportStatus: true,
276 + json: {
277 + service: { otherBaseDir: "/srv/t3 home" },
278 + lan: { enabled: false, inheritedDefault: false },
279 + },
280 env: "",
281 args: ["--json"],
282 installs: 0,
283 restarts: 0,
284 envAfter: "",
285 },
286 + {
287 + label: "a host override gets no --no-lan hint it would ignore",
288 + installed: true,
289 + reportStatus: true,
290 + prints: "overridden · T3CODE_HOST=0.0.0.0",
291 + omits: "t3 up --no-lan",
292 + env: "T3CODE_HOST=0.0.0.0\n",
293 + args: [],
294 + installs: 0,
295 + restarts: 0,
296 + envAfter: "T3CODE_HOST=0.0.0.0\n",
297 + },
298 {
299 label: "no service manager still records the choice",
300 installed: false,
@@ -371,11 +389,11 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer, NetService.layer))
389 if (input.prints !== undefined) {
390 expect(lines.join("\n")).toContain(input.prints.replace("<baseDir>", baseDir));
391 }
374 - if (input.reportStatus) {
375 - expect(JSON.parse(lines.join("\n"))).toMatchObject({
376 - service: { otherBaseDir: "/srv/t3 home" },
377 - lan: { enabled: false, inheritedDefault: false },
378 - });
392 + if (input.omits !== undefined) {
393 + expect(lines.join("\n")).not.toContain(input.omits);
394 + }
395 + if (input.json !== undefined) {
396 + expect(JSON.parse(lines.join("\n"))).toMatchObject(input.json);
397 }
398 expect(exit._tag).toBe(
399 input.restartFails === true || input.fails === true ? "Failure" : "Success",
apps/server/src/cli/up.ts
+2 -2
@@ -42,7 +42,7 @@ interface Setup {
42 /** T3 Connect revoked the link; `t3 connect` links again. */
43 readonly connectRevoked: boolean;
44 readonly lan: boolean;
45 - /** An installed service with no T3CODE_LAN keeps the old default: on. */
45 + /** An installed service with no T3CODE_LAN or T3CODE_HOST keeps the old default: on. */
46 readonly lanFromOldDefault: boolean;
47 readonly host: string | undefined;
48 }
@@ -86,7 +86,7 @@ const readSetup = Effect.fn("cli.up.read_setup")(function* () {
86 connect,
87 connectRevoked,
88 lan: Option.getOrElse(lan, () => servesThisHome),
89 - lanFromOldDefault: Option.isNone(lan) && servesThisHome,
89 + lanFromOldDefault: Option.isNone(lan) && servesThisHome && entries.T3CODE_HOST === undefined,
90 host: entries.T3CODE_HOST,
91 } satisfies Setup;
92 });