From cc9a2b4690bc1dbc35c27396ca17b51a74345168 Mon Sep 17 00:00:00 2001 From: "paseo-bot[bot]" <266920839+paseo-bot[bot]@users.noreply.github.com> Date: Sun, 8 Nov 2026 00:18:34 +0000 Subject: [PATCH] fix(app): identify routed connections in diagnostics The runtime already identifies connections through another host as routed, but both diagnostic fields fell through to unknown. Preserve that distinction in the report. --- .../diagnostics/app-diagnostic-report.test.ts | 31 +++++++++++++++++++ .../src/diagnostics/app-diagnostic-report.ts | 2 ++ 2 files changed, 33 insertions(+) diff --git a/packages/app/src/diagnostics/app-diagnostic-report.test.ts b/packages/app/src/diagnostics/app-diagnostic-report.test.ts index df10b01fed..1046db4ff1 100644 --- a/packages/app/src/diagnostics/app-diagnostic-report.test.ts +++ b/packages/app/src/diagnostics/app-diagnostic-report.test.ts @@ -97,6 +97,37 @@ describe("app diagnostics report", () => { expect(report).not.toContain("tcp-password"); }); + test.each(["online", "error"] as const)( + "identifies a routed connection while %s", + (connectionStatus) => { + const host = makeHost(); + host.connections.push({ id: "routed-origin", type: "routed", originServerId: "srv-origin" }); + const snapshot: HostRuntimeSnapshot = { + serverId: host.serverId, + activeConnectionId: "routed-origin", + activeConnection: { type: "routed", endpoint: "srv-origin", display: "via srv-origin" }, + connectionStatus, + client: null, + lastError: connectionStatus === "error" ? "Host disconnected" : null, + lastOnlineAt: null, + agentDirectoryStatus: "ready", + agentDirectoryError: null, + hasEverLoadedAgentDirectory: true, + probeByConnectionId: new Map(), + clientGeneration: 1, + connectionEpoch: 1, + }; + + const report = formatHostRuntimeSection({ host, snapshot }); + + expect(report).toContain("Active connection: routed"); + expect(report).toContain("Connection 5: routed, active, probe=unknown"); + expect(report).toContain(`Status: ${connectionStatus}`); + expect(report).toContain(`Last error: ${snapshot.lastError ?? "none"}`); + expect(report).not.toContain("srv-origin"); + }, + ); + test("redacts saved connection secrets from collected daemon and desktop text", () => { const host = makeHost(); const redacted = redactAppDiagnosticReport( diff --git a/packages/app/src/diagnostics/app-diagnostic-report.ts b/packages/app/src/diagnostics/app-diagnostic-report.ts index afb38e7aad..bd14b901f6 100644 --- a/packages/app/src/diagnostics/app-diagnostic-report.ts +++ b/packages/app/src/diagnostics/app-diagnostic-report.ts @@ -100,6 +100,8 @@ export function describeConnectionKind(type: HostConnection["type"] | string): s return "local pipe"; case "relay": return "relay"; + case "routed": + return "routed"; default: return "unknown"; }