Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): open remote editors with the environment user #8305

Closedjakeleventhal(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/8305/headopened View on GitHub

Showing 9 changed files with 52 additions and 9 deletions (loading 6).

x
0 of 9 viewed, 9 left
21 additions and 1 deletionapps/desktop/src/electron/ElectronShell.test.tsModified
View file
@@ -120,6 +120,26 @@
}).pipe(Effect.provide(ElectronShell.layer)),
​
+ it.effect("opens remote SSH editor URLs with a login user in the target", () =>
+ Effect.gen(function* () {
+ openExternalMock.mockResolvedValue(undefined);
+​
+ const electronShell = yield* ElectronShell.ElectronShell;
+ const results = yield* Effect.all([
+ electronShell.openExternal(
+ "cursor://vscode-remote/ssh-remote+r2d2%40r2d2/Users/r2d2/project",
+ ),
+ electronShell.openExternal("zed://ssh/r2d2@r2d2/Users/r2d2/project"),
+ ]);
+​
+ assert.deepEqual(results, [true, true]);
+ assert.deepEqual(openExternalMock.mock.calls, [
+ ["cursor://vscode-remote/ssh-remote+r2d2%40r2d2/Users/r2d2/project"],
+ ["zed://ssh/r2d2@r2d2/Users/r2d2/project"],
+ ]);
+ }).pipe(Effect.provide(ElectronShell.layer)),
+ );
+​
it.effect("does not open editor URLs that mix up link shapes", () =>
Effect.gen(function* () {
openExternalMock.mockResolvedValue(undefined);
@@ -150,7 +170,7 @@
electronShell.openExternal(