GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(desktop): SSH aliases follow port changes by juliusmarminge · Pull Request #24449 · pingdotgg/t3code

fix(desktop): SSH aliases follow port changes #24449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
juliusmarminge wants to merge 6 commits into main from fix/issue-7568

Uh oh!

There was an error while loading. Please reload this page.

Closed

fix(desktop): SSH aliases follow port changes #24449

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit Hold shift + click to select a range
3a4e802
test(client-runtime): SSH registration saves the target as entered
juliusmarminge Oct 24, 2026
9f07e62
fix(client-runtime): SSH connections pick up ssh config changes on re…
juliusmarminge Oct 24, 2026
78d05b9
fix(client-runtime): SSH reconnects keep the alias target and routing…
juliusmarminge Oct 24, 2026
000e536
Merge remote-tracking branch 'origin/main' into fix/issue-7568
juliusmarminge Nov 11, 2026
8ec5c24
fix(web): discovered SSH aliases are kept literal
juliusmarminge Nov 11, 2026
281f402
Merge remote-tracking branch 'origin/main' into fix/issue-7568
juliusmarminge Nov 11, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
fix(web): discovered SSH aliases are kept literal
A discovered ssh config Host such as `devbox:2200` was run through the manual
address parser, which split it into host `devbox` and port 2200 and bypassed
its config entry. Discovered hosts now keep the alias as-is and parse only the
username and port override fields.

AI-assisted; verified with the tests and tools listed above.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge @claude
juliusmarminge and claude committed Nov 11, 2026
commit 8ec5c24ca42c0f429519152e0109f2e525cd34b9

There are no files selected for viewing

5 changes: 3 additions & 2 deletions 5 apps/web/src/components/settings/AddEnvironmentDialog.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import {
threadJumpIndexFromCommand,
} from "../../keybindings";
import {
parseDiscoveredDesktopSshTarget,
parseManualDesktopSshTarget,
parsePairingUrlFields,
parseRemotePairingFields,
Expand Down Expand Up @@ -281,8 +282,8 @@ export function AddEnvironmentDialog({
// today would pin its user and port, so later config edits never apply.
let aliasTarget: DesktopSshEnvironmentTarget;
try {
aliasTarget = parseManualDesktopSshTarget({
host: target.alias,
aliasTarget = parseDiscoveredDesktopSshTarget({
alias: target.alias,
username: savedBackendSshUsername,
port: savedBackendSshPort,
});
Expand Down
17 changes: 17 additions & 0 deletions 17 apps/web/src/components/settings/ConnectionsSettings.logic.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { type DesktopWslState, EnvironmentId } from "@t3tools/contracts";
import { describe, expect, it, vi } from "vite-plus/test";
import {
applyWslEnableSelection,
parseDiscoveredDesktopSshTarget,
resolveAccessEnvironmentId,
resolveTailscaleServeBaseUrl,
selectQrEndpointOption,
Expand Down Expand Up @@ -43,6 +44,22 @@ describe("togglePairingScopeSelection", () => {
});
});

describe("parseDiscoveredDesktopSshTarget", () => {
it("keeps the ssh config alias literal and applies only the override fields", () => {
expect(
parseDiscoveredDesktopSshTarget({ alias: "deploy@devbox:2200", username: "", port: "" }),
).toEqual({
alias: "deploy@devbox:2200",
hostname: "deploy@devbox:2200",
username: null,
port: null,
});
expect(
parseDiscoveredDesktopSshTarget({ alias: "devbox", username: " dev ", port: "2222" }),
).toEqual({ alias: "devbox", hostname: "devbox", username: "dev", port: 2222 });
});
});

describe("resolveTailscaleServeBaseUrl", () => {
it.each([
["https://host.tail.ts.net:441/", 443, "https://host.tail.ts.net"],
Expand Down
27 changes: 24 additions & 3 deletions 27 apps/web/src/components/settings/ConnectionsSettings.logic.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,7 @@ export function parseManualDesktopSshTarget(input: {
throw new Error("SSH host or alias is required.");
}

if (port !== null && (!Number.isInteger(port) || port <= 0 || port > 65_535)) {
throw new Error("SSH port must be between 1 and 65535.");
}
assertSshPort(port);

return {
alias: hostname,
Expand All @@ -230,6 +228,29 @@ export function parseManualDesktopSshTarget(input: {
};
}

// A discovered alias is an ssh config Host name, so it is never split into user@host:port.
export function parseDiscoveredDesktopSshTarget(input: {
readonly alias: string;
readonly username: string;
readonly port: string;
}): DesktopSshEnvironmentTarget {
const rawPort = input.port.trim();
const port = rawPort.length > 0 ? Number.parseInt(rawPort, 10) : null;
assertSshPort(port);
return {
alias: input.alias,
hostname: input.alias,
username: input.username.trim() || null,
port,
};
}

function assertSshPort(port: number | null) {
if (port !== null && (!Number.isInteger(port) || port <= 0 || port > 65_535)) {
throw new Error("SSH port must be between 1 and 65535.");
}
}

export function parsePairingUrlFields(
input: string,
): { readonly host: string; readonly pairingCode: string } | null {
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.